41 #ifndef vtkImageReader2_h
42 #define vtkImageReader2_h
44 #include "vtkIOImageModule.h"
45 #include "vtkImageAlgorithm.h"
49 #define VTK_FILE_BYTE_ORDER_BIG_ENDIAN 0
50 #define VTK_FILE_BYTE_ORDER_LITTLE_ENDIAN 1
65 vtkGetStringMacro(FileName);
77 vtkGetObjectMacro(FileNames, vtkStringArray);
89 vtkGetStringMacro(FilePrefix);
98 vtkGetStringMacro(FilePattern);
107 virtual void *GetMemoryBuffer() {
return this->MemoryBuffer; }
113 vtkIdType GetMemoryBufferLength() {
return this->MemoryBufferLength; }
121 virtual void SetDataScalarTypeToFloat(){this->SetDataScalarType(VTK_FLOAT);}
122 virtual void SetDataScalarTypeToDouble(){this->SetDataScalarType(VTK_DOUBLE);}
123 virtual void SetDataScalarTypeToInt(){this->SetDataScalarType(VTK_INT);}
124 virtual void SetDataScalarTypeToUnsignedInt(){this->SetDataScalarType(VTK_UNSIGNED_INT);}
125 virtual void SetDataScalarTypeToShort(){this->SetDataScalarType(VTK_SHORT);}
126 virtual void SetDataScalarTypeToUnsignedShort()
127 {this->SetDataScalarType(VTK_UNSIGNED_SHORT);}
128 virtual void SetDataScalarTypeToChar()
129 {this->SetDataScalarType(VTK_CHAR);}
130 virtual void SetDataScalarTypeToSignedChar()
131 {this->SetDataScalarType(VTK_SIGNED_CHAR);}
132 virtual void SetDataScalarTypeToUnsignedChar()
133 {this->SetDataScalarType(VTK_UNSIGNED_CHAR);}
139 vtkGetMacro(DataScalarType,
int);
146 vtkSetMacro(NumberOfScalarComponents,
int);
147 vtkGetMacro(NumberOfScalarComponents,
int);
154 vtkSetVector6Macro(DataExtent,
int);
155 vtkGetVector6Macro(DataExtent,
int);
162 vtkSetMacro(FileDimensionality,
int);
163 int GetFileDimensionality() {
return this->FileDimensionality;}
170 vtkSetVector3Macro(DataSpacing,
double);
171 vtkGetVector3Macro(DataSpacing,
double);
178 vtkSetVector3Macro(DataOrigin,
double);
179 vtkGetVector3Macro(DataOrigin,
double);
187 unsigned long GetHeaderSize(
unsigned long slice);
211 virtual void SetDataByteOrderToLittleEndian();
212 virtual int GetDataByteOrder();
213 virtual void SetDataByteOrder(
int);
214 virtual const char *GetDataByteOrderAsString();
222 vtkSetMacro(FileNameSliceOffset,
int);
223 vtkGetMacro(FileNameSliceOffset,
int);
232 vtkSetMacro(FileNameSliceSpacing,
int);
233 vtkGetMacro(FileNameSliceSpacing,
int);
241 vtkSetMacro(SwapBytes,
int);
242 virtual int GetSwapBytes() {
return this->SwapBytes;}
243 vtkBooleanMacro(SwapBytes,
int);
246 ifstream *GetFile() {
return this->File;}
247 vtkGetVectorMacro(DataIncrements,
unsigned long,4);
249 virtual int OpenFile();
250 virtual void SeekFile(
int i,
int j,
int k);
257 vtkBooleanMacro(FileLowerLeft,
int);
258 vtkGetMacro(FileLowerLeft,
int);
259 vtkSetMacro(FileLowerLeft,
int);
267 vtkGetStringMacro(InternalFileName);
307 vtkStringArray *FileNames;
309 char *InternalFileName;
313 int NumberOfScalarComponents;
317 vtkIdType MemoryBufferLength;
320 unsigned long DataIncrements[4];
324 int FileDimensionality;
325 unsigned long HeaderSize;
327 unsigned long ManualHeaderSize;
329 double DataSpacing[3];
330 double DataOrigin[3];
332 int FileNameSliceOffset;
333 int FileNameSliceSpacing;
336 vtkInformationVector** inputVector,
337 vtkInformationVector* outputVector);
338 virtual void ExecuteInformation();
340 virtual void ComputeDataIncrements();
Generic algorithm superclass for image algs.
Definition: vtkImageAlgorithm.h:38
Superclass of binary file readers.
Definition: vtkImageReader2.h:53
virtual int CanReadFile(const char *vtkNotUsed(fname))
Definition: vtkImageReader2.h:279
unsigned long GetHeaderSize()
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
virtual void SetFilePrefix(const char *)
virtual void SetMemoryBufferLength(vtkIdType buflen)
virtual const char * GetFileExtensions()
Definition: vtkImageReader2.h:289
virtual void SetMemoryBuffer(void *)
virtual void ComputeInternalFileName(int slice)
virtual void SetDataScalarType(int type)
virtual void SetFileName(const char *)
void PrintSelf(ostream &os, vtkIndent indent)
virtual void SetHeaderSize(unsigned long size)
virtual void SetFilePattern(const char *)
virtual void SetDataByteOrderToBigEndian()
virtual void SetFileNames(vtkStringArray *)
virtual void ExecuteDataWithInformation(vtkDataObject *data, vtkInformation *outInfo)
virtual const char * GetDescriptiveName()
Definition: vtkImageReader2.h:298