ITK  5.2.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  * http://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 
24 namespace itk
25 {
49 template <typename TFeatureImage, typename TOutputPixel>
50 class ITK_TEMPLATE_EXPORT ShapePriorMAPCostFunction : public ShapePriorMAPCostFunctionBase<TFeatureImage, TOutputPixel>
51 {
52 public:
53  ITK_DISALLOW_COPY_AND_ASSIGN(ShapePriorMAPCostFunction);
54 
60 
62  itkNewMacro(Self);
63 
66 
69  using ParametersType = typename Superclass::ParametersType;
70 
72  using FeatureImageType = typename Superclass::FeatureImageType;
73  using FeatureImagePointer = typename Superclass::FeatureImagePointer;
74 
76  using MeasureType = typename Superclass::MeasureType;
77 
79  static constexpr unsigned int ImageDimension = TFeatureImage::ImageDimension;
80 
82  using PixelType = typename Superclass::PixelType;
83 
85  using NodeType = typename Superclass::NodeType;
86 
88  using NodeContainerType = typename Superclass::NodeContainerType;
89 
91  using ShapeFunctionType = typename Superclass::ShapeFunctionType;
92 
97 
99  itkSetMacro(ShapeParameterMeans, ArrayType);
100  itkGetConstMacro(ShapeParameterMeans, ArrayType);
102 
104  itkSetMacro(ShapeParameterStandardDeviations, ArrayType);
105  itkGetConstMacro(ShapeParameterStandardDeviations, ArrayType);
107 
113  itkSetMacro(Weights, WeightsType);
114  itkGetConstReferenceMacro(Weights, WeightsType);
116 
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 
151 protected:
153  ~ShapePriorMAPCostFunction() override = default;
154 
155  void
156  PrintSelf(std::ostream & os, Indent indent) const override;
157 
158 private:
162 
164 };
165 } // end namespace itk
166 
167 #ifndef ITK_MANUAL_INSTANTIATION
168 # include "itkShapePriorMAPCostFunction.hxx"
169 #endif
170 
171 #endif
itk::ShapePriorMAPCostFunction::NodeType
typename Superclass::NodeType NodeType
Definition: itkShapePriorMAPCostFunction.h:85
itk::SingleValuedCostFunction::MeasureType
double MeasureType
Definition: itkSingleValuedCostFunction.h:50
itk::OptimizerParameters< TInternalComputationValueType >
itk::GaussianKernelFunction
Gaussian kernel used for density estimation and nonparametric regression.
Definition: itkGaussianKernelFunction.h:41
itk::ShapePriorMAPCostFunction::ShapeFunctionType
typename Superclass::ShapeFunctionType ShapeFunctionType
Definition: itkShapePriorMAPCostFunction.h:91
itk::ShapePriorMAPCostFunction::NodeContainerType
typename Superclass::NodeContainerType NodeContainerType
Definition: itkShapePriorMAPCostFunction.h:88
itk::ShapePriorMAPCostFunction
Represents the maximum aprior (MAP) cost function used ShapePriorSegmentationLevelSetImageFilter to e...
Definition: itkShapePriorMAPCostFunction.h:50
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itkGaussianKernelFunction.h
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::ShapePriorMAPCostFunction::PixelType
typename Superclass::PixelType PixelType
Definition: itkShapePriorMAPCostFunction.h:82
itk::ShapePriorMAPCostFunction::m_ShapeParameterStandardDeviations
ArrayType m_ShapeParameterStandardDeviations
Definition: itkShapePriorMAPCostFunction.h:160
itk::ShapePriorMAPCostFunctionBase
Represents the base class of maximum aprior (MAP) cost function used ShapePriorSegmentationLevelSetIm...
Definition: itkShapePriorMAPCostFunctionBase.h:48
itk::ShapePriorMAPCostFunction::FeatureImageType
typename Superclass::FeatureImageType FeatureImageType
Definition: itkShapePriorMAPCostFunction.h:72
itk::FixedArray< double, 4 >
itk::ShapePriorMAPCostFunction::m_ShapeParameterMeans
ArrayType m_ShapeParameterMeans
Definition: itkShapePriorMAPCostFunction.h:159
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itkShapePriorMAPCostFunctionBase.h
itk::Array< double >
itk::ShapePriorMAPCostFunction::m_GaussianFunction
GaussianKernelFunction< double >::Pointer m_GaussianFunction
Definition: itkShapePriorMAPCostFunction.h:163
itk::ShapePriorMAPCostFunction::m_Weights
WeightsType m_Weights
Definition: itkShapePriorMAPCostFunction.h:161
itk::ShapePriorMAPCostFunction::FeatureImagePointer
typename Superclass::FeatureImagePointer FeatureImagePointer
Definition: itkShapePriorMAPCostFunction.h:73