ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkShapePriorMAPCostFunctionBase.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 itkShapePriorMAPCostFunctionBase_h
19#define itkShapePriorMAPCostFunctionBase_h
20
22#include "itkLevelSet.h"
24
25namespace itk
26{
43template <typename TFeatureImage, typename TOutputPixel>
45{
46public:
47 ITK_DISALLOW_COPY_AND_MOVE(ShapePriorMAPCostFunctionBase);
48
54
56 itkOverrideGetNameOfClassMacro(ShapePriorMAPCostFunctionBase);
57
60 using typename Superclass::MeasureType;
61
64 using typename Superclass::DerivativeType;
65
68 using typename Superclass::ParametersType;
69
71 using FeatureImageType = TFeatureImage;
72 using FeatureImagePointer = typename FeatureImageType::ConstPointer;
73
75 static constexpr unsigned int ImageDimension = TFeatureImage::ImageDimension;
76
78 using PixelType = TOutputPixel;
79
82
86
90
92 itkSetObjectMacro(ShapeFunction, ShapeFunctionType);
93 itkGetModifiableObjectMacro(ShapeFunction, ShapeFunctionType);
95
97 itkSetConstObjectMacro(ActiveRegion, NodeContainerType);
98 itkGetConstObjectMacro(ActiveRegion, NodeContainerType);
100
102 itkSetConstObjectMacro(FeatureImage, FeatureImageType);
103 itkGetConstObjectMacro(FeatureImage, FeatureImageType);
105
109 GetValue(const ParametersType & parameters) const override;
110
113 void
114 GetDerivative(const ParametersType &, DerivativeType &) const override
115 {
116 itkExceptionMacro("This function is currently not supported.");
117 }
118
120 unsigned int
121 GetNumberOfParameters() const override
122 {
123 return m_ShapeFunction->GetNumberOfParameters();
124 }
125
128 virtual MeasureType
130
133 virtual MeasureType
135
138 virtual MeasureType
140
143 virtual MeasureType
145
148 virtual void
150
151protected:
153 ~ShapePriorMAPCostFunctionBase() override = default;
154
155 void
156 PrintSelf(std::ostream & os, Indent indent) const override;
157
160
162};
163} // end namespace itk
164
165#ifndef ITK_MANUAL_INSTANTIATION
166# include "itkShapePriorMAPCostFunctionBase.hxx"
167#endif
168
169#endif
Control indentation during Print() invocation.
Definition itkIndent.h:50
Represent a node in a level set.
LevelSetNode< PixelType, Self::ImageDimension > NodeType
void PrintSelf(std::ostream &os, Indent indent) const override
virtual MeasureType ComputeLogPosePriorTerm(const ParametersType &) const =0
typename ShapeFunctionType::Pointer ShapeFunctionPointer
typename NodeContainerType::ConstPointer NodeContainerPointer
ShapeSignedDistanceFunction< double, Self::ImageDimension > ShapeFunctionType
void GetDerivative(const ParametersType &, DerivativeType &) const override
VectorContainer< unsigned int, NodeType > NodeContainerType
~ShapePriorMAPCostFunctionBase() override=default
typename FeatureImageType::ConstPointer FeatureImagePointer
virtual MeasureType ComputeLogInsideTerm(const ParametersType &) const =0
MeasureType GetValue(const ParametersType &parameters) const override
virtual MeasureType ComputeLogShapePriorTerm(const ParametersType &) const =0
virtual MeasureType ComputeLogGradientTerm(const ParametersType &) const =0
Base class for functions which evaluates the signed distance from a shape.
Array< ParametersValueType > DerivativeType
Superclass::ParametersType ParametersType
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
detail::VectorContainer< std::conditional_t< std::is_void_v< T2 >, SizeValueType, T1 >, std::conditional_t< std::is_void_v< T2 >, T1, T2 > > VectorContainer