Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages
Imaging/vtkImageImport.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00050 #ifndef __vtkImageImport_h
00051 #define __vtkImageImport_h
00052
00053 #include "vtkImageSource.h"
00054
00055
00056 class VTK_IMAGING_EXPORT vtkImageImport : public vtkImageSource
00057 {
00058 public:
00059 static vtkImageImport *New();
00060 vtkTypeRevisionMacro(vtkImageImport,vtkImageSource);
00061 void PrintSelf(ostream& os, vtkIndent indent);
00062
00066 void CopyImportVoidPointer(void *ptr, int size);
00067
00069
00073 void SetImportVoidPointer(void *ptr);
00074 void *GetImportVoidPointer() {return this->ImportVoidPointer;};
00076
00082 void SetImportVoidPointer(void *ptr, int save);
00083
00085
00087 vtkSetMacro(DataScalarType,int);
00088 void SetDataScalarTypeToDouble(){this->SetDataScalarType(VTK_DOUBLE);}
00089 void SetDataScalarTypeToFloat(){this->SetDataScalarType(VTK_FLOAT);}
00090 void SetDataScalarTypeToInt(){this->SetDataScalarType(VTK_INT);}
00091 void SetDataScalarTypeToShort(){this->SetDataScalarType(VTK_SHORT);}
00092 void SetDataScalarTypeToUnsignedShort()
00093 {this->SetDataScalarType(VTK_UNSIGNED_SHORT);}
00094 void SetDataScalarTypeToUnsignedChar()
00095 {this->SetDataScalarType(VTK_UNSIGNED_CHAR);}
00096 vtkGetMacro(DataScalarType, int);
00097 const char *GetDataScalarTypeAsString() {
00098 return vtkImageScalarTypeNameMacro(this->DataScalarType); }
00100
00102
00104 vtkSetMacro(NumberOfScalarComponents,int);
00105 vtkGetMacro(NumberOfScalarComponents,int);
00107
00109
00113 vtkSetVector6Macro(DataExtent,int);
00114 vtkGetVector6Macro(DataExtent,int);
00115 void SetDataExtentToWholeExtent()
00116 {this->SetDataExtent(this->GetWholeExtent());}
00118
00120
00122 vtkSetVector3Macro(DataSpacing,float);
00123 vtkGetVector3Macro(DataSpacing,float);
00125
00127
00129 vtkSetVector3Macro(DataOrigin,float);
00130 vtkGetVector3Macro(DataOrigin,float);
00132
00134
00137 vtkSetVector6Macro(WholeExtent,int);
00138 vtkGetVector6Macro(WholeExtent,int);
00140
00142 virtual void PropagateUpdateExtent(vtkDataObject *output);
00143
00144
00146
00147 callbacks. See furhter documentation on each individual callback. */
00148 typedef void (*UpdateInformationCallbackType)(void*);
00149 typedef int (*PipelineModifiedCallbackType)(void*);
00150 typedef int* (*WholeExtentCallbackType)(void*);
00151 typedef float* (*SpacingCallbackType)(void*);
00152 typedef float* (*OriginCallbackType)(void*);
00153 typedef const char* (*ScalarTypeCallbackType)(void*);
00154 typedef int (*NumberOfComponentsCallbackType)(void*);
00155 typedef void (*PropagateUpdateExtentCallbackType)(void*, int*);
00156 typedef void (*UpdateDataCallbackType)(void*);
00157 typedef int* (*DataExtentCallbackType)(void*);
00158 typedef void* (*BufferPointerCallbackType)(void*);
00160
00162
00165 vtkSetMacro(UpdateInformationCallback, UpdateInformationCallbackType);
00166 vtkGetMacro(UpdateInformationCallback, UpdateInformationCallbackType);
00168
00170
00174 vtkSetMacro(PipelineModifiedCallback, PipelineModifiedCallbackType);
00175 vtkGetMacro(PipelineModifiedCallback, PipelineModifiedCallbackType);
00177
00179
00183 vtkSetMacro(WholeExtentCallback, WholeExtentCallbackType);
00184 vtkGetMacro(WholeExtentCallback, WholeExtentCallbackType);
00186
00188
00191 vtkSetMacro(SpacingCallback, SpacingCallbackType);
00192 vtkGetMacro(SpacingCallback, SpacingCallbackType);
00194
00196
00199 vtkSetMacro(OriginCallback, OriginCallbackType);
00200 vtkGetMacro(OriginCallback, OriginCallbackType);
00202
00204
00207 vtkSetMacro(ScalarTypeCallback, ScalarTypeCallbackType);
00208 vtkGetMacro(ScalarTypeCallback, ScalarTypeCallbackType);
00210
00212
00215 vtkSetMacro(NumberOfComponentsCallback, NumberOfComponentsCallbackType);
00216 vtkGetMacro(NumberOfComponentsCallback, NumberOfComponentsCallbackType);
00218
00220
00225 vtkSetMacro(PropagateUpdateExtentCallback,PropagateUpdateExtentCallbackType);
00226 vtkGetMacro(PropagateUpdateExtentCallback,PropagateUpdateExtentCallbackType);
00228
00230
00233 vtkSetMacro(UpdateDataCallback, UpdateDataCallbackType);
00234 vtkGetMacro(UpdateDataCallback, UpdateDataCallbackType);
00236
00238
00243 vtkSetMacro(DataExtentCallback, DataExtentCallbackType);
00244 vtkGetMacro(DataExtentCallback, DataExtentCallbackType);
00246
00248
00252 vtkSetMacro(BufferPointerCallback, BufferPointerCallbackType);
00253 vtkGetMacro(BufferPointerCallback, BufferPointerCallbackType);
00255
00257
00259 vtkSetMacro(CallbackUserData, void*);
00260 vtkGetMacro(CallbackUserData, void*);
00262
00263
00264
00265 protected:
00266 vtkImageImport();
00267 ~vtkImageImport();
00268
00269 virtual void UpdateInformation();
00270 virtual void ExecuteInformation();
00271
00272 void InvokeUpdateInformationCallbacks();
00273 void InvokeExecuteInformationCallbacks();
00274 void InvokeExecuteDataCallbacks();
00275 void LegacyCheckWholeExtent();
00276
00277 void *ImportVoidPointer;
00278 int SaveUserArray;
00279
00280 int NumberOfScalarComponents;
00281 int DataScalarType;
00282
00283 int WholeExtent[6];
00284 int DataExtent[6];
00285 float DataSpacing[3];
00286 float DataOrigin[3];
00287
00288 void* CallbackUserData;
00289
00290
00291 UpdateInformationCallbackType UpdateInformationCallback;
00292 PipelineModifiedCallbackType PipelineModifiedCallback;
00293 WholeExtentCallbackType WholeExtentCallback;
00294 SpacingCallbackType SpacingCallback;
00295 OriginCallbackType OriginCallback;
00296 ScalarTypeCallbackType ScalarTypeCallback;
00297 NumberOfComponentsCallbackType NumberOfComponentsCallback;
00298 PropagateUpdateExtentCallbackType PropagateUpdateExtentCallback;
00299 UpdateDataCallbackType UpdateDataCallback;
00300 DataExtentCallbackType DataExtentCallback;
00301 BufferPointerCallbackType BufferPointerCallback;
00302
00303
00304 virtual void ExecuteData(vtkDataObject *d);
00305
00306 private:
00307 vtkImageImport(const vtkImageImport&);
00308 void operator=(const vtkImageImport&);
00309 };
00310
00311 #endif