00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __freTransformFunctionMediaController_h
00023 #define __freTransformFunctionMediaController_h
00024
00025 #include "freMediaControllerBase.h"
00026 #include "freTransformFunctionMedia.h"
00027
00028 namespace FREE
00029 {
00030
00041 freControllerIDMacro(TransformFunctionMediaControllerBase, "TransformFunctionMediaBase");
00042 template <typename TMedia>
00043 class TransformFunctionMediaControllerBase : public MediaControllerBase< TMedia >
00044 {
00045 public:
00046 typedef TMedia ComponentType;
00047 typedef MediaControllerBase<ComponentType> Superclass;
00048 typedef TransformFunctionMediaControllerBase<TMedia> Self;
00049 typedef typename Superclass::ComponentPointer ComponentPointer;
00050 typedef typename Superclass::GenericComponentType GenericComponentType;
00051 typedef typename Superclass::GenericComponentPointer GenericComponentPointer;
00052 typedef typename Superclass::GenericMediaPointer GenericMediaPointer;
00053
00054 itkTypeMacro(TransformFunctionMediaControllerBase, MediaControllerBase);
00055
00056 TransformFunctionMediaControllerBase()
00057 {
00058
00059 this->UpdateControllerID(ControllerID::TransformFunctionMediaControllerBase);
00060 this->m_Description = "Base class for media that are transformation functions.";
00061 };
00062
00063 virtual ~TransformFunctionMediaControllerBase() {};
00064
00065 virtual GenericMediaPointer ComputeActualizedMedia(GenericMediaType* pGenericMedia,
00066 GenericMediaType* pGenericTransformationField) const
00067 {
00068 throwCtrlExceptionMacro("","TransformFunctionMedia cannot be actualized.");
00069
00070 GenericMediaPointer smpResult = 0;
00071
00072 return smpResult;
00073 };
00074
00075 virtual GenericMediaPointer ComputeActualizedMediaByFunction(GenericMediaType* pGenericMedia,
00076 GenericMediaType* pGenericTransformationFunction) const
00077 {
00078 throwCtrlExceptionMacro("","TransformFunctionMedia cannot be actualized.");
00079
00080 GenericMediaPointer smpResult = 0;
00081
00082 return smpResult;
00083 };
00084
00085 virtual bool LoadMedia(SessionComponentCache* pCache) const
00086 {
00087 return false;
00088 };
00089
00090 virtual bool SaveMedia(SessionComponentCache* pCache) const
00091 {
00092 return false;
00093 };
00094
00095 virtual bool SaveMedia(std::string sMediaPath, GenericMediaType* pMedia) const
00096 {
00097 return false;
00098 };
00099
00100 unsigned long
00101 GetMediaDimension() const
00102 {
00103 return ComponentType::MediaDimension;
00104 };
00105
00106 };
00107
00113 freControllerIDMacro(TransformFunction2DMediaController, "Transformation Function 2D Media");
00114 class TransformFunction2DMediaController : public TransformFunctionMediaControllerBase< TransformFunctionMedia<ScalarType, 2, 2> >
00115 {
00116 public:
00117 typedef TransformFunctionMediaControllerBase< TransformFunctionMedia<ScalarType, 2, 2> > Superclass;
00118 typedef Superclass::ComponentType ComponentType;
00119
00120 itkTypeMacro(TransformFunction2DMediaController, TransformFunctionMediaControllerBase);
00121
00122 TransformFunction2DMediaController();
00123
00124 };
00125
00131 freControllerIDMacro(TransformFunction3DMediaController, "Transformation Function 3D Media");
00132 class TransformFunction3DMediaController : public TransformFunctionMediaControllerBase< TransformFunctionMedia<ScalarType, 3, 3> >
00133 {
00134 public:
00135 typedef TransformFunctionMediaControllerBase< TransformFunctionMedia<ScalarType, 3, 3> > Superclass;
00136 typedef Superclass::ComponentType ComponentType;
00137
00138 itkTypeMacro(TransformFunction3DMediaController, TransformFunctionMediaControllerBase);
00139
00140 TransformFunction3DMediaController();
00141
00142 };
00143
00144 }
00145
00146 #endif