ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkCurvesLevelSetFunction.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkCurvesLevelSetFunction_h
19 #define itkCurvesLevelSetFunction_h
20 
22 
23 namespace itk
24 {
61 template< typename TImageType, typename TFeatureImageType = TImageType >
63  public SegmentationLevelSetFunction< TImageType, TFeatureImageType >
64 {
65 public:
72  typedef TFeatureImageType FeatureImageType;
73 
75  itkNewMacro(Self);
76 
79 
81  typedef typename SuperSuperclass::PixelType PixelType;
82  typedef typename Superclass::ImageType ImageType;
90 
92  itkStaticConstMacro(ImageDimension, unsigned int,
94 
96  virtual void CalculateSpeedImage() ITK_OVERRIDE;
97 
99  virtual void CalculateAdvectionImage() ITK_OVERRIDE;
100 
102  virtual ScalarValueType CurvatureSpeed(const NeighborhoodType & neighborhood,
103  const FloatOffsetType & offset, GlobalDataStruct *gd) const ITK_OVERRIDE
104  { return this->PropagationSpeed(neighborhood, offset, gd); }
105 
108  void SetDerivativeSigma(const double v)
109  { m_DerivativeSigma = v; }
111  { return m_DerivativeSigma; }
113 
114  virtual void Initialize(const RadiusType & r) ITK_OVERRIDE;
115 
116 protected:
118  m_Center(0),
119  m_DerivativeSigma(1.0)
120  {
121  //Curvature term is the minimal curvature.
122  this->UseMinimalCurvatureOn();
126  }
127 
129 
130  CurvesLevelSetFunction(const Self &); //purposely not implemented
131  void operator=(const Self &); //purposely not implemented
132 
133  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE
134  {
135  Superclass::PrintSelf(os, indent);
136  os << indent << "DerivativeSigma: " << m_DerivativeSigma << std::endl;
137  }
138 
139 private:
140 
142  std::slice x_slice[ImageDimension];
143 
146 
149 
151 };
152 } // end namespace itk
153 
154 #ifndef ITK_MANUAL_INSTANTIATION
155 #include "itkCurvesLevelSetFunction.hxx"
156 #endif
157 
158 #endif
LevelSetFunction< TImageType > SuperSuperclass
void PrintSelf(std::ostream &s, Indent indent) const override
SegmentationLevelSetFunction< TImageType, TFeatureImageType > Superclass
Light weight base class for most itk classes.
The LevelSetFunction class is a generic function object which can be used to create a level set metho...
Superclass::PixelType PixelType
void PrintSelf(std::ostream &os, Indent indent) const override
signed long OffsetValueType
Definition: itkIntTypes.h:154
Superclass::ScalarValueType ScalarValueType
Superclass::FloatOffsetType FloatOffsetType
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
virtual void CalculateSpeedImage() override
SmartPointer< const Self > ConstPointer
static const unsigned int ImageDimension
virtual ScalarValueType PropagationSpeed(const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *gd) const override
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
SuperSuperclass::FloatOffsetType FloatOffsetType
virtual void SetPropagationWeight(const ScalarValueType p)
void operator=(const Self &)
Superclass::VectorImageType VectorImageType
virtual void CalculateAdvectionImage() override
std::slice x_slice[ImageDimension]
OffsetValueType m_xStride[ImageDimension]
SuperSuperclass::GlobalDataStruct GlobalDataStruct
virtual ScalarValueType CurvatureSpeed(const NeighborhoodType &neighborhood, const FloatOffsetType &offset, GlobalDataStruct *gd) const override
This function is used in CurvesLevelSetImageFilter to segment structures in images based on user supp...
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Superclass::NeighborhoodType NeighborhoodType
Define additional traits for native types such as int or float.
virtual void SetCurvatureWeight(const ScalarValueType c)
virtual void SetAdvectionWeight(const ScalarValueType a)
virtual void Initialize(const RadiusType &r) override
Image< VectorType, itkGetStaticConstMacro(ImageDimension) > VectorImageType
SuperSuperclass::PixelType PixelType
Superclass::FeatureScalarType FeatureScalarType