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*);
00062
00064
typedef float* (*FloatSpacingCallbackType)(
void*);
00065 typedef float* (*FloatOriginCallbackType)(
void*);
00066
00068
class CallbackTypeProxy
00069 {
00070 public:
00071
typedef double* (*DoubleCallbackType)(
void*);
00072
typedef float* (*FloatCallbackType)(
void*);
00073 operator DoubleCallbackType()
00074 {
00075 return m_DoubleCallback;
00076 }
00077 operator FloatCallbackType()
00078 {
00079 return m_FloatCallback;
00080 }
00081
CallbackTypeProxy(DoubleCallbackType d, FloatCallbackType f):
00082 m_DoubleCallback(d), m_FloatCallback(f) {}
00083 private:
00084
DoubleCallbackType m_DoubleCallback;
00085
FloatCallbackType m_FloatCallback;
00086 };
00087
00089
UpdateInformationCallbackType GetUpdateInformationCallback() const;
00090
PipelineModifiedCallbackType GetPipelineModifiedCallback() const;
00091
WholeExtentCallbackType GetWholeExtentCallback() const;
00092
CallbackTypeProxy GetSpacingCallback() const;
00093
CallbackTypeProxy GetOriginCallback() const;
00094
ScalarTypeCallbackType GetScalarTypeCallback() const;
00095
NumberOfComponentsCallbackType GetNumberOfComponentsCallback() const;
00096
PropagateUpdateExtentCallbackType GetPropagateUpdateExtentCallback() const;
00097
UpdateDataCallbackType GetUpdateDataCallback() const;
00098
DataExtentCallbackType GetDataExtentCallback() const;
00099
BufferPointerCallbackType GetBufferPointerCallback() const;
00100
00101 protected:
00102 VTKImageExportBase();
00103 ~VTKImageExportBase() {}
00104
void PrintSelf(std::ostream& os,
Indent indent)
const;
00105
00106
typedef DataObject::Pointer DataObjectPointer;
00107
00108
virtual void UpdateInformationCallback();
00109
virtual int PipelineModifiedCallback();
00110 virtual void UpdateDataCallback();
00111
00114
virtual int* WholeExtentCallback()=0;
00115
virtual double* SpacingCallback()=0;
00116
virtual double* OriginCallback()=0;
00117
virtual float* FloatSpacingCallback()=0;
00118
virtual float* FloatOriginCallback()=0;
00119
virtual const char* ScalarTypeCallback()=0;
00120
virtual int NumberOfComponentsCallback()=0;
00121
virtual void PropagateUpdateExtentCallback(
int*)=0;
00122
virtual int* DataExtentCallback()=0;
00123
virtual void* BufferPointerCallback()=0;
00124
00125
private:
00126 VTKImageExportBase(
const Self&);
00127
void operator=(
const Self&);
00128
00132
static void UpdateInformationCallbackFunction(
void*);
00133
static int PipelineModifiedCallbackFunction(
void*);
00134
static int* WholeExtentCallbackFunction(
void*);
00135
static double* SpacingCallbackFunction(
void*);
00136
static double* OriginCallbackFunction(
void*);
00137
static float* FloatSpacingCallbackFunction(
void*);
00138
static float* FloatOriginCallbackFunction(
void*);
00139
static const char* ScalarTypeCallbackFunction(
void*);
00140
static int NumberOfComponentsCallbackFunction(
void*);
00141
static void PropagateUpdateExtentCallbackFunction(
void*,
int*);
00142
static void UpdateDataCallbackFunction(
void*);
00143
static int* DataExtentCallbackFunction(
void*);
00144
static void* BufferPointerCallbackFunction(
void*);
00145
00146
private:
00148
unsigned long m_LastPipelineMTime;
00149 };
00150
00151 }
00152
00153
#endif