ITK  6.0.0
Insight Toolkit
itkScalarChanAndVeseLevelSetFunctionData.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 itkScalarChanAndVeseLevelSetFunctionData_h
19#define itkScalarChanAndVeseLevelSetFunctionData_h
20
22
23namespace itk
24{
57template <typename TInputImage, typename TFeatureImage>
59 : public RegionBasedLevelSetFunctionData<TInputImage, TFeatureImage>
60{
61public:
62 ITK_DISALLOW_COPY_AND_MOVE(ScalarChanAndVeseLevelSetFunctionData);
63
68
69 static constexpr unsigned int ImageDimension = TFeatureImage::ImageDimension;
70
72 itkNewMacro(Self);
73
74 itkOverrideGetNameOfClassMacro(ScalarChanAndVeseLevelSetFunctionData);
75
76 using InputImageType = TInputImage;
77 using typename Superclass::InputImagePointer;
78 using typename Superclass::InputImageConstPointer;
79 using typename Superclass::InputPixelType;
80 using typename Superclass::InputRegionType;
81 using typename Superclass::InputSizeType;
82 using typename Superclass::InputSizeValueType;
83 using typename Superclass::InputSpacingType;
84 using typename Superclass::InputIndexType;
85 using typename Superclass::InputIndexValueType;
86 using typename Superclass::InputPointType;
87
88 using FeatureImageType = TFeatureImage;
89 using typename Superclass::FeatureImagePointer;
90 using typename Superclass::FeatureImageConstPointer;
91 using typename Superclass::FeaturePixelType;
92 using typename Superclass::FeatureRegionType;
93 using typename Superclass::FeatureSizeType;
94 using typename Superclass::FeatureSizeValueType;
95 using typename Superclass::FeatureSpacingType;
96 using typename Superclass::FeatureIndexType;
97 using typename Superclass::FeaturePointType;
98
99 double m_BackgroundConstantValues{};
100 double m_ForegroundConstantValues{};
101 double m_WeightedSumOfPixelValuesInsideLevelSet{};
102 double m_WeightedSumOfPixelValuesOutsideLevelSet{};
103
104protected:
106 : Superclass()
107 {
108 m_BackgroundConstantValues = 0.;
109 m_ForegroundConstantValues = 0.;
110 m_WeightedSumOfPixelValuesInsideLevelSet = 0.;
111 m_WeightedSumOfPixelValuesOutsideLevelSet = 0.;
112 }
113
115};
116} // end namespace itk
117
118#endif
Light weight base class for most itk classes.
Helper class used to share data in the ScalarChanAndVeseLevelSetFunction.
Helper class used to share data in the ScalarChanAndVeseLevelSetFunction.
~ScalarChanAndVeseLevelSetFunctionData() override=default
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....