51#ifndef vtkImageImport_h
52#define vtkImageImport_h
54#include "vtkIOImageModule.h"
96 vtkSetMacro(DataScalarType,
int);
103 vtkGetMacro(DataScalarType,
int);
106 return vtkImageScalarTypeNameMacro(this->DataScalarType);
115 vtkSetMacro(NumberOfScalarComponents,
int);
116 vtkGetMacro(NumberOfScalarComponents,
int);
126 vtkSetVector6Macro(DataExtent,
int);
127 vtkGetVector6Macro(DataExtent,
int);
136 vtkSetVector3Macro(DataSpacing,
double);
137 vtkGetVector3Macro(DataSpacing,
double);
145 vtkSetVector3Macro(DataOrigin,
double);
146 vtkGetVector3Macro(DataOrigin,
double);
155 vtkSetVectorMacro(DataDirection,
double, 9);
156 vtkGetVectorMacro(DataDirection,
double, 9);
165 vtkSetVector6Macro(WholeExtent,
int);
166 vtkGetVector6Macro(WholeExtent,
int);
185 vtkSetStringMacro(ScalarArrayName);
186 vtkGetStringMacro(ScalarArrayName);
194 typedef void (*UpdateInformationCallbackType)(
void*);
195 typedef int (*PipelineModifiedCallbackType)(
void*);
196 typedef int* (*WholeExtentCallbackType)(
void*);
197 typedef double* (*SpacingCallbackType)(
void*);
198 typedef double* (*OriginCallbackType)(
void*);
199 typedef double* (*DirectionCallbackType)(
void*);
200 typedef const char* (*ScalarTypeCallbackType)(
void*);
201 typedef int (*NumberOfComponentsCallbackType)(
void*);
202 typedef void (*PropagateUpdateExtentCallbackType)(
void*,
int*);
203 typedef void (*UpdateDataCallbackType)(
void*);
204 typedef int* (*DataExtentCallbackType)(
void*);
205 typedef void* (*BufferPointerCallbackType)(
void*);
214 vtkSetMacro(UpdateInformationCallback, UpdateInformationCallbackType);
215 vtkGetMacro(UpdateInformationCallback, UpdateInformationCallbackType);
225 vtkSetMacro(PipelineModifiedCallback, PipelineModifiedCallbackType);
226 vtkGetMacro(PipelineModifiedCallback, PipelineModifiedCallbackType);
236 vtkSetMacro(WholeExtentCallback, WholeExtentCallbackType);
237 vtkGetMacro(WholeExtentCallback, WholeExtentCallbackType);
246 vtkSetMacro(SpacingCallback, SpacingCallbackType);
247 vtkGetMacro(SpacingCallback, SpacingCallbackType);
256 vtkSetMacro(OriginCallback, OriginCallbackType);
257 vtkGetMacro(OriginCallback, OriginCallbackType);
266 vtkSetMacro(DirectionCallback, DirectionCallbackType);
267 vtkGetMacro(DirectionCallback, DirectionCallbackType);
276 vtkSetMacro(ScalarTypeCallback, ScalarTypeCallbackType);
277 vtkGetMacro(ScalarTypeCallback, ScalarTypeCallbackType);
286 vtkSetMacro(NumberOfComponentsCallback, NumberOfComponentsCallbackType);
287 vtkGetMacro(NumberOfComponentsCallback, NumberOfComponentsCallbackType);
298 vtkSetMacro(PropagateUpdateExtentCallback, PropagateUpdateExtentCallbackType);
299 vtkGetMacro(PropagateUpdateExtentCallback, PropagateUpdateExtentCallbackType);
308 vtkSetMacro(UpdateDataCallback, UpdateDataCallbackType);
309 vtkGetMacro(UpdateDataCallback, UpdateDataCallbackType);
320 vtkSetMacro(DataExtentCallback, DataExtentCallbackType);
321 vtkGetMacro(DataExtentCallback, DataExtentCallbackType);
331 vtkSetMacro(BufferPointerCallback, BufferPointerCallbackType);
332 vtkGetMacro(BufferPointerCallback, BufferPointerCallbackType);
340 vtkSetMacro(CallbackUserData,
void*);
341 vtkGetMacro(CallbackUserData,
void*);
369 double DataSpacing[3];
370 double DataOrigin[3];
371 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))