ITK  6.0.0
Insight Toolkit
itkShapeDetectionLevelSetFunction.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 itkShapeDetectionLevelSetFunction_h
19#define itkShapeDetectionLevelSetFunction_h
20
22
23namespace itk
24{
71template <typename TImageType, typename TFeatureImageType = TImageType>
72class ITK_TEMPLATE_EXPORT ShapeDetectionLevelSetFunction
73 : public SegmentationLevelSetFunction<TImageType, TFeatureImageType>
74{
75public:
76 ITK_DISALLOW_COPY_AND_MOVE(ShapeDetectionLevelSetFunction);
77
83 using FeatureImageType = TFeatureImageType;
84
86 itkNewMacro(Self);
87
89 itkOverrideGetNameOfClassMacro(ShapeDetectionLevelSetFunction);
90
92 using typename Superclass::ImageType;
93 using typename Superclass::NeighborhoodType;
94 using typename Superclass::ScalarValueType;
95 using typename Superclass::FeatureScalarType;
96 using typename Superclass::RadiusType;
97 using typename Superclass::FloatOffsetType;
98 using typename Superclass::GlobalDataStruct;
99
101 static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
102
103 void
105
108 CurvatureSpeed(const NeighborhoodType & neighborhood,
109 const FloatOffsetType & offset,
110 GlobalDataStruct * gd) const override
111 {
112 return this->PropagationSpeed(neighborhood, offset, gd);
113 }
114
115 void
116 Initialize(const RadiusType & r) override
117 {
118 Superclass::Initialize(r);
119
120 this->SetAdvectionWeight(ScalarValueType{});
121 this->SetPropagationWeight(NumericTraits<ScalarValueType>::OneValue());
122 this->SetCurvatureWeight(NumericTraits<ScalarValueType>::OneValue());
123 }
124
125protected:
127 {
128 this->SetAdvectionWeight(ScalarValueType{});
129 this->SetPropagationWeight(NumericTraits<ScalarValueType>::OneValue());
130 this->SetCurvatureWeight(NumericTraits<ScalarValueType>::OneValue());
131 }
132
134};
135} // end namespace itk
136
137#ifndef ITK_MANUAL_INSTANTIATION
138# include "itkShapeDetectionLevelSetFunction.hxx"
139#endif
140
141#endif
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
typename ConstNeighborhoodIterator< TImageType >::RadiusType RadiusType
Light weight base class for most itk classes.
Define additional traits for native types such as int or float.
This function is used in the ShapeDetectionLevelSetImageFilter to segment structures in an image base...
~ShapeDetectionLevelSetFunction() override=default
ScalarValueType CurvatureSpeed(const NeighborhoodType &neighborhood, const FloatOffsetType &offset, GlobalDataStruct *gd) const override
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:63
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....