ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkGeodesicActiveContourShapePriorLevelSetFunction.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 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_ASSIGN(GeodesicActiveContourShapePriorLevelSetFunction);
98 
104  using FeatureImageType = TFeatureImageType;
105 
107  itkNewMacro(Self);
108 
112 
114  using ImageType = typename Superclass::ImageType;
115  using NeighborhoodType = typename Superclass::NeighborhoodType;
116  using ScalarValueType = typename Superclass::ScalarValueType;
117  using FeatureScalarType = typename Superclass::FeatureScalarType;
118  using RadiusType = typename Superclass::RadiusType;
119  using FloatOffsetType = typename Superclass::FloatOffsetType;
120  using VectorImageType = typename Superclass::VectorImageType;
121  using GlobalDataStruct = typename Superclass::GlobalDataStruct;
122 
124  static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
125 
127  void CalculateSpeedImage() override;
128 
130  void CalculateAdvectionImage() override;
131 
134  const FloatOffsetType & offset, GlobalDataStruct *gd) const override
135  { return this->PropagationSpeed(neighborhood, offset, gd); }
136 
139  void SetDerivativeSigma(const double v)
140  { m_DerivativeSigma = v; }
142  { return m_DerivativeSigma; }
144 
145  void Initialize(const RadiusType & r) override
146  {
147  Superclass::Initialize(r);
148 
149  this->SetAdvectionWeight(NumericTraits< ScalarValueType >::OneValue());
150  this->SetPropagationWeight(NumericTraits< ScalarValueType >::OneValue());
151  this->SetCurvatureWeight(NumericTraits< ScalarValueType >::OneValue());
152  this->SetShapePriorWeight(NumericTraits< ScalarValueType >::OneValue());
153  }
154 
155 protected:
157  {
158  this->SetAdvectionWeight(NumericTraits< ScalarValueType >::OneValue());
159  this->SetPropagationWeight(NumericTraits< ScalarValueType >::OneValue());
160  this->SetCurvatureWeight(NumericTraits< ScalarValueType >::OneValue());
161  this->SetShapePriorWeight(NumericTraits< ScalarValueType >::OneValue());
162 
163  m_DerivativeSigma = 1.0;
164  }
165 
167 
168  void PrintSelf(std::ostream & os, Indent indent) const override;
169 
170 private:
172 };
173 } // end namespace itk
174 
175 #ifndef ITK_MANUAL_INSTANTIATION
176 #include "itkGeodesicActiveContourShapePriorLevelSetFunction.hxx"
177 #endif
178 
179 #endif
Light weight base class for most itk classes.
Define numeric traits for std::vector.
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
This function is used in ShapePriorSegmentationLevelSetFilter to segment structures in an image based...
typename ConstNeighborhoodIterator< TImageType >::RadiusType RadiusType
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
This function is used in GeodesicActiveContourShapePriorSegmentationLevelSetFilter to segment structu...
Control indentation during Print() invocation.
Definition: itkIndent.h:49
ScalarValueType CurvatureSpeed(const NeighborhoodType &neighborhood, const FloatOffsetType &offset, GlobalDataStruct *gd) const override