C# (CSharp) CSJ2K.j2k.image.input Пространство имен

Классы

Имя Описание
ImgReader This is the generic interface to be implemented by all image file (or other resource) readers for different image file formats.

An ImgReader behaves as an ImgData object. Whenever image data is requested through the getInternCompData() or getCompData() methods, the image data will be read (if it is not buffered) and returned. Implementing classes should not buffer large amounts of data, so as to reduce memory usage.

This class sets the image origin to (0,0). All default implementations of the methods assume this.

This class provides default implementations of many methods. These default implementations assume that there is no tiling (i.e., the only tile is the entire image), that the image origin is (0,0) in the canvas system and that there is no component subsampling (all components are the same size), but they can be overloaded by the implementating class if need be.

ImgReaderPGM This class implements the ImgData interface for reading 8 bit unsigned data from a binary PGM file.

After being read the coefficients are level shifted by subtracting 2^(nominal bit range-1)

The TransferType (see ImgData) of this class is TYPE_INT.

NOTE: This class is not thread safe, for reasons of internal buffering.

ImgReaderPGX This class extends the ImgReader abstract class for reading PGX files. PGX is a custom monochrome file format invented specifically to simplify the use of JPEG 2000 with images of different bit-depths in the range 1 to 31 bits per pixel.

The file consists of a one line text header followed by the data.

Header: "PG"+ ws +<endianess>+ ws +[sign]+ws + <bit-depth>+" "+<width>+" "+<height>+'\n'

where:

  • ws (white-spaces) is any combination of characters ' ' and '\t'.
  • endianess equals "LM" or "ML"(resp. little-endian or big-endian)
  • sign equals "+" or "-" (resp. unsigned or signed). If omited, values are supposed to be unsigned.
  • bit-depth that can be any number between 1 and 31.
  • width and height are the image dimensions (in pixels).
Data: The image binary values appear one after the other (in raster order) immediately after the last header character ('\n') and are byte-aligned (they are packed into 1,2 or 4 bytes per sample, depending upon the bit-depth value).

If the data is unisigned, level shifting is applied subtracting 2^(bitdepth - 1)

Since it is not possible to know the input file byte-ordering before reading its header, this class can not be construct from a RandomAccessIO. So, the constructor has to open first the input file, to read only its header, and then it can create the appropriate BufferedRandomAccessFile (Big-Endian or Little-Endian byte-ordering).

NOTE: This class is not thread safe, for reasons of internal buffering.

ImgReaderPPM This class implements the ImgData interface for reading 8 bits unsigned data from a binary PPM file

After being read the coefficients are level shifted by subtracting 2^(nominal bit range - 1)

The transfer type (see ImgData) of this class is TYPE_INT.

This class is buffered: the 3 input components(R,G,B) are read when the first one (R) is asked. The 2 others are stored until they are needed.

NOTE: This class is not thread safe, for reasons of internal buffering.