ITK  4.6.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();
111 
113  virtual void CalculateAdvectionImage();
114 
116  virtual ScalarValueType CurvatureSpeed(const NeighborhoodType & neighborhood,
117  const FloatOffsetType & offset, GlobalDataStruct *gd) const
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)
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
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
virtual ScalarValueType CurvatureSpeed(const NeighborhoodType &neighborhood, const FloatOffsetType &offset, GlobalDataStruct *gd) const
Light weight base class for most itk classes.
virtual ScalarValueType PropagationSpeed(const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *gd) const
ConstNeighborhoodIterator< TImageType >::RadiusType RadiusType
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
virtual void SetPropagationWeight(const ScalarValueType p)
virtual void Initialize(const RadiusType &r)
SegmentationLevelSetFunction< TImageType, TFeatureImageType > Superclass
void PrintSelf(std::ostream &os, Indent indent) const
Control indentation during Print() invocation.
Definition: itkIndent.h:49
This function is used in GeodesicActiveContourLevelSetImageFilter to segment structures in an image b...
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