ITK  6.0.0
Insight Toolkit
itkLaplacianSegmentationLevelSetFunction.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 itkLaplacianSegmentationLevelSetFunction_h
19#define itkLaplacianSegmentationLevelSetFunction_h
20
22
23namespace itk
24{
33template <typename TImageType, typename TFeatureImageType = TImageType>
35 : public SegmentationLevelSetFunction<TImageType, TFeatureImageType>
36{
37public:
38 ITK_DISALLOW_COPY_AND_MOVE(LaplacianSegmentationLevelSetFunction);
39
45 using FeatureImageType = TFeatureImageType;
46
48 itkNewMacro(Self);
49
51 itkOverrideGetNameOfClassMacro(LaplacianSegmentationLevelSetFunction);
52
54 using typename Superclass::ImageType;
55 using typename Superclass::ScalarValueType;
56 using typename Superclass::FeatureScalarType;
57 using typename Superclass::RadiusType;
58
60 static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
61
62 void
64
65 void
66 Initialize(const RadiusType & r) override
67 {
68 Superclass::Initialize(r);
69
70 this->SetAdvectionWeight(ScalarValueType{});
71 this->SetPropagationWeight(-1.0 * NumericTraits<ScalarValueType>::OneValue());
72 this->SetCurvatureWeight(NumericTraits<ScalarValueType>::OneValue());
73 }
74
81 void
82 SetAdvectionWeight(const ScalarValueType value) override
83 {
85 {
86 Superclass::SetAdvectionWeight(value);
87 }
88 }
91protected:
93 {
94 this->SetAdvectionWeight(0.0);
95 this->SetPropagationWeight(1.0);
96 this->SetCurvatureWeight(1.0);
97 }
98
100};
101} // end namespace itk
102
103#ifndef ITK_MANUAL_INSTANTIATION
104# include "itkLaplacianSegmentationLevelSetFunction.hxx"
105# include "itkMath.h"
106#endif
107
108#endif
typename ConstNeighborhoodIterator< TImageType >::RadiusType RadiusType
This function is used in LaplacianSegmentationImageFilter to segment structures in an image based Lap...
~LaplacianSegmentationLevelSetFunction() override=default
void SetAdvectionWeight(const ScalarValueType value) override
Light weight base class for most itk classes.
Define additional traits for native types such as int or float.
bool ExactlyEquals(const TInput1 &x1, const TInput2 &x2)
Return the result of an exact comparison between two scalar values of potentially different types.
Definition: itkMath.h:726
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....