ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkCumulativeGaussianCostFunction.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 itkCumulativeGaussianCostFunction_h
19 #define itkCumulativeGaussianCostFunction_h
20 
22 #include "ITKOptimizersExport.h"
23 
24 namespace itk
25 {
52 {
53 public:
54 
60 
63 
65  itkNewMacro(Self);
66 
68  typedef Superclass::ParametersType ParametersType;
69  typedef Superclass::MeasureType MeasureType;
70  typedef Superclass::DerivativeType DerivativeType;
71 
74  enum { SpaceDimension = 4 };
75 
77  void GetDerivative( const ParametersType & itkNotUsed(parameters),
78  DerivativeType & itkNotUsed(derivative) ) const ITK_OVERRIDE {}
79 
81  virtual MeasureType GetValue(const ParametersType & parameters) const ITK_OVERRIDE;
82 
84  MeasureType * GetValuePointer(ParametersType & parameters);
85 
87  double CalculateFitError(MeasureType *setTestArray);
88 
90  double EvaluateCumulativeGaussian(double argument) const;
91 
93  virtual unsigned int GetNumberOfParameters() const ITK_OVERRIDE;
94 
96  virtual unsigned int GetNumberOfValues() const ITK_OVERRIDE;
97 
99  void Initialize(unsigned int rangeDimension);
100 
102  void SetOriginalDataArray(MeasureType *setOriginalDataArray);
103 
104 protected:
106  virtual ~CumulativeGaussianCostFunction() ITK_OVERRIDE;
107 
108  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
109 
110 private:
111 
113  MeasureType *m_OriginalDataArray;
114 
116  unsigned int m_RangeDimension;
117 
119  mutable MeasureType m_Measure;
120  mutable MeasureType * m_MeasurePointer;
121  mutable ParametersType m_Parameters;
122 };
123 } // end namespace itk
124 
125 #endif
Light weight base class for most itk classes.
This class is a base for the CostFunctions returning a multiple values.
void GetDerivative(const ParametersType &, DerivativeType &) const override
Cost function for the Cumulative Gaussian Optimizer.
Control indentation during Print() invocation.
Definition: itkIndent.h:49