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 vtkTypeMacro(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
00084 vtkImageData *GetInput();
00085
00087
00089
00094 vtkBooleanMacro(ImageLowerLeft, int);
00095 vtkGetMacro(ImageLowerLeft, int);
00096 vtkSetMacro(ImageLowerLeft, int);
00098
00100
00103 void SetExportVoidPointer(void *);
00104 void *GetExportVoidPointer() { return this->ExportVoidPointer; };
00106
00108
00111 void Export() { this->Export(this->ExportVoidPointer); };
00112 virtual void Export(void *);
00114
00119 void *GetPointerToData();
00120
00122 void* GetCallbackUserData();
00123
00124
00126
00128 typedef void (*UpdateInformationCallbackType)(void*);
00129 typedef int (*PipelineModifiedCallbackType)(void*);
00130 typedef int* (*WholeExtentCallbackType)(void*);
00131 typedef double* (*SpacingCallbackType)(void*);
00132 typedef double* (*OriginCallbackType)(void*);
00133 typedef const char* (*ScalarTypeCallbackType)(void*);
00134 typedef int (*NumberOfComponentsCallbackType)(void*);
00135 typedef void (*PropagateUpdateExtentCallbackType)(void*, int*);
00136 typedef void (*UpdateDataCallbackType)(void*);
00137 typedef int* (*DataExtentCallbackType)(void*);
00138 typedef void* (*BufferPointerCallbackType)(void*);
00140
00142
00143 UpdateInformationCallbackType GetUpdateInformationCallback() const;
00144 PipelineModifiedCallbackType GetPipelineModifiedCallback() const;
00145 WholeExtentCallbackType GetWholeExtentCallback() const;
00146 SpacingCallbackType GetSpacingCallback() const;
00147 OriginCallbackType GetOriginCallback() const;
00148 ScalarTypeCallbackType GetScalarTypeCallback() const;
00149 NumberOfComponentsCallbackType GetNumberOfComponentsCallback() const;
00150 PropagateUpdateExtentCallbackType GetPropagateUpdateExtentCallback() const;
00151 UpdateDataCallbackType GetUpdateDataCallback() const;
00152 DataExtentCallbackType GetDataExtentCallback() const;
00153 BufferPointerCallbackType GetBufferPointerCallback() const;
00154
00156
00157 protected:
00158 vtkImageExport();
00159 ~vtkImageExport();
00160
00161
00162 virtual int RequestData(vtkInformation *request,
00163 vtkInformationVector** inputVector,
00164 vtkInformationVector* outputVector);
00165
00166 virtual void UpdateInformationCallback();
00167 virtual int PipelineModifiedCallback();
00168 virtual void UpdateDataCallback();
00169 virtual int* WholeExtentCallback();
00170 virtual double* SpacingCallback();
00171 virtual double* OriginCallback();
00172 virtual const char* ScalarTypeCallback();
00173 virtual int NumberOfComponentsCallback();
00174 virtual void PropagateUpdateExtentCallback(int*);
00175 virtual int* DataExtentCallback();
00176 virtual void* BufferPointerCallback();
00177
00178 int ImageLowerLeft;
00179 int DataDimensions[3];
00180 void *ExportVoidPointer;
00181
00182 unsigned long LastPipelineMTime;
00183
00184 private:
00185 vtkImageExport(const vtkImageExport&);
00186 void operator=(const vtkImageExport&);
00187
00188 static void UpdateInformationCallbackFunction(void*);
00189 static int PipelineModifiedCallbackFunction(void*);
00190 static int* WholeExtentCallbackFunction(void*);
00191 static double* SpacingCallbackFunction(void*);
00192 static double* OriginCallbackFunction(void*);
00193 static const char* ScalarTypeCallbackFunction(void*);
00194 static int NumberOfComponentsCallbackFunction(void*);
00195 static void PropagateUpdateExtentCallbackFunction(void*, int*);
00196 static void UpdateDataCallbackFunction(void*);
00197 static int* DataExtentCallbackFunction(void*);
00198 static void* BufferPointerCallbackFunction(void*);
00199 };
00200
00201 #endif
00202
00203