41#ifndef vtkImageImport_h
42#define vtkImageImport_h
44#include "vtkIOImageModule.h"
86 vtkSetMacro(DataScalarType,
int);
93 vtkGetMacro(DataScalarType,
int);
96 return vtkImageScalarTypeNameMacro(this->DataScalarType);
105 vtkSetMacro(NumberOfScalarComponents,
int);
106 vtkGetMacro(NumberOfScalarComponents,
int);
116 vtkSetVector6Macro(DataExtent,
int);
117 vtkGetVector6Macro(DataExtent,
int);
126 vtkSetVector3Macro(DataSpacing,
double);
127 vtkGetVector3Macro(DataSpacing,
double);
135 vtkSetVector3Macro(DataOrigin,
double);
136 vtkGetVector3Macro(DataOrigin,
double);
145 vtkSetVectorMacro(DataDirection,
double, 9);
146 vtkGetVectorMacro(DataDirection,
double, 9);
155 vtkSetVector6Macro(WholeExtent,
int);
156 vtkGetVector6Macro(WholeExtent,
int);
175 vtkSetStringMacro(ScalarArrayName);
176 vtkGetStringMacro(ScalarArrayName);
184 typedef void (*UpdateInformationCallbackType)(
void*);
185 typedef int (*PipelineModifiedCallbackType)(
void*);
186 typedef int* (*WholeExtentCallbackType)(
void*);
187 typedef double* (*SpacingCallbackType)(
void*);
188 typedef double* (*OriginCallbackType)(
void*);
189 typedef double* (*DirectionCallbackType)(
void*);
190 typedef const char* (*ScalarTypeCallbackType)(
void*);
191 typedef int (*NumberOfComponentsCallbackType)(
void*);
192 typedef void (*PropagateUpdateExtentCallbackType)(
void*,
int*);
193 typedef void (*UpdateDataCallbackType)(
void*);
194 typedef int* (*DataExtentCallbackType)(
void*);
195 typedef void* (*BufferPointerCallbackType)(
void*);
204 vtkSetMacro(UpdateInformationCallback, UpdateInformationCallbackType);
205 vtkGetMacro(UpdateInformationCallback, UpdateInformationCallbackType);
215 vtkSetMacro(PipelineModifiedCallback, PipelineModifiedCallbackType);
216 vtkGetMacro(PipelineModifiedCallback, PipelineModifiedCallbackType);
226 vtkSetMacro(WholeExtentCallback, WholeExtentCallbackType);
227 vtkGetMacro(WholeExtentCallback, WholeExtentCallbackType);
236 vtkSetMacro(SpacingCallback, SpacingCallbackType);
237 vtkGetMacro(SpacingCallback, SpacingCallbackType);
246 vtkSetMacro(OriginCallback, OriginCallbackType);
247 vtkGetMacro(OriginCallback, OriginCallbackType);
256 vtkSetMacro(DirectionCallback, DirectionCallbackType);
257 vtkGetMacro(DirectionCallback, DirectionCallbackType);
266 vtkSetMacro(ScalarTypeCallback, ScalarTypeCallbackType);
267 vtkGetMacro(ScalarTypeCallback, ScalarTypeCallbackType);
276 vtkSetMacro(NumberOfComponentsCallback, NumberOfComponentsCallbackType);
277 vtkGetMacro(NumberOfComponentsCallback, NumberOfComponentsCallbackType);
288 vtkSetMacro(PropagateUpdateExtentCallback, PropagateUpdateExtentCallbackType);
289 vtkGetMacro(PropagateUpdateExtentCallback, PropagateUpdateExtentCallbackType);
298 vtkSetMacro(UpdateDataCallback, UpdateDataCallbackType);
299 vtkGetMacro(UpdateDataCallback, UpdateDataCallbackType);
310 vtkSetMacro(DataExtentCallback, DataExtentCallbackType);
311 vtkGetMacro(DataExtentCallback, DataExtentCallbackType);
321 vtkSetMacro(BufferPointerCallback, BufferPointerCallbackType);
322 vtkGetMacro(BufferPointerCallback, BufferPointerCallbackType);
330 vtkSetMacro(CallbackUserData,
void*);
331 vtkGetMacro(CallbackUserData,
void*);
359 double DataSpacing[3];
360 double DataOrigin[3];
361 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.
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.
static vtkImageImport * New()
~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 * GetImportVoidPointer()
Set the pointer from which the image data is imported.
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.
void InvokeExecuteInformationCallbacks()
Invoke the appropriate callbacks.
PipelineModifiedCallbackType PipelineModifiedCallback
const char * GetDataScalarTypeAsString()
Set/Get the data type of pixels in the imported data.
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
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))