32 #include "dcmtk/config/osconfig.h" 33 #include "dcmtk/dcmdata/libi2d/i2dimgs.h" 34 #include "dcmtk/ofstd/offile.h" 79 Uint16& samplesPerPixel,
90 E_TransferSyntax& ts);
104 srcEncodingLossy = OFFalse;
172 const OFBool isTopDown,
174 const Uint32* palette,
188 char *pixData )
const;
198 char *pixData )
const;
213 const Uint32* palette,
214 char *pixData )
const;
238 #endif // #ifndef I2DBMPS_H this class provides a simple C++ encapsulation layer for stdio FILE pointers.
OFFile bmpFile
The BMP file, if opened.
OFCondition readBitmapHeader(Uint16 &width, Uint16 &height, Uint16 &bpp, OFBool &isTopDown, Uint16 &colors)
Reads and checks the BMP bitmap header.
OFCondition openFile(const OFString &filename)
Opens the BMP file specified by the given filename.
int readDWord(Uint32 &result)
Read 4 bytes from the byte stream.
OFCondition readPixelData(Uint16 &rows, Uint16 &cols, Uint16 &samplesPerPixel, OFString &photoMetrInt, Uint16 &bitsAlloc, Uint16 &bitsStored, Uint16 &highBit, Uint16 &pixelRepr, Uint16 &planConf, Uint16 &pixAspectH, Uint16 &pixAspectV, char *&pixData, Uint32 &length, E_TransferSyntax &ts)
Extracts the raw BMP pixel data stream from a BMP file and returns some image information about this ...
OFCondition readColorPalette(Uint16 colors, Uint32 *&palette)
Read the color palette from the file.
virtual OFCondition getLossyComprInfo(OFBool &srcEncodingLossy, OFString &) const
After reading of pixel data, this function can be used for getting information about lossy compressio...
int readLong(Sint32 &result)
Read 4 bytes from the byte stream and interpret it as a signed integer.
void closeFile()
Closes BMP file.
OFCondition readFileHeader(Uint32 &offset)
Reads and checks the BMP file header.
I2DBmpSource()
Constructor, initializes member variables.
OFCondition parse24_32BppRow(const Uint8 *row, const Uint16 width, const int bpp, char *pixData) const
Parse a single 24bpp or 32bpp row of bmp data.
OFCondition parseIndexedColorRow(const Uint8 *row, const Uint16 width, const int bpp, const Uint16 colors, const Uint32 *palette, char *pixData) const
Parse a single 1, 4 or 8bpp row of bmp data.
virtual ~I2DBmpSource()
Destructor, frees some memory.
OFString inputFormat() const
Returns format of input image.
OFCondition parse16BppRow(const Uint8 *row, const Uint16 width, char *pixData) const
Parse a single 16bpp row of bmp data.
int readWord(Uint16 &result)
Read 2 bytes from the byte stream.
a simple string class that implements a subset of std::string.
OFCondition readBitmapData(const Uint16 width, const Uint16 height, const Uint16 bpp, const OFBool isTopDown, const Uint16 colors, const Uint32 *palette, char *&pixData, Uint32 &length)
Read the bitmap data.
This is a I2DImgSource implementation that can parse BMP files and convert them into DICOM images...
General purpose class for condition codes.