42#ifndef vtkImageImport_h
43#define vtkImageImport_h
45#include "vtkIOImageModule.h"
48VTK_ABI_NAMESPACE_BEGIN
88 vtkSetMacro(DataScalarType,
int);
95 vtkGetMacro(DataScalarType,
int);
98 return vtkImageScalarTypeNameMacro(this->DataScalarType);
107 vtkSetMacro(NumberOfScalarComponents,
int);
108 vtkGetMacro(NumberOfScalarComponents,
int);
118 vtkSetVector6Macro(DataExtent,
int);
119 vtkGetVector6Macro(DataExtent,
int);
128 vtkSetVector3Macro(DataSpacing,
double);
129 vtkGetVector3Macro(DataSpacing,
double);
137 vtkSetVector3Macro(DataOrigin,
double);
138 vtkGetVector3Macro(DataOrigin,
double);
147 vtkSetVectorMacro(DataDirection,
double, 9);
148 vtkGetVectorMacro(DataDirection,
double, 9);
157 vtkSetVector6Macro(WholeExtent,
int);
158 vtkGetVector6Macro(WholeExtent,
int);
177 vtkSetStringMacro(ScalarArrayName);
178 vtkGetStringMacro(ScalarArrayName);
186 typedef void (*UpdateInformationCallbackType)(
void*);
187 typedef int (*PipelineModifiedCallbackType)(
void*);
188 typedef int* (*WholeExtentCallbackType)(
void*);
189 typedef double* (*SpacingCallbackType)(
void*);
190 typedef double* (*OriginCallbackType)(
void*);
191 typedef double* (*DirectionCallbackType)(
void*);
192 typedef const char* (*ScalarTypeCallbackType)(
void*);
193 typedef int (*NumberOfComponentsCallbackType)(
void*);
194 typedef void (*PropagateUpdateExtentCallbackType)(
void*,
int*);
195 typedef void (*UpdateDataCallbackType)(
void*);
196 typedef int* (*DataExtentCallbackType)(
void*);
197 typedef void* (*BufferPointerCallbackType)(
void*);
206 vtkSetMacro(UpdateInformationCallback, UpdateInformationCallbackType);
207 vtkGetMacro(UpdateInformationCallback, UpdateInformationCallbackType);
217 vtkSetMacro(PipelineModifiedCallback, PipelineModifiedCallbackType);
218 vtkGetMacro(PipelineModifiedCallback, PipelineModifiedCallbackType);
228 vtkSetMacro(WholeExtentCallback, WholeExtentCallbackType);
229 vtkGetMacro(WholeExtentCallback, WholeExtentCallbackType);
238 vtkSetMacro(SpacingCallback, SpacingCallbackType);
239 vtkGetMacro(SpacingCallback, SpacingCallbackType);
248 vtkSetMacro(OriginCallback, OriginCallbackType);
249 vtkGetMacro(OriginCallback, OriginCallbackType);
258 vtkSetMacro(DirectionCallback, DirectionCallbackType);
259 vtkGetMacro(DirectionCallback, DirectionCallbackType);
268 vtkSetMacro(ScalarTypeCallback, ScalarTypeCallbackType);
269 vtkGetMacro(ScalarTypeCallback, ScalarTypeCallbackType);
278 vtkSetMacro(NumberOfComponentsCallback, NumberOfComponentsCallbackType);
279 vtkGetMacro(NumberOfComponentsCallback, NumberOfComponentsCallbackType);
290 vtkSetMacro(PropagateUpdateExtentCallback, PropagateUpdateExtentCallbackType);
291 vtkGetMacro(PropagateUpdateExtentCallback, PropagateUpdateExtentCallbackType);
300 vtkSetMacro(UpdateDataCallback, UpdateDataCallbackType);
301 vtkGetMacro(UpdateDataCallback, UpdateDataCallbackType);
312 vtkSetMacro(DataExtentCallback, DataExtentCallbackType);
313 vtkGetMacro(DataExtentCallback, DataExtentCallbackType);
323 vtkSetMacro(BufferPointerCallback, BufferPointerCallbackType);
324 vtkGetMacro(BufferPointerCallback, BufferPointerCallbackType);
332 vtkSetMacro(CallbackUserData,
void*);
333 vtkGetMacro(CallbackUserData,
void*);
361 double DataSpacing[3];
362 double DataOrigin[3];
363 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))