ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkShapePriorSegmentationLevelSetImageFilter.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 itkShapePriorSegmentationLevelSetImageFilter_h
19#define itkShapePriorSegmentationLevelSetImageFilter_h
20
25#include "itkMath.h"
26
27namespace itk
28{
68template <typename TInputImage, typename TFeatureImage, typename TOutputPixelType = float>
70 : public SegmentationLevelSetImageFilter<TInputImage, TFeatureImage, TOutputPixelType>
71{
72public:
73 ITK_DISALLOW_COPY_AND_MOVE(ShapePriorSegmentationLevelSetImageFilter);
74
76 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
77
83
85 itkOverrideGetNameOfClassMacro(ShapePriorSegmentationLevelSetImageFilter);
86
88 using typename Superclass::ValueType;
89 using typename Superclass::OutputImageType;
90 using typename Superclass::FeatureImageType;
91
93 using OutputPixelType = TOutputPixelType;
94
97
100 using ShapeFunctionPointer = typename ShapeFunctionType::Pointer;
101
106
110 using NodeContainerPointer = typename NodeContainerType::Pointer;
111
116
118 virtual void
120 itkGetModifiableObjectMacro(ShapeFunction, ShapeFunctionType);
122
124 itkSetObjectMacro(CostFunction, CostFunctionType);
125 itkGetModifiableObjectMacro(CostFunction, CostFunctionType);
127
129 itkSetObjectMacro(Optimizer, OptimizerType);
130 itkGetModifiableObjectMacro(Optimizer, OptimizerType);
132
137 itkSetMacro(InitialParameters, ParametersType);
138 itkGetConstMacro(InitialParameters, ParametersType);
140
142 void
144 {
145 if (Math::NotExactlyEquals(v, m_ShapePriorSegmentationFunction->GetShapePriorWeight()))
146 {
147 m_ShapePriorSegmentationFunction->SetShapePriorWeight(v);
148 this->Modified();
149 }
150 }
151
152
153 ValueType
155 {
156 return m_ShapePriorSegmentationFunction->GetShapePriorWeight();
157 }
158
161 virtual void
163
169
171 itkGetConstReferenceMacro(CurrentParameters, ParametersType);
172
173protected:
176
177 void
178 PrintSelf(std::ostream & os, Indent indent) const override;
179
182 void
184
187 void
188 GenerateData() override;
189
191 void
193
194private:
200
202};
203} // end namespace itk
204
205#ifndef ITK_MANUAL_INSTANTIATION
206# include "itkShapePriorSegmentationLevelSetImageFilter.hxx"
207#endif
208
209#endif
Control indentation during Print() invocation.
Definition itkIndent.h:50
virtual void Modified() const
Generic representation for an optimization method.
Represents the base class of maximum aprior (MAP) cost function used ShapePriorSegmentationLevelSetIm...
This function is used in ShapePriorSegmentationLevelSetFilter to segment structures in an image based...
virtual void SetShapePriorSegmentationFunction(ShapePriorSegmentationFunctionType *s)
virtual void SetShapeFunction(ShapeFunctionType *s)
~ShapePriorSegmentationLevelSetImageFilter() override=default
ShapePriorSegmentationLevelSetFunction< OutputImageType, FeatureImageType > ShapePriorSegmentationFunctionType
void PrintSelf(std::ostream &os, Indent indent) const override
void ExtractActiveRegion(NodeContainerType *ptr)
virtual ShapePriorSegmentationFunctionType * GetShapePriorSegmentationFunction()
This class is a base for the Optimization methods that optimize a single valued function.
Implements transparent reference counting.
bool NotExactlyEquals(const TInput1 &x1, const TInput2 &x2)
Definition itkMath.h:731
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
CostFunctionTemplate< double > CostFunction