00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __freTransformFunctionAccessor_h
00023 #define __freTransformFunctionAccessor_h
00024
00025 #include "freITKTransformControllerInterface.h"
00026
00027 namespace FREE
00028 {
00029
00030
00044 template <class TTransformBase>
00045 class TransformFunctionAccessor
00046 {
00047 public:
00049 itkTypeMacro( TransformFunctionAccessor, none );
00050
00052 typedef TTransformBase TransformType;
00053 typedef typename TransformType::Pointer TransformPointer;
00054
00055 typedef typename ImageTypes<TransformType::OutputSpaceDimension>::InternalImageType ImageType;
00056 typedef typename ImageType::RegionType RegionType;
00057 typedef typename ImageType::SpacingType SpacingType;
00058 typedef typename ImageTypes<TransformType::OutputSpaceDimension>::PointType PointType;
00059
00060 typedef typename TransformType::ParametersType TransformParametersType;
00061
00062 typedef ITKTransformControllerInterface<typename TransformType::ScalarType,
00063 TransformType::InputSpaceDimension,
00064 TransformType::OutputSpaceDimension> ITKTransformControllerInterfaceType;
00065 typedef typename ITKTransformControllerInterfaceType::TransformFunctionMediaType TransformFunctionMediaType;
00066 typedef typename ITKTransformControllerInterfaceType::TransformFunctionMediaPointer TransformFunctionMediaPointer;
00067
00075 virtual TransformFunctionMediaPointer GetTransformationFunction(const TransformParametersType& parameters, const PointType& origin, const RegionType& region, const SpacingType& spacing);
00076 virtual TransformFunctionMediaPointer GetTransformationFunction(const TransformParametersType& parameters);
00077
00086 virtual TransformFunctionMediaPointer GetInverseTransformationFunction(const TransformParametersType& parameters, const PointType& origin, const RegionType& region, const SpacingType& spacing);
00087 virtual TransformFunctionMediaPointer GetInverseTransformationFunction(const TransformParametersType& parameters);
00088
00089 TransformFunctionAccessor(SessionComponentCache& cache, const IDPath& transformID);
00090
00091 protected:
00092
00094 void GetTransformControllerAndCache(const ITKTransformControllerInterfaceType*& pController, SessionComponentCache*& pCache);
00095
00097 IDPath m_TransformID;
00098
00100 SessionComponentCache& m_Cache ;
00101 };
00102
00103 }
00104
00105 #ifndef ITK_MANUAL_INSTANTIATION
00106 #include "freTransformFunctionAccessor.txx"
00107 #endif
00108
00109 #endif