ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkGeodesicActiveContourLevelSetFunction.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 itkGeodesicActiveContourLevelSetFunction_h
19 #define itkGeodesicActiveContourLevelSetFunction_h
20 
22 
23 namespace itk
24 {
76 template< typename TImageType, typename TFeatureImageType = TImageType >
78  public SegmentationLevelSetFunction< TImageType, TFeatureImageType >
79 {
80 public:
87  typedef TFeatureImageType FeatureImageType;
88 
90  itkNewMacro(Self);
91 
94 
96  typedef typename Superclass::ImageType ImageType;
104 
106  itkStaticConstMacro(ImageDimension, unsigned int,
108 
110  virtual void CalculateSpeedImage() ITK_OVERRIDE;
111 
113  virtual void CalculateAdvectionImage() ITK_OVERRIDE;
114 
116  virtual ScalarValueType CurvatureSpeed(const NeighborhoodType & neighborhood,
117  const FloatOffsetType & offset, GlobalDataStruct *gd) const ITK_OVERRIDE
118  {
119  return this->PropagationSpeed(neighborhood, offset, gd);
120  }
121 
124  void SetDerivativeSigma(const double v)
125  { m_DerivativeSigma = v; }
127  { return m_DerivativeSigma; }
129 
130  virtual void Initialize(const RadiusType & r) ITK_OVERRIDE
131  {
133 
137  }
138 
139 protected:
141  {
145 
146  m_DerivativeSigma = 1.0;
147  }
148 
150 
151  GeodesicActiveContourLevelSetFunction(const Self &); //purposely not
152  // implemented
153  void operator=(const Self &); //purposely not
154  // implemented
155 
156  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE
157  {
158  Superclass::PrintSelf(os, indent);
159  os << indent << "DerivativeSigma: " << m_DerivativeSigma << std::endl;
160  }
161 
162 private:
164 };
165 } // end namespace itk
166 
167 #ifndef ITK_MANUAL_INSTANTIATION
168 #include "itkGeodesicActiveContourLevelSetFunction.hxx"
169 #endif
170 
171 #endif
void PrintSelf(std::ostream &s, Indent indent) const override
Light weight base class for most itk classes.
virtual void CalculateSpeedImage() override
ConstNeighborhoodIterator< TImageType >::RadiusType RadiusType
virtual ScalarValueType CurvatureSpeed(const NeighborhoodType &neighborhood, const FloatOffsetType &offset, GlobalDataStruct *gd) const override
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
virtual ScalarValueType PropagationSpeed(const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *gd) const override
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
virtual void SetPropagationWeight(const ScalarValueType p)
virtual void CalculateAdvectionImage() override
SegmentationLevelSetFunction< TImageType, TFeatureImageType > Superclass
void PrintSelf(std::ostream &os, Indent indent) const override
Control indentation during Print() invocation.
Definition: itkIndent.h:49
This function is used in GeodesicActiveContourLevelSetImageFilter to segment structures in an image b...
virtual void Initialize(const RadiusType &r) override
Define additional traits for native types such as int or float.
virtual void SetCurvatureWeight(const ScalarValueType c)
virtual void SetAdvectionWeight(const ScalarValueType a)
Image< VectorType, itkGetStaticConstMacro(ImageDimension) > VectorImageType