DCMTK: I2DImgSource Class Reference

DCMTK Version 3.7.0 OFFIS DICOM Toolkit

Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
I2DImgSource Class Referenceabstract

Base Class for plugins extracting pixel data from standard image files. More...

Inheritance diagram for I2DImgSource:

## Public Member Functions
| I2DImgSource ()
| Constructor.
virtual OFString | inputFormat () const =0
| Returns identifier for the image input format the plugin imports.
virtual 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)=0
| Extracts the raw pixel data stream from image file and returns some further information about this pixel data.
virtual OFCondition | getLossyComprInfo (OFBool &srcEncodingLossy, OFString &srcLossyComprMethod) const =0
| After reading of pixel data, this function can be used for getting information about lossy compression parameters.
void | setImageFile (const OFString &filename)
| Sets the input image file to read.
OFString | getImageFile ()
| Returns the input image file that currently associated with plugin.
virtual | ~I2DImgSource ()
| Virtual Destructor.

## Protected Attributes
OFString | m_imageFile
| The input file.

## Detailed Description

Base Class for plugins extracting pixel data from standard image files.

## Member Function Documentation

## ◆ getImageFile()

OFString I2DImgSource::getImageFile | ( |  | ) |
| inline

Returns the input image file that currently associated with plugin.

Returns
  The filename of the image input file

References m_imageFile.

## ◆ getLossyComprInfo()

virtual OFCondition I2DImgSource::getLossyComprInfo | ( | OFBool & | srcEncodingLossy,
|  | OFString & | srcLossyComprMethod ) const
| pure virtual

After reading of pixel data, this function can be used for getting information about lossy compression parameters.

Parameters

  srcEncodingLossy | - [out] Denotes, whether the encoding of the pixel data read was lossy (OFTrue) or lossless (OFFalse)
  srcLossyComprMethod | - [out] Denotes the lossy compression method used in source if there is one (srcEncodingLossy = OFTrue). Should use defined terms of attribute Lossy Compression Method.

Returns
  EC_Normal if information is available, error otherwise

Implemented in I2DBmpSource, and I2DJpegSource.

## ◆ inputFormat()

virtual OFString I2DImgSource::inputFormat | ( |  | ) | const
| pure virtual

Returns identifier for the image input format the plugin imports.

Returns
  A short identifier of the input format

Implemented in I2DBmpSource, and I2DJpegSource.

## ◆ readPixelData()

virtual OFCondition I2DImgSource::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 )
| pure virtual

Extracts the raw pixel data stream from image file and returns some further information about this pixel data.

This function allocates memory for the pixel data returned to the user. The caller of this function is responsible for deleting the memory buffer

Parameters

  rows | - [out] Rows of image
  cols | - [out] Columns of image
  samplesPerPixel | - [out] Number of components per pixel
  photoMetrInt | - [out] The DICOM color model used for the compressed data
  bitsAlloc | - [out] Bits Allocated for one sample
  bitsStored | - [out] Bits Stored, number of bits stored within Bits Allocated
  highBit | - [out] High Bit, highest bit position set within Bits Allocated
  pixelRepr | - [out] Pixel Representation (0=unsigned, 1=signed)
  planConf | - [out] Planar Configuration
  pixAspectH | - [out] Horizontal value of pixel aspect ratio
  pixAspectV | - [out] Vertical value of pixel aspect ratio
  pixData | - [out] Pointer to the pixel data
  length | - [out] Length of pixel data
  ts | - [out] The transfer syntax imposed by the imported pixel pixel data

Returns
  EC_Normal, if successful, error otherwise

Implemented in I2DBmpSource, and I2DJpegSource.

## ◆ setImageFile()

void I2DImgSource::setImageFile | ( | const OFString & | filename | ) |
| inline

Sets the input image file to read.

Parameters

  filename | - [in] The filename of the image input file

References m_imageFile.

The documentation for this class was generated from the following file:

- dcmdata/include/dcmtk/dcmdata/libi2d/i2dimgs.h

Generated on for DCMTK Version 3.7.0 by Doxygen 1.16.1