00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00034 #ifndef __vtkImageExport_h
00035 #define __vtkImageExport_h
00036
00037 #include "vtkImageAlgorithm.h"
00038
00039 class VTK_IMAGING_EXPORT vtkImageExport : public vtkImageAlgorithm
00040 {
00041 public:
00042 static vtkImageExport *New();
00043 vtkTypeRevisionMacro(vtkImageExport,vtkImageAlgorithm);
00044 void PrintSelf(ostream& os, vtkIndent indent);
00045
00047 int GetDataMemorySize();
00048
00050
00052 void GetDataDimensions(int *ptr);
00053 int *GetDataDimensions() {
00054 this->GetDataDimensions(this->DataDimensions);
00055 return this->DataDimensions; }
00057
00061 int GetDataNumberOfScalarComponents();
00062
00064
00066 int GetDataScalarType();
00067 const char *GetDataScalarTypeAsString() {
00068 return vtkImageScalarTypeNameMacro(this->GetDataScalarType()); }
00070
00072
00073 int *GetDataExtent();
00074 void GetDataExtent(int *ptr);
00075 double *GetDataSpacing();
00076 void GetDataSpacing(double *ptr);
00077 double *GetDataOrigin();
00078 void GetDataOrigin(double *ptr);
00080
00081
00083 vtkImageData *GetInput();
00084
00085
00087
00092 vtkBooleanMacro(ImageLowerLeft, int);
00093 vtkGetMacro(ImageLowerLeft, int);
00094 vtkSetMacro(ImageLowerLeft, int);
00096
00098
00101 void SetExportVoidPointer(void *);
00102 void *GetExportVoidPointer() { return this->ExportVoidPointer; };
00104
00106
00109 void Export() { this->Export(this->ExportVoidPointer); };
00110 virtual void Export(void *);
00112
00117 void *GetPointerToData();
00118
00120 void* GetCallbackUserData();
00121
00122
00124
00126 typedef void (*UpdateInformationCallbackType)(void*);
00127 typedef int (*PipelineModifiedCallbackType)(void*);
00128 typedef int* (*WholeExtentCallbackType)(void*);
00129 typedef double* (*SpacingCallbackType)(void*);
00130 typedef double* (*OriginCallbackType)(void*);
00131 typedef const char* (*ScalarTypeCallbackType)(void*);
00132 typedef int (*NumberOfComponentsCallbackType)(void*);
00133 typedef void (*PropagateUpdateExtentCallbackType)(void*, int*);
00134 typedef void (*UpdateDataCallbackType)(void*);
00135 typedef int* (*DataExtentCallbackType)(void*);
00136 typedef void* (*BufferPointerCallbackType)(void*);
00138
00140
00141 UpdateInformationCallbackType GetUpdateInformationCallback() const;
00142 PipelineModifiedCallbackType GetPipelineModifiedCallback() const;
00143 WholeExtentCallbackType GetWholeExtentCallback() const;
00144 SpacingCallbackType GetSpacingCallback() const;
00145 OriginCallbackType GetOriginCallback() const;
00146 ScalarTypeCallbackType GetScalarTypeCallback() const;
00147 NumberOfComponentsCallbackType GetNumberOfComponentsCallback() const;
00148 PropagateUpdateExtentCallbackType GetPropagateUpdateExtentCallback() const;
00149 UpdateDataCallbackType GetUpdateDataCallback() const;
00150 DataExtentCallbackType GetDataExtentCallback() const;
00151 BufferPointerCallbackType GetBufferPointerCallback() const;
00152
00154
00155 protected:
00156 vtkImageExport();
00157 ~vtkImageExport();
00158
00159
00160 virtual int RequestData(vtkInformation *request,
00161 vtkInformationVector** inputVector,
00162 vtkInformationVector* outputVector);
00163
00164 virtual void UpdateInformationCallback();
00165 virtual int PipelineModifiedCallback();
00166 virtual void UpdateDataCallback();
00167 virtual int* WholeExtentCallback();
00168 virtual double* SpacingCallback();
00169 virtual double* OriginCallback();
00170 virtual const char* ScalarTypeCallback();
00171 virtual int NumberOfComponentsCallback();
00172 virtual void PropagateUpdateExtentCallback(int*);
00173 virtual int* DataExtentCallback();
00174 virtual void* BufferPointerCallback();
00175
00176 int ImageLowerLeft;
00177 int DataDimensions[3];
00178 void *ExportVoidPointer;
00179
00180 unsigned long LastPipelineMTime;
00181
00182 private:
00183 vtkImageExport(const vtkImageExport&);
00184 void operator=(const vtkImageExport&);
00185
00186 static void UpdateInformationCallbackFunction(void*);
00187 static int PipelineModifiedCallbackFunction(void*);
00188 static int* WholeExtentCallbackFunction(void*);
00189 static double* SpacingCallbackFunction(void*);
00190 static double* OriginCallbackFunction(void*);
00191 static const char* ScalarTypeCallbackFunction(void*);
00192 static int NumberOfComponentsCallbackFunction(void*);
00193 static void PropagateUpdateExtentCallbackFunction(void*, int*);
00194 static void UpdateDataCallbackFunction(void*);
00195 static int* DataExtentCallbackFunction(void*);
00196 static void* BufferPointerCallbackFunction(void*);
00197 };
00198
00199 #endif
00200
00201