ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkOptimizerParametersHelper.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 __itkOptimizerParametersHelper_h
00019 #define __itkOptimizerParametersHelper_h
00020 
00021 #include "itkObject.h"
00022 #include "itkArray.h"
00023 
00024 namespace itk
00025 {
00033 template< typename TValueType >
00034 class OptimizerParametersHelper
00035 {
00036 public:
00037 
00039   typedef TValueType                          ValueType;
00040   typedef OptimizerParametersHelper           Self;
00041 
00043   typedef Array< TValueType >                 CommonContainerType;
00044 
00046   OptimizerParametersHelper(){}
00047 
00058   virtual void MoveDataPointer(CommonContainerType* container,
00059                                TValueType * pointer )
00060     {
00061     container->SetData(
00062       pointer, container->GetSize(), false /*LetArrayManageMemory*/);
00063     }
00064 
00073   virtual void SetParametersObject(CommonContainerType *,
00074                                    LightObject *)
00075     {
00076     itkGenericExceptionMacro("OptimizerParametersHelper::SetParametersObject: "
00077       "Not implemented for base class.");
00078     }
00079 
00080   virtual ~OptimizerParametersHelper(){}
00081 
00082 };
00083 
00084 }//namespace itk
00085 
00086 #endif
00087