C# 클래스 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.

상속: BlkImgDataSrc
파일 보기 프로젝트 열기: cureos/csj2k

보호된 프로퍼티들

프로퍼티 타입 설명
h int
nc int
w int

공개 메소드들

메소드 설명
close ( ) : void

Closes the underlying file or network connection from where the image data is being read.

getCompData ( CSJ2K.j2k.image.DataBlk blk, int c ) : CSJ2K.j2k.image.DataBlk
getCompImgHeight ( int c ) : int

Returns the height in pixels of the specified component in the overall image. This default implementation assumes no component, or component, subsampling (i.e. all components have the same dimensions in pixels).

getCompImgWidth ( int c ) : int

Returns the width in pixels of the specified component in the overall image. This default implementation assumes no component, or component, subsampling (i.e. all components have the same dimensions in pixels).

getCompSubsX ( int c ) : int

Returns the component subsampling factor in the horizontal direction, for the specified component. This is, approximately, the ratio of dimensions between the reference grid and the component itself, see the 'ImgData' interface desription for details.

getCompSubsY ( int c ) : int

Returns the component subsampling factor in the vertical direction, for the specified component. This is, approximately, the ratio of dimensions between the reference grid and the component itself, see the 'ImgData' interface desription for details.

getCompULX ( int c ) : int

Returns the horizontal coordinate of the upper-left corner of the specified component in the current tile.

getCompULY ( int c ) : int

Returns the vertical coordinate of the upper-left corner of the specified component in the current tile.

getFixedPoint ( int c ) : int
getInternCompData ( CSJ2K.j2k.image.DataBlk blk, int c ) : CSJ2K.j2k.image.DataBlk
getNomRangeBits ( int c ) : int
getNumTiles ( Coord co ) : Coord

Returns the number of tiles in the horizontal and vertical directions. This default implementation assumes no tiling, so (1,1) is always returned.

getNumTiles ( ) : int

Returns the total number of tiles in the image. This default implementation assumes no tiling, so 1 is always returned.

getTile ( Coord co ) : Coord

Returns the coordinates of the current tile. This default implementation assumes no-tiling, so (0,0) is returned.

getTileCompHeight ( int t, int c ) : int

Returns the height in pixels of the specified tile-component. This default implementation assumes no tiling and no component subsampling (i.e., all components, or components, have the same dimensions in pixels).

getTileCompWidth ( int t, int c ) : int

Returns the width in pixels of the specified tile-component. This default implementation assumes no tiling and no component subsampling (i.e., all components, or components, have the same dimensions in pixels).

isOrigSigned ( int c ) : bool

Returns true if the data read was originally signed in the specified component, false if not.

nextTile ( ) : void

Advances to the next tile, in standard scan-line order (by rows then columns). A NoNextElementException is thrown if the current tile is the last one (i.e. there is no next tile). This default implementation assumes no tiling, so NoNextElementException() is always thrown.

setTile ( int x, int y ) : void

Changes the current tile, given the new coordinates. An IllegalArgumentException is thrown if the coordinates do not correspond to a valid tile. This default implementation assumes no tiling so the only valid arguments are x=0, y=0.

메소드 상세

close() 공개 추상적인 메소드

Closes the underlying file or network connection from where the image data is being read.
If an I/O error occurs. ///
public abstract close ( ) : void
리턴 void

getCompData() 공개 추상적인 메소드

public abstract getCompData ( CSJ2K.j2k.image.DataBlk blk, int c ) : CSJ2K.j2k.image.DataBlk
blk CSJ2K.j2k.image.DataBlk
c int
리턴 CSJ2K.j2k.image.DataBlk

getCompImgHeight() 공개 메소드

Returns the height in pixels of the specified component in the overall image. This default implementation assumes no component, or component, subsampling (i.e. all components have the same dimensions in pixels).
public getCompImgHeight ( int c ) : int
c int The index of the component, from 0 to C-1. /// ///
리턴 int

getCompImgWidth() 공개 메소드

Returns the width in pixels of the specified component in the overall image. This default implementation assumes no component, or component, subsampling (i.e. all components have the same dimensions in pixels).
public getCompImgWidth ( int c ) : int
c int The index of the component, from 0 to C-1. /// ///
리턴 int

getCompSubsX() 공개 메소드

Returns the component subsampling factor in the horizontal direction, for the specified component. This is, approximately, the ratio of dimensions between the reference grid and the component itself, see the 'ImgData' interface desription for details.
public getCompSubsX ( int c ) : int
c int The index of the component (between 0 and C-1) /// ///
리턴 int

getCompSubsY() 공개 메소드

Returns the component subsampling factor in the vertical direction, for the specified component. This is, approximately, the ratio of dimensions between the reference grid and the component itself, see the 'ImgData' interface desription for details.
public getCompSubsY ( int c ) : int
c int The index of the component (between 0 and C-1) /// ///
리턴 int

getCompULX() 공개 메소드

Returns the horizontal coordinate of the upper-left corner of the specified component in the current tile.
public getCompULX ( int c ) : int
c int The component index. /// ///
리턴 int

getCompULY() 공개 메소드

Returns the vertical coordinate of the upper-left corner of the specified component in the current tile.
public getCompULY ( int c ) : int
c int The component index. /// ///
리턴 int

getFixedPoint() 공개 추상적인 메소드

public abstract getFixedPoint ( int c ) : int
c int
리턴 int

getInternCompData() 공개 추상적인 메소드

public abstract getInternCompData ( CSJ2K.j2k.image.DataBlk blk, int c ) : CSJ2K.j2k.image.DataBlk
blk CSJ2K.j2k.image.DataBlk
c int
리턴 CSJ2K.j2k.image.DataBlk

getNomRangeBits() 공개 추상적인 메소드

public abstract getNomRangeBits ( int c ) : int
c int
리턴 int

getNumTiles() 공개 메소드

Returns the number of tiles in the horizontal and vertical directions. This default implementation assumes no tiling, so (1,1) is always returned.
public getNumTiles ( Coord co ) : Coord
co Coord If not null this object is used to return the information. If /// null a new one is created and returned. /// ///
리턴 Coord

getNumTiles() 공개 메소드

Returns the total number of tiles in the image. This default implementation assumes no tiling, so 1 is always returned.
public getNumTiles ( ) : int
리턴 int

getTile() 공개 메소드

Returns the coordinates of the current tile. This default implementation assumes no-tiling, so (0,0) is returned.
public getTile ( Coord co ) : Coord
co Coord If not null this object is used to return the information. If /// null a new one is created and returned. /// ///
리턴 Coord

getTileCompHeight() 공개 메소드

Returns the height in pixels of the specified tile-component. This default implementation assumes no tiling and no component subsampling (i.e., all components, or components, have the same dimensions in pixels).
public getTileCompHeight ( int t, int c ) : int
t int The tile index /// ///
c int The index of the component, from 0 to C-1. /// ///
리턴 int

getTileCompWidth() 공개 메소드

Returns the width in pixels of the specified tile-component. This default implementation assumes no tiling and no component subsampling (i.e., all components, or components, have the same dimensions in pixels).
public getTileCompWidth ( int t, int c ) : int
t int Tile index /// ///
c int The index of the component, from 0 to C-1. /// ///
리턴 int

isOrigSigned() 공개 추상적인 메소드

Returns true if the data read was originally signed in the specified component, false if not.
public abstract isOrigSigned ( int c ) : bool
c int The index of the component, from 0 to C-1. /// ///
리턴 bool

nextTile() 공개 메소드

Advances to the next tile, in standard scan-line order (by rows then columns). A NoNextElementException is thrown if the current tile is the last one (i.e. there is no next tile). This default implementation assumes no tiling, so NoNextElementException() is always thrown.
public nextTile ( ) : void
리턴 void

setTile() 공개 메소드

Changes the current tile, given the new coordinates. An IllegalArgumentException is thrown if the coordinates do not correspond to a valid tile. This default implementation assumes no tiling so the only valid arguments are x=0, y=0.
public setTile ( int x, int y ) : void
x int The horizontal coordinate of the tile. /// ///
y int The vertical coordinate of the new tile. /// ///
리턴 void

프로퍼티 상세

h 보호되어 있는 프로퍼티

The height of the image
protected int h
리턴 int

nc 보호되어 있는 프로퍼티

The number of components in the image
protected int nc
리턴 int

w 보호되어 있는 프로퍼티

The width of the image
protected int w
리턴 int