freTransformFunctionMedia.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   F.R.E.E. - flexible registration evaluation engine
00004   Version:   v.1.0.0
00005   Date:      $Date: 2006/09/01 12:00:00 $
00006   Module:    $RCSfile: freTransformFunctionMedia.h,v $
00007   Language:  C++
00008 
00009 
00010 
00011   Copyright (c) 2007 Ralf o Floca (Department of Medical Informatics,
00012   Institute for Medical Biometry and Informatics, University of Heidelberg,
00013   Germany). All rights reserved.
00014   See FREECopyright.txt or http://www.mi.med.uni-hd.de/free/copyright.htm
00015   for details.
00016 
00017      This software is distributed WITHOUT ANY WARRANTY; without even 
00018      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00019      PURPOSE.  See the above copyright notices for more information.
00020 
00021 =========================================================================*/
00022 #ifndef __freTransformFunctionMedia_h
00023 #define __freTransformFunctionMedia_h
00024 
00025 #include "freImageTypes.h"
00026 #include "itkObject.h"
00027 #include "itkTransform.h"
00028 
00029 namespace FREE
00030 {
00031 
00038 template <typename TTransformFunctionMedia>
00039 struct GetTransformationFunctionMediaDimension
00040 {
00041   itkStaticConstMacro(MediaDimension, unsigned int, TTransformFunctionMedia::MediaDimension);
00042 }; 
00043 
00053 template <class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
00054 class TransformFunctionMedia : public itk::Object
00055 {
00056 public:  
00057   typedef TransformFunctionMedia           Self;
00058   typedef itk::Object                     Superclass;
00059   typedef itk::SmartPointer<Self>         Pointer;
00060   typedef itk::SmartPointer<const Self>   ConstPointer;
00061 
00066   itkStaticConstMacro(MediaDimension, unsigned int, NOutputDimensions );
00067 
00068   itkTypeMacro(TransformFunctionMedia, itk::Object);
00069   itkNewMacro(Self);
00070 
00071   typedef itk::Transform< TScalarType, NInputDimensions, NOutputDimensions > TransformType;
00072   typedef typename TransformType::Pointer TransformPointer;
00073 
00074   typedef typename ImageTypes<NOutputDimensions>::TransformationFieldType TransformFieldType;
00075   typedef typename TransformFieldType::Pointer     TransformFieldPointer;
00076   typedef typename TransformFieldType::RegionType  RegionType;
00077   typedef typename TransformFieldType::SpacingType SpacingType;
00078   typedef typename TransformFieldType::PointType   PointType;
00079 
00080   itkSetObjectMacro(Transform,TransformType);
00081   itkGetObjectMacro(Transform,TransformType);
00082   itkGetConstObjectMacro(Transform,TransformType);
00083 
00084   itkSetMacro(FieldOrigin, PointType);
00085   itkGetConstReferenceMacro(FieldOrigin, PointType);
00086 
00087   itkSetMacro(FieldSpacing, SpacingType);
00088   itkGetConstReferenceMacro(FieldSpacing, SpacingType);
00089 
00090   virtual void SetFieldRegion(const RegionType &region);
00091 
00092   virtual const RegionType& GetFieldRegion() const
00093     { return m_FieldRegion;};
00094 
00095   virtual TransformFieldPointer GenerateField();
00096   virtual void Reset();
00097 
00098   virtual ~TransformFunctionMedia();
00099 
00100 protected:
00101   TransformFunctionMedia();
00102 
00103   TransformPointer m_Transform;
00104   RegionType  m_FieldRegion;
00105   SpacingType m_FieldSpacing;
00106   PointType   m_FieldOrigin;
00107 };
00108 
00109 } //end of namespace free
00110 
00111 
00112 #if ITK_TEMPLATE_TXX
00113 # include "freTransformFunctionMedia.txx"
00114 #endif
00115 
00116 #endif

Generated at Sat Oct 13 17:58:55 2007 for f.r.e.e. - Flexible Registration and Evaluation Engine by doxygen 1.5.3 written by Dimitri van Heesch, © 1997-2000