Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkVTKImageExportBase_h
00018 #define __itkVTKImageExportBase_h
00019
00020 #include "itkProcessObject.h"
00021
00022 namespace itk
00023 {
00024
00035 class ITK_EXPORT VTKImageExportBase: public ProcessObject
00036 {
00037 public:
00039 typedef VTKImageExportBase Self;
00040 typedef ProcessObject Superclass;
00041 typedef SmartPointer<Self> Pointer;
00042 typedef SmartPointer<const Self> ConstPointer;
00043
00045 itkTypeMacro(VTKImageExportBase,ProcessObject);
00046
00048 void* GetCallbackUserData();
00049
00051 typedef void (*UpdateInformationCallbackType)(void*);
00052 typedef int (*PipelineModifiedCallbackType)(void*);
00053 typedef int* (*WholeExtentCallbackType)(void*);
00054 typedef double* (*SpacingCallbackType)(void*);
00055 typedef double* (*OriginCallbackType)(void*);
00056 typedef const char* (*ScalarTypeCallbackType)(void*);
00057 typedef int (*NumberOfComponentsCallbackType)(void*);
00058 typedef void (*PropagateUpdateExtentCallbackType)(void*, int*);
00059 typedef void (*UpdateDataCallbackType)(void*);
00060 typedef int* (*DataExtentCallbackType)(void*);
00061 typedef void* (*BufferPointerCallbackType)(void*);
00063
00065 typedef float* (*FloatSpacingCallbackType)(void*);
00066 typedef float* (*FloatOriginCallbackType)(void*);
00068
00070 class CallbackTypeProxy
00071 {
00072 public:
00073 typedef double* (*DoubleCallbackType)(void*);
00074 typedef float* (*FloatCallbackType)(void*);
00075 operator DoubleCallbackType()
00076 {
00077 return m_DoubleCallback;
00078 }
00079 operator FloatCallbackType()
00080 {
00081 return m_FloatCallback;
00082 }
00083 CallbackTypeProxy(DoubleCallbackType d, FloatCallbackType f):
00084 m_DoubleCallback(d), m_FloatCallback(f) {}
00085 private:
00086 DoubleCallbackType m_DoubleCallback;
00087 FloatCallbackType m_FloatCallback;
00088 };
00089
00091 UpdateInformationCallbackType GetUpdateInformationCallback() const;
00092 PipelineModifiedCallbackType GetPipelineModifiedCallback() const;
00093 WholeExtentCallbackType GetWholeExtentCallback() const;
00094 CallbackTypeProxy GetSpacingCallback() const;
00095 CallbackTypeProxy GetOriginCallback() const;
00096 ScalarTypeCallbackType GetScalarTypeCallback() const;
00097 NumberOfComponentsCallbackType GetNumberOfComponentsCallback() const;
00098 PropagateUpdateExtentCallbackType GetPropagateUpdateExtentCallback() const;
00099 UpdateDataCallbackType GetUpdateDataCallback() const;
00100 DataExtentCallbackType GetDataExtentCallback() const;
00101 BufferPointerCallbackType GetBufferPointerCallback() const;
00103
00104 protected:
00105 VTKImageExportBase();
00106 ~VTKImageExportBase() {}
00107 void PrintSelf(std::ostream& os, Indent indent) const;
00108
00109 typedef DataObject::Pointer DataObjectPointer;
00110
00111 virtual void UpdateInformationCallback();
00112 virtual int PipelineModifiedCallback();
00113 virtual void UpdateDataCallback();
00114
00117 virtual int* WholeExtentCallback()=0;
00118 virtual double* SpacingCallback()=0;
00119 virtual double* OriginCallback()=0;
00120 virtual float* FloatSpacingCallback()=0;
00121 virtual float* FloatOriginCallback()=0;
00122 virtual const char* ScalarTypeCallback()=0;
00123 virtual int NumberOfComponentsCallback()=0;
00124 virtual void PropagateUpdateExtentCallback(int*)=0;
00125 virtual int* DataExtentCallback()=0;
00126 virtual void* BufferPointerCallback()=0;
00128
00129 private:
00130 VTKImageExportBase(const Self&);
00131 void operator=(const Self&);
00132
00136 static void UpdateInformationCallbackFunction(void*);
00137 static int PipelineModifiedCallbackFunction(void*);
00138 static int* WholeExtentCallbackFunction(void*);
00139 static double* SpacingCallbackFunction(void*);
00140 static double* OriginCallbackFunction(void*);
00141 static float* FloatSpacingCallbackFunction(void*);
00142 static float* FloatOriginCallbackFunction(void*);
00143 static const char* ScalarTypeCallbackFunction(void*);
00144 static int NumberOfComponentsCallbackFunction(void*);
00145 static void PropagateUpdateExtentCallbackFunction(void*, int*);
00146 static void UpdateDataCallbackFunction(void*);
00147 static int* DataExtentCallbackFunction(void*);
00148 static void* BufferPointerCallbackFunction(void*);
00150
00151 private:
00153 unsigned long m_LastPipelineMTime;
00154 };
00155
00156 }
00157
00158 #endif
00159