54 #ifndef vtkImageImport_h
55 #define vtkImageImport_h
57 #include "vtkIOImageModule.h"
99 vtkSetMacro(DataScalarType,
int);
106 vtkGetMacro(DataScalarType,
int);
109 return vtkImageScalarTypeNameMacro(this->DataScalarType);
118 vtkSetMacro(NumberOfScalarComponents,
int);
119 vtkGetMacro(NumberOfScalarComponents,
int);
129 vtkSetVector6Macro(DataExtent,
int);
130 vtkGetVector6Macro(DataExtent,
int);
139 vtkSetVector3Macro(DataSpacing,
double);
140 vtkGetVector3Macro(DataSpacing,
double);
148 vtkSetVector3Macro(DataOrigin,
double);
149 vtkGetVector3Macro(DataOrigin,
double);
158 vtkSetVectorMacro(DataDirection,
double, 9);
159 vtkGetVectorMacro(DataDirection,
double, 9);
168 vtkSetVector6Macro(WholeExtent,
int);
169 vtkGetVector6Macro(WholeExtent,
int);
188 vtkSetStringMacro(ScalarArrayName);
189 vtkGetStringMacro(ScalarArrayName);
197 typedef void (*UpdateInformationCallbackType)(
void*);
198 typedef int (*PipelineModifiedCallbackType)(
void*);
199 typedef int* (*WholeExtentCallbackType)(
void*);
200 typedef double* (*SpacingCallbackType)(
void*);
201 typedef double* (*OriginCallbackType)(
void*);
202 typedef double* (*DirectionCallbackType)(
void*);
203 typedef const char* (*ScalarTypeCallbackType)(
void*);
204 typedef int (*NumberOfComponentsCallbackType)(
void*);
205 typedef void (*PropagateUpdateExtentCallbackType)(
void*,
int*);
206 typedef void (*UpdateDataCallbackType)(
void*);
207 typedef int* (*DataExtentCallbackType)(
void*);
208 typedef void* (*BufferPointerCallbackType)(
void*);
217 vtkSetMacro(UpdateInformationCallback, UpdateInformationCallbackType);
218 vtkGetMacro(UpdateInformationCallback, UpdateInformationCallbackType);
228 vtkSetMacro(PipelineModifiedCallback, PipelineModifiedCallbackType);
229 vtkGetMacro(PipelineModifiedCallback, PipelineModifiedCallbackType);
239 vtkSetMacro(WholeExtentCallback, WholeExtentCallbackType);
240 vtkGetMacro(WholeExtentCallback, WholeExtentCallbackType);
249 vtkSetMacro(SpacingCallback, SpacingCallbackType);
250 vtkGetMacro(SpacingCallback, SpacingCallbackType);
259 vtkSetMacro(OriginCallback, OriginCallbackType);
260 vtkGetMacro(OriginCallback, OriginCallbackType);
269 vtkSetMacro(DirectionCallback, DirectionCallbackType);
270 vtkGetMacro(DirectionCallback, DirectionCallbackType);
279 vtkSetMacro(ScalarTypeCallback, ScalarTypeCallbackType);
280 vtkGetMacro(ScalarTypeCallback, ScalarTypeCallbackType);
289 vtkSetMacro(NumberOfComponentsCallback, NumberOfComponentsCallbackType);
290 vtkGetMacro(NumberOfComponentsCallback, NumberOfComponentsCallbackType);
301 vtkSetMacro(PropagateUpdateExtentCallback, PropagateUpdateExtentCallbackType);
302 vtkGetMacro(PropagateUpdateExtentCallback, PropagateUpdateExtentCallbackType);
311 vtkSetMacro(UpdateDataCallback, UpdateDataCallbackType);
312 vtkGetMacro(UpdateDataCallback, UpdateDataCallbackType);
323 vtkSetMacro(DataExtentCallback, DataExtentCallbackType);
324 vtkGetMacro(DataExtentCallback, DataExtentCallbackType);
334 vtkSetMacro(BufferPointerCallback, BufferPointerCallbackType);
335 vtkGetMacro(BufferPointerCallback, BufferPointerCallbackType);
343 vtkSetMacro(CallbackUserData,
void*);
344 vtkGetMacro(CallbackUserData,
void*);
372 double DataSpacing[3];
373 double DataOrigin[3];
374 double DataDirection[9];
general representation of visualization data
Generic algorithm superclass for image algs.
Import data from a C array.
void SetDataExtentToWholeExtent()
Get/Set the extent of the data buffer.
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()
Set/Get the data type of pixels in the imported data.
void InvokeExecuteDataCallbacks()
Invoke the appropriate callbacks.
void InvokeUpdateInformationCallbacks()
Invoke the appropriate callbacks.
void SetDataScalarTypeToDouble()
Set/Get the data type of pixels in the imported data.
void SetDataScalarTypeToShort()
Set/Get the data type of pixels in the imported data.
const char * GetDataScalarTypeAsString()
Set/Get the data type of pixels in the imported data.
void InvokeExecuteInformationCallbacks()
Invoke the appropriate callbacks.
PipelineModifiedCallbackType PipelineModifiedCallback
void LegacyCheckWholeExtent()
Invoke the appropriate callbacks.
WholeExtentCallbackType WholeExtentCallback
void SetDataScalarTypeToUnsignedChar()
Set/Get the data type of pixels in the imported data.
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()
Set the pointer from which the image data is imported.
ScalarTypeCallbackType ScalarTypeCallback
OriginCallbackType OriginCallback
BufferPointerCallbackType BufferPointerCallback
DataExtentCallbackType DataExtentCallback
void SetDataScalarTypeToFloat()
Set/Get the data type of pixels in the imported data.
UpdateInformationCallbackType UpdateInformationCallback
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetDataScalarTypeToInt()
Set/Get the data type of pixels in the imported data.
a simple class to control print indentation
#define VTK_UNSIGNED_CHAR
#define VTK_UNSIGNED_SHORT
vtkTypeUInt32 vtkMTimeType
void save(Archiver &ar, const std::string &str, const unsigned int vtkNotUsed(version))