135 #ifndef vtkHDRReader_h
136 #define vtkHDRReader_h
138 #include "vtkIOImageModule.h"
153 FORMAT_32BIT_RLE_RGBE = 0,
154 FORMAT_32BIT_RLE_XYZE
161 vtkGetMacro(Format,
int);
169 vtkGetMacro(Gamma,
double);
177 vtkGetMacro(Exposure,
double);
185 vtkGetMacro(PixelAspect,
double);
218 bool FlippedX =
false;
223 bool SwappedAxis =
false;
247 void FillOutPtrRLE(
int* outExt,
float*& outPtr, std::vector<unsigned char>& lineBuffer);
248 void FillOutPtrNoRLE(
int* outExt,
float*& outPtr, std::vector<unsigned char>& lineBuffer);
265 void RGBE2Float(
unsigned char rgbe[4],
float& r,
float& g,
float& b);
272 static void XYZ2RGB(
const float convertMatrix[3][3],
float& r,
float& g,
float& b);
general representation of visualization data
int CanReadFile(VTK_FILEPATH const char *fname) override
Is the given file a HDR file?
const char * GetDescriptiveName() override
Return a descriptive name for the file format that might be useful in a GUI.
void FillOutPtrNoRLE(int *outExt, float *&outPtr, std::vector< unsigned char > &lineBuffer)
static void XYZ2RGB(const float convertMatrix[3][3], float &r, float &g, float &b)
Conversion from xyz to rgb float using the 3x3 convert matrix.
void FillOutPtrRLE(int *outExt, float *&outPtr, std::vector< unsigned char > &lineBuffer)
void ConvertAllDataFromRGBToXYZ(float *outPtr, int size)
void ExecuteDataWithInformation(vtkDataObject *out, vtkInformation *outInfo) override
This is a convenience method that is implemented in many subclasses instead of RequestData.
bool ReadLineRLE(istream *is, unsigned char *lineBufferPtr)
Read a line of the file from is into lineBuffer with RLE encoding.
bool ReadAllFileNoRLE(istream *is, float *outPtr, int decrPtr, int *outExt)
Read the file from is into outPtr with no RLE encoding.
bool HDRReaderUpdateSlice(float *outPtr, int *outExt)
static vtkHDRReader * New()
void RGBE2Float(unsigned char rgbe[4], float &r, float &g, float &b)
Standard conversion from rgbe to float pixels.
void HDRReaderUpdate(vtkImageData *data, float *outPtr)
const char * GetFileExtensions() override
Get the file extensions for this format.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void ExecuteInformation() override
bool ReadHeaderData()
Read the header data and fill attributes of HDRReader, as well as DataExtent.
bool HasError(istream *is)
If the stream has an error, close the file and return true.
topologically and geometrically regular array of data
Superclass of transformable binary file readers.
a simple class to control print indentation