ITK  4.0.0
Insight Segmentation and Registration Toolkit
itkTransformParametersAdaptorBase.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 __itkTransformParametersAdaptorBase_h
00019 #define __itkTransformParametersAdaptorBase_h
00020 
00021 #include "itkObject.h"
00022 #include "itkObjectFactory.h"
00023 
00024 namespace itk
00025 {
00054 template<class TTransform>
00055 class ITK_EXPORT TransformParametersAdaptorBase
00056 : public Object
00057 {
00058 public:
00059 
00061   typedef TransformParametersAdaptorBase               Self;
00062   typedef Object                                       Superclass;
00063   typedef SmartPointer<Self>                           Pointer;
00064   typedef SmartPointer<const Self>                     ConstPointer;
00065 
00067   itkTypeMacro( TransformParametersAdaptorBase, Object );
00068 
00070   typedef TTransform                                     TransformType;
00071   typedef typename TransformType::Pointer                TransformPointer;
00072   typedef typename TransformType::ParametersType         ParametersType;
00073   typedef typename ParametersType::ValueType             ParametersValueType;
00074 
00076   itkSetObjectMacro( Transform, TransformType );
00077 
00079   itkSetMacro( RequiredFixedParameters, ParametersType );
00080 
00082   itkGetConstReferenceMacro( RequiredFixedParameters, ParametersType );
00083 
00085   virtual void AdaptTransformParameters() = 0;
00086 
00087 protected:
00088   TransformParametersAdaptorBase() {}
00089   ~TransformParametersAdaptorBase() {}
00090 
00091   void PrintSelf( std::ostream & os, Indent indent ) const
00092   {
00093     this->m_Transform->Print( os, indent );
00094     os << "Fixed parameters" << this->m_RequiredFixedParameters << std::endl;
00095   }
00096 
00097   TransformPointer                           m_Transform;
00098   ParametersType                             m_RequiredFixedParameters;
00099 
00100 private:
00101   TransformParametersAdaptorBase( const Self & ); //purposely not implemented
00102   void operator=( const Self & );             //purposely not implemented
00103 
00104 }; //class TransformParametersAdaptorBase
00105 }  // namespace itk
00106 
00107 #endif /* __itkTransformParametersAdaptorBase_h */
00108