ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkSingleValuedCostFunctionv4.h
Go to the documentation of this file.
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 __itkSingleValuedCostFunctionv4_h
00019 #define __itkSingleValuedCostFunctionv4_h
00020 
00021 #include "itkCostFunction.h"
00022 #include "itkNumericTraits.h"
00023 
00024 namespace itk
00025 {
00048 class ITK_EXPORT SingleValuedCostFunctionv4:
00049   public CostFunction
00050 {
00051 public:
00053   typedef SingleValuedCostFunctionv4   Self;
00054   typedef CostFunction                 Superclass;
00055   typedef SmartPointer< Self >         Pointer;
00056   typedef SmartPointer< const Self >   ConstPointer;
00057 
00059   itkTypeMacro(SingleValuedCostFunctionv4, CostFunction);
00060 
00063   typedef double MeasureType;
00064 
00067   typedef Superclass::ParametersType      ParametersType;
00068   typedef Superclass::ParametersValueType ParametersValueType;
00069 
00072   typedef Array< ParametersValueType > DerivativeType;
00073 
00076   virtual MeasureType GetValue() const = 0;
00077 
00081   virtual void GetValueAndDerivative(MeasureType & value,
00082                                      DerivativeType & derivative) const = 0;
00083 
00084 protected:
00085   SingleValuedCostFunctionv4() {}
00086   virtual ~SingleValuedCostFunctionv4() {}
00087 
00088 private:
00089   SingleValuedCostFunctionv4(const Self &); //purposely not implemented
00090   void operator=(const Self &);           //purposely not implemented
00091 };
00092 } // end namespace itk
00093 
00094 #endif
00095