41 #ifndef vtkImageReader2_h
42 #define vtkImageReader2_h
44 #include "vtkIOImageModule.h"
49 #define VTK_FILE_BYTE_ORDER_BIG_ENDIAN 0
50 #define VTK_FILE_BYTE_ORDER_LITTLE_ENDIAN 1
65 vtkGetStringMacro(FileName);
89 vtkGetStringMacro(FilePrefix);
98 vtkGetStringMacro(FilePattern);
135 vtkGetMacro(DataScalarType,
int);
142 vtkSetMacro(NumberOfScalarComponents,
int);
143 vtkGetMacro(NumberOfScalarComponents,
int);
150 vtkSetVector6Macro(DataExtent,
int);
151 vtkGetVector6Macro(DataExtent,
int);
158 vtkSetMacro(FileDimensionality,
int);
166 vtkSetVector3Macro(DataSpacing,
double);
167 vtkGetVector3Macro(DataSpacing,
double);
174 vtkSetVector3Macro(DataOrigin,
double);
175 vtkGetVector3Macro(DataOrigin,
double);
182 vtkSetVectorMacro(DataDirection,
double, 9);
183 vtkGetVectorMacro(DataDirection,
double, 9);
226 vtkSetMacro(FileNameSliceOffset,
int);
227 vtkGetMacro(FileNameSliceOffset,
int);
236 vtkSetMacro(FileNameSliceSpacing,
int);
237 vtkGetMacro(FileNameSliceSpacing,
int);
250 vtkGetVectorMacro(DataIncrements,
unsigned long, 4);
271 vtkGetStringMacro(InternalFileName);
283 virtual int CanReadFile(
const char* vtkNotUsed(fname)) {
return 0; }
316 unsigned long DataIncrements[4];
325 double DataSpacing[3];
326 double DataOrigin[3];
327 double DataDirection[9];
general representation of visualization data
Generic algorithm superclass for image algs.
Superclass of binary file readers.
virtual void ComputeDataIncrements()
virtual int CanReadFile(const char *vtkNotUsed(fname))
Return non zero if the reader can read the given file name.
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()
virtual void SetFilePrefix(const char *)
Specify file prefix for the image file or files.
unsigned long GetHeaderSize(unsigned long slice)
virtual void SetMemoryBufferLength(vtkIdType buflen)
Specify the in memory image buffer length.
int GetFileDimensionality()
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 const char * GetDataByteOrderAsString()
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.
virtual void SetFileName(const char *)
Specify file name for the image file.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void SetDataScalarTypeToInt()
virtual void SetDataScalarTypeToDouble()
~vtkImageReader2() override
virtual void SetDataScalarTypeToChar()
virtual void SetDataByteOrderToLittleEndian()
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 SetFilePattern(const char *)
The snprintf-style format string used to build filename from FilePrefix and slice number.
virtual void SetDataScalarTypeToUnsignedChar()
virtual const void * GetMemoryBuffer()
const void * MemoryBuffer
virtual void SetDataByteOrder(int)
virtual void SetDataByteOrderToBigEndian()
These methods should be used instead of the SwapBytes methods.
unsigned long ManualHeaderSize
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 vtkTypeBool GetSwapBytes()
a simple class to control print indentation
a vtkAbstractArray subclass for strings
#define VTK_UNSIGNED_CHAR
#define VTK_UNSIGNED_SHORT