ITK  5.2.0
Insight Toolkit
itkGeodesicActiveContourShapePriorLevelSetFunction.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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 itkGeodesicActiveContourShapePriorLevelSetFunction_h
19 #define itkGeodesicActiveContourShapePriorLevelSetFunction_h
20 
22 
23 namespace itk
24 {
92 template <typename TImageType, typename TFeatureImageType = TImageType>
94  : public ShapePriorSegmentationLevelSetFunction<TImageType, TFeatureImageType>
95 {
96 public:
97  ITK_DISALLOW_COPY_AND_MOVE(GeodesicActiveContourShapePriorLevelSetFunction);
98 
104  using FeatureImageType = TFeatureImageType;
105 
107  itkNewMacro(Self);
108 
111 
113  using ImageType = typename Superclass::ImageType;
114  using NeighborhoodType = typename Superclass::NeighborhoodType;
115  using ScalarValueType = typename Superclass::ScalarValueType;
116  using FeatureScalarType = typename Superclass::FeatureScalarType;
117  using RadiusType = typename Superclass::RadiusType;
118  using FloatOffsetType = typename Superclass::FloatOffsetType;
119  using VectorImageType = typename Superclass::VectorImageType;
120  using GlobalDataStruct = typename Superclass::GlobalDataStruct;
121 
123  static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
124 
126  void
127  CalculateSpeedImage() override;
128 
130  void
131  CalculateAdvectionImage() override;
132 
135  CurvatureSpeed(const NeighborhoodType & neighborhood,
136  const FloatOffsetType & offset,
137  GlobalDataStruct * gd) const override
138  {
139  return this->PropagationSpeed(neighborhood, offset, gd);
140  }
141 
144  void
145  SetDerivativeSigma(const double v)
146  {
147  m_DerivativeSigma = v;
148  }
149  double
151  {
152  return m_DerivativeSigma;
153  }
155 
156  void
157  Initialize(const RadiusType & r) override
158  {
159  Superclass::Initialize(r);
160 
161  this->SetAdvectionWeight(NumericTraits<ScalarValueType>::OneValue());
162  this->SetPropagationWeight(NumericTraits<ScalarValueType>::OneValue());
163  this->SetCurvatureWeight(NumericTraits<ScalarValueType>::OneValue());
164  this->SetShapePriorWeight(NumericTraits<ScalarValueType>::OneValue());
165  }
166 
167 protected:
169  {
170  this->SetAdvectionWeight(NumericTraits<ScalarValueType>::OneValue());
171  this->SetPropagationWeight(NumericTraits<ScalarValueType>::OneValue());
172  this->SetCurvatureWeight(NumericTraits<ScalarValueType>::OneValue());
173  this->SetShapePriorWeight(NumericTraits<ScalarValueType>::OneValue());
174 
175  m_DerivativeSigma = 1.0;
176  }
177 
179 
180  void
181  PrintSelf(std::ostream & os, Indent indent) const override;
182 
183 private:
185 };
186 } // end namespace itk
187 
188 #ifndef ITK_MANUAL_INSTANTIATION
189 # include "itkGeodesicActiveContourShapePriorLevelSetFunction.hxx"
190 #endif
191 
192 #endif
itk::FiniteDifferenceFunction::RadiusType
typename ConstNeighborhoodIterator< TImageType >::RadiusType RadiusType
Definition: itkFiniteDifferenceFunction.h:97
itk::GeodesicActiveContourShapePriorLevelSetFunction::Initialize
void Initialize(const RadiusType &r) override
Definition: itkGeodesicActiveContourShapePriorLevelSetFunction.h:157
itk::GeodesicActiveContourShapePriorLevelSetFunction::FeatureImageType
TFeatureImageType FeatureImageType
Definition: itkGeodesicActiveContourShapePriorLevelSetFunction.h:104
itk::GeodesicActiveContourShapePriorLevelSetFunction::CurvatureSpeed
ScalarValueType CurvatureSpeed(const NeighborhoodType &neighborhood, const FloatOffsetType &offset, GlobalDataStruct *gd) const override
Definition: itkGeodesicActiveContourShapePriorLevelSetFunction.h:135
itk::Vector
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
itk::ShapePriorSegmentationLevelSetFunction
This function is used in ShapePriorSegmentationLevelSetFilter to segment structures in an image based...
Definition: itkShapePriorSegmentationLevelSetFunction.h:55
itk::GeodesicActiveContourShapePriorLevelSetFunction::ScalarValueType
typename Superclass::ScalarValueType ScalarValueType
Definition: itkGeodesicActiveContourShapePriorLevelSetFunction.h:115
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::FiniteDifferenceFunction::ImageType
TImageType ImageType
Definition: itkFiniteDifferenceFunction.h:82
itk::GeodesicActiveContourShapePriorLevelSetFunction::m_DerivativeSigma
double m_DerivativeSigma
Definition: itkGeodesicActiveContourShapePriorLevelSetFunction.h:184
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::GeodesicActiveContourShapePriorLevelSetFunction::GlobalDataStruct
typename Superclass::GlobalDataStruct GlobalDataStruct
Definition: itkGeodesicActiveContourShapePriorLevelSetFunction.h:120
itk::GeodesicActiveContourShapePriorLevelSetFunction
This function is used in GeodesicActiveContourShapePriorSegmentationLevelSetFilter to segment structu...
Definition: itkGeodesicActiveContourShapePriorLevelSetFunction.h:93
itk::GeodesicActiveContourShapePriorLevelSetFunction::GetDerivativeSigma
double GetDerivativeSigma()
Definition: itkGeodesicActiveContourShapePriorLevelSetFunction.h:150
itk::GeodesicActiveContourShapePriorLevelSetFunction::VectorImageType
typename Superclass::VectorImageType VectorImageType
Definition: itkGeodesicActiveContourShapePriorLevelSetFunction.h:119
itk::NumericTraits
Define additional traits for native types such as int or float.
Definition: itkNumericTraits.h:58
itk::GeodesicActiveContourShapePriorLevelSetFunction::SetDerivativeSigma
void SetDerivativeSigma(const double v)
Definition: itkGeodesicActiveContourShapePriorLevelSetFunction.h:145
itk::GeodesicActiveContourShapePriorLevelSetFunction::GeodesicActiveContourShapePriorLevelSetFunction
GeodesicActiveContourShapePriorLevelSetFunction()
Definition: itkGeodesicActiveContourShapePriorLevelSetFunction.h:168
itkShapePriorSegmentationLevelSetFunction.h
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ConstNeighborhoodIterator
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
Definition: itkConstNeighborhoodIterator.h:51
itk::GeodesicActiveContourShapePriorLevelSetFunction::FeatureScalarType
typename Superclass::FeatureScalarType FeatureScalarType
Definition: itkGeodesicActiveContourShapePriorLevelSetFunction.h:116