ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
00001 /*========================================================================= 00002 * 00003 * Copyright Insight Software Consortium 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0.txt 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 * 00017 *=========================================================================*/ 00018 #ifndef __itkCumulativeGaussianCostFunction_h 00019 #define __itkCumulativeGaussianCostFunction_h 00020 00021 #include "itkMultipleValuedCostFunction.h" 00022 00023 namespace itk 00024 { 00050 class ITK_EXPORT CumulativeGaussianCostFunction:public MultipleValuedCostFunction 00051 { 00052 public: 00053 00055 typedef CumulativeGaussianCostFunction Self; 00056 typedef MultipleValuedCostFunction Superclass; 00057 typedef SmartPointer< Self > Pointer; 00058 typedef SmartPointer< const Self > ConstPointer; 00059 00061 itkTypeMacro(CumulativeGaussianCostFunction, MultipleValuedCostFunction); 00062 00064 itkNewMacro(Self); 00065 00067 typedef Superclass::ParametersType ParametersType; 00068 typedef Superclass::MeasureType MeasureType; 00069 typedef Superclass::DerivativeType DerivativeType; 00070 00073 enum { SpaceDimension = 4 }; 00074 00076 void GetDerivative( const ParametersType & itkNotUsed(parameters), 00077 DerivativeType & itkNotUsed(derivative) ) const {} 00078 00080 MeasureType GetValue(const ParametersType & parameters) const; 00081 00083 MeasureType * GetValuePointer(ParametersType & parameters); 00084 00086 double CalculateFitError(MeasureType *setTestArray); 00087 00089 double EvaluateCumulativeGaussian(double argument) const; 00090 00092 unsigned int GetNumberOfParameters() const; 00093 00095 unsigned int GetNumberOfValues() const; 00096 00098 void Initialize(unsigned int rangeDimension); 00099 00101 void SetOriginalDataArray(MeasureType *setOriginalDataArray); 00102 00103 protected: 00104 CumulativeGaussianCostFunction(); 00105 virtual ~CumulativeGaussianCostFunction(); 00106 00107 void PrintSelf(std::ostream & os, Indent indent) const; 00108 00109 private: 00110 00112 MeasureType *m_OriginalDataArray; 00113 00115 unsigned int m_RangeDimension; 00116 00118 mutable MeasureType m_Measure; 00119 mutable MeasureType * m_MeasurePointer; 00120 mutable ParametersType m_Parameters; 00121 }; 00122 } // end namespace itk 00123 00124 #endif 00125