ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkShapePriorMAPCostFunction.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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:
51  public ShapePriorMAPCostFunctionBase< TFeatureImage, TOutputPixel >
52 {
53 public:
54  ITK_DISALLOW_COPY_AND_ASSIGN(ShapePriorMAPCostFunction);
55 
61 
63  itkNewMacro(Self);
64 
67 
70  using ParametersType = typename Superclass::ParametersType;
71 
73  using FeatureImageType = typename Superclass::FeatureImageType;
74  using FeatureImagePointer = typename Superclass::FeatureImagePointer;
75 
77  using MeasureType = typename Superclass::MeasureType;
78 
80  static constexpr unsigned int ImageDimension = TFeatureImage::ImageDimension;
81 
83  using PixelType = typename Superclass::PixelType;
84 
86  using NodeType = typename Superclass::NodeType;
87 
89  using NodeContainerType = typename Superclass::NodeContainerType;
90 
92  using ShapeFunctionType = typename Superclass::ShapeFunctionType;
93 
98 
100  itkSetMacro(ShapeParameterMeans, ArrayType);
101  itkGetConstMacro(ShapeParameterMeans, ArrayType);
103 
105  itkSetMacro(ShapeParameterStandardDeviations, ArrayType);
106  itkGetConstMacro(ShapeParameterStandardDeviations, ArrayType);
108 
114  itkSetMacro(Weights, WeightsType);
115  itkGetConstReferenceMacro(Weights, WeightsType);
117 
123  MeasureType ComputeLogInsideTerm(const ParametersType & parameters) const override;
124 
130  MeasureType ComputeLogGradientTerm(const ParametersType & parameters) const override;
131 
136  MeasureType ComputeLogShapePriorTerm(const ParametersType & parameters) const override;
137 
141  MeasureType ComputeLogPosePriorTerm(const ParametersType & parameters) const override;
142 
145  void Initialize() override;
146 
147 protected:
149  ~ShapePriorMAPCostFunction() override = default;
150 
151  void PrintSelf(std::ostream & os, Indent indent) const override;
152 
153 private:
157 
159 };
160 } // end namespace itk
161 
162 #ifndef ITK_MANUAL_INSTANTIATION
163 #include "itkShapePriorMAPCostFunction.hxx"
164 #endif
165 
166 #endif
Light weight base class for most itk classes.
typename Superclass::PixelType PixelType
typename Superclass::FeatureImagePointer FeatureImagePointer
typename Superclass::ShapeFunctionType ShapeFunctionType
GaussianKernelFunction< double >::Pointer m_GaussianFunction
Represents the maximum aprior (MAP) cost function used ShapePriorSegmentationLevelSetImageFilter to e...
Represents the base class of maximum aprior (MAP) cost function used ShapePriorSegmentationLevelSetIm...
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename Superclass::FeatureImageType FeatureImageType
typename Superclass::NodeType NodeType
Gaussian kernel used for density estimation and nonparameteric regression.
typename Superclass::NodeContainerType NodeContainerType