ITK  6.0.0
Insight Toolkit
itkShapePriorMAPCostFunction.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 itkShapePriorMAPCostFunction_h
19#define itkShapePriorMAPCostFunction_h
20
23
24namespace itk
25{
49template <typename TFeatureImage, typename TOutputPixel>
50class ITK_TEMPLATE_EXPORT ShapePriorMAPCostFunction : public ShapePriorMAPCostFunctionBase<TFeatureImage, TOutputPixel>
51{
52public:
53 ITK_DISALLOW_COPY_AND_MOVE(ShapePriorMAPCostFunction);
54
60
62 itkNewMacro(Self);
63
65 itkOverrideGetNameOfClassMacro(ShapePriorMAPCostFunction);
66
69 using typename Superclass::ParametersType;
70
72 using typename Superclass::FeatureImageType;
73 using typename Superclass::FeatureImagePointer;
74
76 using typename Superclass::MeasureType;
77
79 static constexpr unsigned int ImageDimension = TFeatureImage::ImageDimension;
80
82 using typename Superclass::PixelType;
83
85 using typename Superclass::NodeType;
86
88 using typename Superclass::NodeContainerType;
89
91 using typename Superclass::ShapeFunctionType;
92
97
99 itkSetMacro(ShapeParameterMeans, ArrayType);
100 itkGetConstMacro(ShapeParameterMeans, ArrayType);
104 itkSetMacro(ShapeParameterStandardDeviations, ArrayType);
105 itkGetConstMacro(ShapeParameterStandardDeviations, ArrayType);
113 itkSetMacro(Weights, WeightsType);
114 itkGetConstReferenceMacro(Weights, WeightsType);
123 ComputeLogInsideTerm(const ParametersType & parameters) const override;
124
131 ComputeLogGradientTerm(const ParametersType & parameters) const override;
132
138 ComputeLogShapePriorTerm(const ParametersType & parameters) const override;
139
144 ComputeLogPosePriorTerm(const ParametersType & parameters) const override;
145
148 void
149 Initialize() override;
150
151protected:
153 ~ShapePriorMAPCostFunction() override = default;
154
155 void
156 PrintSelf(std::ostream & os, Indent indent) const override;
157
158private:
159 ArrayType m_ShapeParameterMeans{};
160 ArrayType m_ShapeParameterStandardDeviations{};
161 WeightsType m_Weights{};
162
163 typename GaussianKernelFunction<double>::Pointer m_GaussianFunction{};
164};
165} // end namespace itk
166
167#ifndef ITK_MANUAL_INSTANTIATION
168# include "itkShapePriorMAPCostFunction.hxx"
169#endif
170
171#endif
Gaussian kernel used for density estimation and nonparametric regression.
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
Represents the base class of maximum aprior (MAP) cost function used ShapePriorSegmentationLevelSetIm...
Represents the maximum aprior (MAP) cost function used ShapePriorSegmentationLevelSetImageFilter to e...
MeasureType ComputeLogGradientTerm(const ParametersType &parameters) const override
~ShapePriorMAPCostFunction() override=default
MeasureType ComputeLogPosePriorTerm(const ParametersType &parameters) const override
MeasureType ComputeLogShapePriorTerm(const ParametersType &parameters) const override
void PrintSelf(std::ostream &os, Indent indent) const override
MeasureType ComputeLogInsideTerm(const ParametersType &parameters) const override
Superclass::ParametersType ParametersType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....