32 #ifndef vtkImageImport_h
33 #define vtkImageImport_h
35 #include "vtkIOImageModule.h"
77 vtkSetMacro(DataScalarType,
int);
84 vtkGetMacro(DataScalarType,
int);
87 return vtkImageScalarTypeNameMacro(this->DataScalarType);
96 vtkSetMacro(NumberOfScalarComponents,
int);
97 vtkGetMacro(NumberOfScalarComponents,
int);
107 vtkSetVector6Macro(DataExtent,
int);
108 vtkGetVector6Macro(DataExtent,
int);
117 vtkSetVector3Macro(DataSpacing,
double);
118 vtkGetVector3Macro(DataSpacing,
double);
126 vtkSetVector3Macro(DataOrigin,
double);
127 vtkGetVector3Macro(DataOrigin,
double);
136 vtkSetVectorMacro(DataDirection,
double, 9);
137 vtkGetVectorMacro(DataDirection,
double, 9);
146 vtkSetVector6Macro(WholeExtent,
int);
147 vtkGetVector6Macro(WholeExtent,
int);
166 vtkSetStringMacro(ScalarArrayName);
167 vtkGetStringMacro(ScalarArrayName);
175 typedef void (*UpdateInformationCallbackType)(
void*);
176 typedef int (*PipelineModifiedCallbackType)(
void*);
177 typedef int* (*WholeExtentCallbackType)(
void*);
178 typedef double* (*SpacingCallbackType)(
void*);
179 typedef double* (*OriginCallbackType)(
void*);
180 typedef double* (*DirectionCallbackType)(
void*);
181 typedef const char* (*ScalarTypeCallbackType)(
void*);
182 typedef int (*NumberOfComponentsCallbackType)(
void*);
183 typedef void (*PropagateUpdateExtentCallbackType)(
void*,
int*);
184 typedef void (*UpdateDataCallbackType)(
void*);
185 typedef int* (*DataExtentCallbackType)(
void*);
186 typedef void* (*BufferPointerCallbackType)(
void*);
195 vtkSetMacro(UpdateInformationCallback, UpdateInformationCallbackType);
196 vtkGetMacro(UpdateInformationCallback, UpdateInformationCallbackType);
206 vtkSetMacro(PipelineModifiedCallback, PipelineModifiedCallbackType);
207 vtkGetMacro(PipelineModifiedCallback, PipelineModifiedCallbackType);
217 vtkSetMacro(WholeExtentCallback, WholeExtentCallbackType);
218 vtkGetMacro(WholeExtentCallback, WholeExtentCallbackType);
227 vtkSetMacro(SpacingCallback, SpacingCallbackType);
228 vtkGetMacro(SpacingCallback, SpacingCallbackType);
237 vtkSetMacro(OriginCallback, OriginCallbackType);
238 vtkGetMacro(OriginCallback, OriginCallbackType);
247 vtkSetMacro(DirectionCallback, DirectionCallbackType);
248 vtkGetMacro(DirectionCallback, DirectionCallbackType);
257 vtkSetMacro(ScalarTypeCallback, ScalarTypeCallbackType);
258 vtkGetMacro(ScalarTypeCallback, ScalarTypeCallbackType);
267 vtkSetMacro(NumberOfComponentsCallback, NumberOfComponentsCallbackType);
268 vtkGetMacro(NumberOfComponentsCallback, NumberOfComponentsCallbackType);
279 vtkSetMacro(PropagateUpdateExtentCallback, PropagateUpdateExtentCallbackType);
280 vtkGetMacro(PropagateUpdateExtentCallback, PropagateUpdateExtentCallbackType);
289 vtkSetMacro(UpdateDataCallback, UpdateDataCallbackType);
290 vtkGetMacro(UpdateDataCallback, UpdateDataCallbackType);
301 vtkSetMacro(DataExtentCallback, DataExtentCallbackType);
302 vtkGetMacro(DataExtentCallback, DataExtentCallbackType);
312 vtkSetMacro(BufferPointerCallback, BufferPointerCallbackType);
313 vtkGetMacro(BufferPointerCallback, BufferPointerCallbackType);
321 vtkSetMacro(CallbackUserData,
void*);
322 vtkGetMacro(CallbackUserData,
void*);
350 double DataSpacing[3];
351 double DataOrigin[3];
352 double DataDirection[9];
general representation of visualization data
Generic algorithm superclass for image algs.
Import data from a C array.
void SetDataExtentToWholeExtent()
static vtkImageImport * New()
int NumberOfScalarComponents
void ExecuteDataWithInformation(vtkDataObject *d, vtkInformation *outInfo) override
This is a convenience method that is implemented in many subclasses instead of RequestData.
void SetImportVoidPointer(void *ptr, int save)
Set the pointer from which the image data is imported.
~vtkImageImport() override
NumberOfComponentsCallbackType NumberOfComponentsCallback
int RequestUpdateExtent(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Propagates the update extent through the callback if it is set.
UpdateDataCallbackType UpdateDataCallback
void SetImportVoidPointer(void *ptr)
Set the pointer from which the image data is imported.
void SetDataScalarTypeToUnsignedShort()
void InvokeExecuteDataCallbacks()
void InvokeUpdateInformationCallbacks()
void SetDataScalarTypeToDouble()
void SetDataScalarTypeToShort()
const char * GetDataScalarTypeAsString()
void InvokeExecuteInformationCallbacks()
PipelineModifiedCallbackType PipelineModifiedCallback
void LegacyCheckWholeExtent()
WholeExtentCallbackType WholeExtentCallback
void SetDataScalarTypeToUnsignedChar()
DirectionCallbackType DirectionCallback
PropagateUpdateExtentCallbackType PropagateUpdateExtentCallback
int InvokePipelineModifiedCallbacks()
Invoke the appropriate callbacks.
void CopyImportVoidPointer(void *ptr, vtkIdType size)
Import data and make an internal copy of it.
int ComputePipelineMTime(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec, int requestFromOutputPort, vtkMTimeType *mtime) override
Override vtkAlgorithm.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
SpacingCallbackType SpacingCallback
void * GetImportVoidPointer()
ScalarTypeCallbackType ScalarTypeCallback
OriginCallbackType OriginCallback
BufferPointerCallbackType BufferPointerCallback
DataExtentCallbackType DataExtentCallback
void SetDataScalarTypeToFloat()
UpdateInformationCallbackType UpdateInformationCallback
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetDataScalarTypeToInt()
a simple class to control print indentation
#define VTK_UNSIGNED_CHAR
#define VTK_UNSIGNED_SHORT
vtkTypeUInt32 vtkMTimeType
void save(Archiver &ar, const vtkUnicodeString &str, const unsigned int vtkNotUsed(version))