00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkMultipleValuedNonLinearVnlOptimizer.h,v $ 00005 Language: C++ 00006 Date: $Date: 2005/09/24 21:20:58 $ 00007 Version: $Revision: 1.23 $ 00008 00009 Copyright (c) Insight Software Consortium. All rights reserved. 00010 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 #ifndef __itkMultipleValuedNonLinearVnlOptimizer_h 00018 #define __itkMultipleValuedNonLinearVnlOptimizer_h 00019 00020 #include "itkMultipleValuedNonLinearOptimizer.h" 00021 #include "itkMultipleValuedVnlCostFunctionAdaptor.h" 00022 00023 00024 namespace itk 00025 { 00026 00035 class ITK_EXPORT MultipleValuedNonLinearVnlOptimizer : 00036 public MultipleValuedNonLinearOptimizer 00037 { 00038 public: 00040 typedef MultipleValuedNonLinearVnlOptimizer Self; 00041 typedef MultipleValuedNonLinearOptimizer Superclass; 00042 typedef SmartPointer<Self> Pointer; 00043 typedef SmartPointer<const Self> ConstPointer; 00044 00046 itkTypeMacro( MultipleValuedNonLinearVnlOptimizer, 00047 MultipleValueNonLinearOptimizer ); 00048 00049 00052 typedef Superclass::ParametersType ParametersType; 00053 00060 virtual void SetCostFunction( MultipleValuedCostFunction * costFunction ) = 0; 00061 00065 void SetUseCostFunctionGradient(bool); 00066 void UseCostFunctionGradientOn() { this->SetUseCostFunctionGradient( true ); } 00067 void UseCostFunctionGradientOff() { this->SetUseCostFunctionGradient( false ); }; 00068 bool GetUseCostFunctionGradient() const; 00069 00070 protected: 00071 MultipleValuedNonLinearVnlOptimizer(); 00072 virtual ~MultipleValuedNonLinearVnlOptimizer(); 00073 00074 typedef MultipleValuedVnlCostFunctionAdaptor CostFunctionAdaptorType; 00075 00076 void SetCostFunctionAdaptor( CostFunctionAdaptorType * adaptor ); 00077 const CostFunctionAdaptorType * GetCostFunctionAdaptor( void ) const; 00078 CostFunctionAdaptorType * GetCostFunctionAdaptor( void ); 00079 00082 CostFunctionAdaptorType * GetNonConstCostFunctionAdaptor( void ) const; 00083 00084 private: 00085 MultipleValuedNonLinearVnlOptimizer(const Self&); //purposely not implemented 00086 void operator=(const Self&); //purposely not implemented 00087 00088 CostFunctionAdaptorType * m_CostFunctionAdaptor; 00089 bool m_UseGradient; 00090 }; 00091 00092 } // end namespace itk 00093 00094 00095 00096 00097 #endif 00098 00099 00100