44#ifndef vtkImageImport_h
45#define vtkImageImport_h
47#include "vtkIOImageModule.h"
89 vtkSetMacro(DataScalarType,
int);
96 vtkGetMacro(DataScalarType,
int);
99 return vtkImageScalarTypeNameMacro(this->DataScalarType);
108 vtkSetMacro(NumberOfScalarComponents,
int);
109 vtkGetMacro(NumberOfScalarComponents,
int);
119 vtkSetVector6Macro(DataExtent,
int);
120 vtkGetVector6Macro(DataExtent,
int);
129 vtkSetVector3Macro(DataSpacing,
double);
130 vtkGetVector3Macro(DataSpacing,
double);
138 vtkSetVector3Macro(DataOrigin,
double);
139 vtkGetVector3Macro(DataOrigin,
double);
148 vtkSetVectorMacro(DataDirection,
double, 9);
149 vtkGetVectorMacro(DataDirection,
double, 9);
158 vtkSetVector6Macro(WholeExtent,
int);
159 vtkGetVector6Macro(WholeExtent,
int);
178 vtkSetStringMacro(ScalarArrayName);
179 vtkGetStringMacro(ScalarArrayName);
187 typedef void (*UpdateInformationCallbackType)(
void*);
188 typedef int (*PipelineModifiedCallbackType)(
void*);
189 typedef int* (*WholeExtentCallbackType)(
void*);
190 typedef double* (*SpacingCallbackType)(
void*);
191 typedef double* (*OriginCallbackType)(
void*);
192 typedef double* (*DirectionCallbackType)(
void*);
193 typedef const char* (*ScalarTypeCallbackType)(
void*);
194 typedef int (*NumberOfComponentsCallbackType)(
void*);
195 typedef void (*PropagateUpdateExtentCallbackType)(
void*,
int*);
196 typedef void (*UpdateDataCallbackType)(
void*);
197 typedef int* (*DataExtentCallbackType)(
void*);
198 typedef void* (*BufferPointerCallbackType)(
void*);
207 vtkSetMacro(UpdateInformationCallback, UpdateInformationCallbackType);
208 vtkGetMacro(UpdateInformationCallback, UpdateInformationCallbackType);
218 vtkSetMacro(PipelineModifiedCallback, PipelineModifiedCallbackType);
219 vtkGetMacro(PipelineModifiedCallback, PipelineModifiedCallbackType);
229 vtkSetMacro(WholeExtentCallback, WholeExtentCallbackType);
230 vtkGetMacro(WholeExtentCallback, WholeExtentCallbackType);
239 vtkSetMacro(SpacingCallback, SpacingCallbackType);
240 vtkGetMacro(SpacingCallback, SpacingCallbackType);
249 vtkSetMacro(OriginCallback, OriginCallbackType);
250 vtkGetMacro(OriginCallback, OriginCallbackType);
259 vtkSetMacro(DirectionCallback, DirectionCallbackType);
260 vtkGetMacro(DirectionCallback, DirectionCallbackType);
269 vtkSetMacro(ScalarTypeCallback, ScalarTypeCallbackType);
270 vtkGetMacro(ScalarTypeCallback, ScalarTypeCallbackType);
279 vtkSetMacro(NumberOfComponentsCallback, NumberOfComponentsCallbackType);
280 vtkGetMacro(NumberOfComponentsCallback, NumberOfComponentsCallbackType);
291 vtkSetMacro(PropagateUpdateExtentCallback, PropagateUpdateExtentCallbackType);
292 vtkGetMacro(PropagateUpdateExtentCallback, PropagateUpdateExtentCallbackType);
301 vtkSetMacro(UpdateDataCallback, UpdateDataCallbackType);
302 vtkGetMacro(UpdateDataCallback, UpdateDataCallbackType);
313 vtkSetMacro(DataExtentCallback, DataExtentCallbackType);
314 vtkGetMacro(DataExtentCallback, DataExtentCallbackType);
324 vtkSetMacro(BufferPointerCallback, BufferPointerCallbackType);
325 vtkGetMacro(BufferPointerCallback, BufferPointerCallbackType);
333 vtkSetMacro(CallbackUserData,
void*);
334 vtkGetMacro(CallbackUserData,
void*);
362 double DataSpacing[3];
363 double DataOrigin[3];
364 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))