ITK  6.0.0
Insight Toolkit
itkGeodesicActiveContourLevelSetFunction.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 * https://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
23namespace itk
24{
76template <typename TImageType, typename TFeatureImageType = TImageType>
78 : public SegmentationLevelSetFunction<TImageType, TFeatureImageType>
79{
80public:
81 ITK_DISALLOW_COPY_AND_MOVE(GeodesicActiveContourLevelSetFunction);
82
88 using FeatureImageType = TFeatureImageType;
89
91 itkNewMacro(Self);
92
94 itkOverrideGetNameOfClassMacro(GeodesicActiveContourLevelSetFunction);
95
97 using typename Superclass::ImageType;
98 using typename Superclass::NeighborhoodType;
99 using typename Superclass::ScalarValueType;
100 using typename Superclass::FeatureScalarType;
101 using typename Superclass::RadiusType;
102 using typename Superclass::FloatOffsetType;
103 using typename Superclass::VectorImageType;
104 using typename Superclass::GlobalDataStruct;
105
107 static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
108
110 void
112
114 void
116
119 CurvatureSpeed(const NeighborhoodType & neighborhood,
120 const FloatOffsetType & offset,
121 GlobalDataStruct * gd) const override
122 {
123 return this->PropagationSpeed(neighborhood, offset, gd);
124 }
125
128 void
129 SetDerivativeSigma(const double v)
130 {
131 m_DerivativeSigma = v;
132 }
133 double
135 {
136 return m_DerivativeSigma;
137 }
140 void
141 Initialize(const RadiusType & r) override
142 {
143 Superclass::Initialize(r);
144
145 this->SetAdvectionWeight(NumericTraits<ScalarValueType>::OneValue());
146 this->SetPropagationWeight(NumericTraits<ScalarValueType>::OneValue());
147 this->SetCurvatureWeight(NumericTraits<ScalarValueType>::OneValue());
148 }
149
150protected:
152 {
153 this->SetAdvectionWeight(NumericTraits<ScalarValueType>::OneValue());
154 this->SetPropagationWeight(NumericTraits<ScalarValueType>::OneValue());
155 this->SetCurvatureWeight(NumericTraits<ScalarValueType>::OneValue());
156
157 m_DerivativeSigma = 1.0;
158 }
159
161
162 void
163 PrintSelf(std::ostream & os, Indent indent) const override;
164
165private:
166 double m_DerivativeSigma{};
167};
168} // end namespace itk
169
170#ifndef ITK_MANUAL_INSTANTIATION
171# include "itkGeodesicActiveContourLevelSetFunction.hxx"
172#endif
173
174#endif
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
typename ConstNeighborhoodIterator< TImageType >::RadiusType RadiusType
This function is used in GeodesicActiveContourLevelSetImageFilter to segment structures in an image b...
ScalarValueType CurvatureSpeed(const NeighborhoodType &neighborhood, const FloatOffsetType &offset, GlobalDataStruct *gd) const override
~GeodesicActiveContourLevelSetFunction() override=default
void PrintSelf(std::ostream &os, Indent indent) const override
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
Define additional traits for native types such as int or float.
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:63
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....