ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkScalarChanAndVeseLevelSetFunction.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 itkScalarChanAndVeseLevelSetFunction_h
19#define itkScalarChanAndVeseLevelSetFunction_h
20
24
25namespace itk
26{
63template <typename TInputImage,
64 typename TFeatureImage,
66 TInputImage,
67 TFeatureImage,
69class ITK_TEMPLATE_EXPORT ScalarChanAndVeseLevelSetFunction
70 : public ScalarRegionBasedLevelSetFunction<TInputImage, TFeatureImage, TSharedData>
71{
72public:
73 ITK_DISALLOW_COPY_AND_MOVE(ScalarChanAndVeseLevelSetFunction);
74
79
81 itkNewMacro(Self);
82
84 itkOverrideGetNameOfClassMacro(ScalarChanAndVeseLevelSetFunction);
85
86 static constexpr unsigned int ImageDimension = TFeatureImage::ImageDimension;
87
88 using InputImageType = TInputImage;
90 using typename Superclass::InputImagePointer;
91 using typename Superclass::InputPixelType;
92 using typename Superclass::InputIndexType;
94 using typename Superclass::InputSizeType;
95 using typename Superclass::InputSizeValueType;
96 using typename Superclass::InputRegionType;
97 using typename Superclass::InputPointType;
98
99 using FeatureImageType = TFeatureImage;
100 using FeatureImageConstPointer = typename FeatureImageType::ConstPointer;
101 using typename Superclass::FeaturePixelType;
102 using typename Superclass::FeatureIndexType;
103 using typename Superclass::FeatureOffsetType;
104
105 using typename Superclass::ScalarValueType;
106 using typename Superclass::NeighborhoodType;
107 using typename Superclass::FloatOffsetType;
108 using typename Superclass::RadiusType;
109 using typename Superclass::TimeStepType;
110 using typename Superclass::GlobalDataStruct;
111 using typename Superclass::PixelType;
112 using typename Superclass::VectorType;
113
114 using typename Superclass::SharedDataType;
115 using typename Superclass::SharedDataPointer;
116
117 using typename Superclass::ImageIteratorType;
121
122 using typename Superclass::ListPixelType;
124 using typename Superclass::ListPixelIterator;
125 using typename Superclass::ListImageType;
126
127protected:
132
133 void
135
136 void
138
139 ScalarValueType
140 ComputeInternalTerm(const FeaturePixelType & iValue, const FeatureIndexType & iIdx) override;
141
142 ScalarValueType
143 ComputeExternalTerm(const FeaturePixelType & iValue, const FeatureIndexType & iIdx) override;
144
145 void
146 UpdateSharedDataInsideParameters(const unsigned int & iId,
147 const FeaturePixelType & iVal,
148 const ScalarValueType & iChange) override;
149
150 void
151 UpdateSharedDataOutsideParameters(const unsigned int & iId,
152 const FeaturePixelType & iVal,
153 const ScalarValueType & iChange) override;
154};
155} // namespace itk
156
157#ifndef ITK_MANUAL_INSTANTIATION
158# include "itkScalarChanAndVeseLevelSetFunction.hxx"
159#endif
160
161#endif
Helper class used to share data in the ScalarChanAndVeseLevelSetFunction.
ConstNeighborhoodIterator< TImageType, DefaultBoundaryConditionType > NeighborhoodType
Vector< float, Self::ImageDimension > FloatOffsetType
typename ImageType::PixelType PixelType
typename ConstNeighborhoodIterator< TImageType >::RadiusType RadiusType
Helper class used to share data in the ScalarChanAndVeseLevelSetFunction.
void UpdateSharedDataInsideParameters(const unsigned int &iId, const FeaturePixelType &iVal, const ScalarValueType &iChange) override
typename FeatureImageType::ConstPointer FeatureImageConstPointer
ScalarRegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData > Superclass
~ScalarChanAndVeseLevelSetFunction() override=default
void UpdateSharedDataOutsideParameters(const unsigned int &iId, const FeaturePixelType &iVal, const ScalarValueType &iChange) override
ScalarValueType ComputeInternalTerm(const FeaturePixelType &iValue, const FeatureIndexType &iIdx) override
ScalarValueType ComputeExternalTerm(const FeaturePixelType &iValue, const FeatureIndexType &iIdx) override
LevelSet function that computes a speed image based on regional integrals.
ImageRegionConstIteratorWithIndex< InputImageType > ConstImageIteratorType
ImageRegionConstIterator< FeatureImageType > ConstFeatureIteratorType
ImageRegionIteratorWithIndex< FeatureImageType > FeatureImageIteratorType
ImageRegionIteratorWithIndex< InputImageType > ImageIteratorType
typename ListPixelType::const_iterator ListPixelConstIterator
Image< ListPixelType, Self::ImageDimension > ListImageType
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....