ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkShapePriorSegmentationLevelSetFunction.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 itkShapePriorSegmentationLevelSetFunction_h
19#define itkShapePriorSegmentationLevelSetFunction_h
20
23
24namespace itk
25{
50template <typename TImageType, typename TFeatureImageType = TImageType>
52 : public SegmentationLevelSetFunction<TImageType, TFeatureImageType>
53{
54public:
55 ITK_DISALLOW_COPY_AND_MOVE(ShapePriorSegmentationLevelSetFunction);
56
62 using FeatureImageType = TFeatureImageType;
63
65 itkNewMacro(Self);
66
68 itkOverrideGetNameOfClassMacro(ShapePriorSegmentationLevelSetFunction);
69
71 using typename Superclass::ImageType;
72 using typename Superclass::NeighborhoodType;
73 using typename Superclass::ScalarValueType;
74 using typename Superclass::FeatureScalarType;
75 using typename Superclass::RadiusType;
76 using typename Superclass::FloatOffsetType;
77 using typename Superclass::VectorImageType;
78 using typename Superclass::PixelType;
79 using typename Superclass::TimeStepType;
80 using typename Superclass::IndexType;
82
84 static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
85
89
91 void
96 ScalarValueType
98 {
99 return m_ShapePriorWeight;
100 }
101
102
105 void
107 {
108 m_ShapeFunction = ptr;
109 }
110 const ShapeFunctionType *
112 {
113 return m_ShapeFunction;
114 }
115
116
118 PixelType
119 ComputeUpdate(const NeighborhoodType & neighborhood,
120 void * gd,
121 const FloatOffsetType & = FloatOffsetType(0.0)) override;
122
125 ComputeGlobalTimeStep(void * gd) const override;
126
133
135 void *
136 GetGlobalDataPointer() const override
137 {
138 auto * ans = new ShapePriorGlobalDataStruct();
139
140 ans->m_MaxAdvectionChange = ScalarValueType{};
141 ans->m_MaxPropagationChange = ScalarValueType{};
142 ans->m_MaxCurvatureChange = ScalarValueType{};
143 ans->m_MaxShapePriorChange = ScalarValueType{};
144 return ans;
145 }
146
148 void
149 ReleaseGlobalDataPointer(void * GlobalData) const override
150 {
151 delete (ShapePriorGlobalDataStruct *)GlobalData;
152 }
153
154protected:
157
158 void
159 PrintSelf(std::ostream & os, Indent indent) const override;
160
161private:
164};
165} // end namespace itk
166
167#ifndef ITK_MANUAL_INSTANTIATION
168# include "itkShapePriorSegmentationLevelSetFunction.hxx"
169#endif
170
171#endif
typename ImageType::PixelType PixelType
Control indentation during Print() invocation.
Definition itkIndent.h:50
ConstNeighborhoodIterator< TImageType, DefaultBoundaryConditionType > NeighborhoodType
typename ConstNeighborhoodIterator< TImageType >::RadiusType RadiusType
PixelType ComputeUpdate(const NeighborhoodType &neighborhood, void *gd, const FloatOffsetType &=FloatOffsetType(0.0)) override
void PrintSelf(std::ostream &os, Indent indent) const override
~ShapePriorSegmentationLevelSetFunction() override=default
TimeStepType ComputeGlobalTimeStep(void *gd) const override
ConstNeighborhoodIterator< TImageType, DefaultBoundaryConditionType > NeighborhoodType
Base class for functions which evaluates the signed distance from a shape.
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....