156 #ifndef vtkImageReader2_h
157 #define vtkImageReader2_h
159 #include "vtkIOImageModule.h"
164 #define VTK_FILE_BYTE_ORDER_BIG_ENDIAN 0
165 #define VTK_FILE_BYTE_ORDER_LITTLE_ENDIAN 1
250 vtkGetMacro(DataScalarType,
int);
257 vtkSetMacro(NumberOfScalarComponents,
int);
258 vtkGetMacro(NumberOfScalarComponents,
int);
265 vtkSetVector6Macro(DataExtent,
int);
266 vtkGetVector6Macro(DataExtent,
int);
273 vtkSetMacro(FileDimensionality,
int);
281 vtkSetVector3Macro(DataSpacing,
double);
282 vtkGetVector3Macro(DataSpacing,
double);
289 vtkSetVector3Macro(DataOrigin,
double);
290 vtkGetVector3Macro(DataOrigin,
double);
297 vtkSetVectorMacro(DataDirection,
double, 9);
298 vtkGetVectorMacro(DataDirection,
double, 9);
341 vtkSetMacro(FileNameSliceOffset,
int);
342 vtkGetMacro(FileNameSliceOffset,
int);
351 vtkSetMacro(FileNameSliceSpacing,
int);
352 vtkGetMacro(FileNameSliceSpacing,
int);
365 vtkGetVectorMacro(DataIncrements,
unsigned long, 4);
431 unsigned long DataIncrements[4];
440 double DataSpacing[3];
441 double DataOrigin[3];
442 double DataDirection[9];
general representation of visualization data
Generic algorithm superclass for image algs.
Superclass of binary file readers.
virtual void ComputeDataIncrements()
vtkGetFilePathMacro(FilePrefix)
Specify file prefix for the image file or files.
vtkTypeBool FileLowerLeft
void ExecuteDataWithInformation(vtkDataObject *data, vtkInformation *outInfo) override
This is a convenience method that is implemented in many subclasses instead of RequestData.
unsigned long GetHeaderSize()
Get the size of the header computed by this object.
virtual int GetDataByteOrder()
These methods should be used instead of the SwapBytes methods.
vtkGetFilePathMacro(InternalFileName)
Set/Get the internal file name.
unsigned long GetHeaderSize(unsigned long slice)
Get the size of the header computed by this object.
virtual void SetMemoryBufferLength(vtkIdType buflen)
Specify the in memory image buffer length.
int GetFileDimensionality()
The number of dimensions stored in a file.
virtual void SetMemoryBuffer(const void *)
Specify the in memory image buffer.
static vtkImageReader2 * New()
virtual const char * GetFileExtensions()
Get the file extensions for this format.
virtual void SetDataScalarTypeToSignedChar()
int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
virtual void SetFileName(VTK_FILEPATH const char *)
Specify file name for the image file.
virtual int CanReadFile(VTK_FILEPATH const char *vtkNotUsed(fname))
Return non zero if the reader can read the given file name.
virtual const char * GetDataByteOrderAsString()
These methods should be used instead of the SwapBytes methods.
virtual void ComputeInternalFileName(int slice)
Set/Get the internal file name.
virtual void SetDataScalarType(int type)
Set the data type of pixels in the file.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void SetDataScalarTypeToInt()
vtkGetFilePathMacro(FilePattern)
The snprintf-style format string used to build filename from FilePrefix and slice number.
virtual void SetDataScalarTypeToDouble()
vtkGetFilePathMacro(FileName)
Specify file name for the image file.
~vtkImageReader2() override
Return a descriptive name for the file format that might be useful in a GUI.
virtual void SetDataScalarTypeToChar()
vtkImageReader2()
Return a descriptive name for the file format that might be useful in a GUI.
virtual void SetDataByteOrderToLittleEndian()
These methods should be used instead of the SwapBytes methods.
vtkIdType MemoryBufferLength
virtual void SetHeaderSize(unsigned long size)
If there is a tail on the file, you want to explicitly set the header size.
virtual void SetDataScalarTypeToUnsignedChar()
virtual const void * GetMemoryBuffer()
const void * MemoryBuffer
virtual void SetDataByteOrder(int)
These methods should be used instead of the SwapBytes methods.
virtual void SetDataByteOrderToBigEndian()
These methods should be used instead of the SwapBytes methods.
unsigned long ManualHeaderSize
virtual void SetFilePrefix(VTK_FILEPATH const char *)
Specify file prefix for the image file or files.
virtual void SetDataScalarTypeToFloat()
virtual void SetDataScalarTypeToShort()
virtual void SeekFile(int i, int j, int k)
virtual void SetFileNames(vtkStringArray *)
Specify a list of file names.
virtual void SetDataScalarTypeToUnsignedShort()
vtkStringArray * FileNames
vtkIdType GetMemoryBufferLength()
virtual void SetDataScalarTypeToUnsignedInt()
virtual void ExecuteInformation()
int NumberOfScalarComponents
virtual const char * GetDescriptiveName()
Return a descriptive name for the file format that might be useful in a GUI.
virtual void SetFilePattern(VTK_FILEPATH const char *)
The snprintf-style format string used to build filename from FilePrefix and slice number.
virtual vtkTypeBool GetSwapBytes()
Set/Get the byte swapping to explicitly swap the bytes of a file.
a simple class to control print indentation
a vtkAbstractArray subclass for strings
#define VTK_UNSIGNED_CHAR
#define VTK_UNSIGNED_SHORT