ITK  4.2.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< class TFeatureImage, class TOutputPixel >
50 class ITK_EXPORT ShapePriorMAPCostFunction:
51  public ShapePriorMAPCostFunctionBase< TFeatureImage, TOutputPixel >
52 {
53 public:
59 
61  itkNewMacro(Self);
62 
65 
68  typedef typename Superclass::ParametersType ParametersType;
69 
71  typedef typename Superclass::FeatureImageType FeatureImageType;
72  typedef typename Superclass::FeatureImagePointer FeatureImagePointer;
73 
75  typedef typename Superclass::MeasureType MeasureType;
76 
78  itkStaticConstMacro(ImageDimension, unsigned int, TFeatureImage::ImageDimension);
79 
81  typedef typename Superclass::PixelType PixelType;
82 
84  typedef typename Superclass::NodeType NodeType;
85 
87  typedef typename Superclass::NodeContainerType NodeContainerType;
88 
90  typedef typename Superclass::ShapeFunctionType ShapeFunctionType;
91 
96 
98  itkSetMacro(ShapeParameterMeans, ArrayType);
99  itkGetConstMacro(ShapeParameterMeans, ArrayType);
101 
103  itkSetMacro(ShapeParameterStandardDeviations, ArrayType);
104  itkGetConstMacro(ShapeParameterStandardDeviations, ArrayType);
106 
112  itkSetMacro(Weights, WeightsType);
113  itkGetConstReferenceMacro(Weights, WeightsType);
115 
121  virtual MeasureType ComputeLogInsideTerm(const ParametersType & parameters) const;
122 
128  virtual MeasureType ComputeLogGradientTerm(const ParametersType & parameters) const;
129 
134  virtual MeasureType ComputeLogShapePriorTerm(const ParametersType & parameters) const;
135 
139  virtual MeasureType ComputeLogPosePriorTerm(const ParametersType & parameters) const;
140 
143  virtual void Initialize(void)
144  throw ( ExceptionObject );
145 
146 protected:
148  virtual ~ShapePriorMAPCostFunction() {}
149 
150  void PrintSelf(std::ostream & os, Indent indent) const;
151 
152 private:
153  ShapePriorMAPCostFunction(const Self &); //purposely not implemented
154  void operator=(const Self &); //purposely not implemented
155 
159 
161 };
162 } // end namespace itk
163 
164 #ifndef ITK_MANUAL_INSTANTIATION
165 #include "itkShapePriorMAPCostFunction.hxx"
166 #endif
167 
168 #endif
169