C# Класс CSJ2K.Color.ColorSpaceMapper

This is the base class for all modules in the colorspace and icc profiling steps of the decoding chain. It is responsible for the allocation and iniitialization of all working storage. It provides several utilities which are of generic use in preparing DataBlks for use and provides default implementations for the getCompData and getInternCompData methods.
Наследование: CSJ2K.j2k.image.ImgDataAdapter, BlkImgDataSrc
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
computed ComputedComponents
csMap ColorSpace
dataFloat float[][]
dataInt int[][]
eol System.String
fixedPtBitsArray int[]
inFloat CSJ2K.j2k.image.DataBlkFloat[]
inInt CSJ2K.j2k.image.DataBlkInt[]
maxValueArray int[]
ncomps int
pl CSJ2K.j2k.util.ParameterList
shiftValueArray int[]
src BlkImgDataSrc
srcBlk CSJ2K.j2k.image.DataBlk[]
workDataFloat float[][]
workDataInt int[][]
workFloat DataBlkFloat[]
workInt DataBlkInt[]

Открытые методы

Метод Описание
close ( ) : void

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

createInstance ( BlkImgDataSrc src, ColorSpace csMap ) : BlkImgDataSrc

Factory method for creating instances of this class.

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

Returns, in the blk argument, a block of image data containing the specifed rectangular area, in the specified component. The data is returned, as a copy of the internal data, therefore the returned data can be modified "in place".

The rectangular area to return is specified by the 'ulx', 'uly', 'w' and 'h' members of the 'blk' argument, relative to the current tile. These members are not modified by this method. The 'offset' of the returned data is 0, and the 'scanw' is the same as the block's width. See the 'DataBlk' class.

This method, in general, is less efficient than the 'getInternCompData()' method since, in general, it copies the data. However if the array of returned data is to be modified by the caller then this method is preferable.

If the data array in 'blk' is 'null', then a new one is created. If the data array is not 'null' then it is reused, and it must be large enough to contain the block's data. Otherwise an 'ArrayStoreException' or an 'IndexOutOfBoundsException' is thrown by the Java system.

The returned data may have its 'progressive' attribute set. In this case the returned data is only an approximation of the "final" data.

getFixedPoint ( int c ) : int

Returns the number of bits, referred to as the "range bits", corresponding to the nominal range of the data in the specified component. If this number is b then for unsigned data the nominal range is between 0 and 2^b-1, and for signed data it is between -2^(b-1) and 2^(b-1)-1. For floating point data this value is not applicable.

getInternCompData ( CSJ2K.j2k.image.DataBlk out_Renamed, int c ) : CSJ2K.j2k.image.DataBlk

Returns, in the blk argument, a block of image data containing the specifed rectangular area, in the specified component. The data is returned, as a reference to the internal data, if any, instead of as a copy, therefore the returned data should not be modified.

The rectangular area to return is specified by the 'ulx', 'uly', 'w' and 'h' members of the 'blk' argument, relative to the current tile. These members are not modified by this method. The 'offset' and 'scanw' of the returned data can be arbitrary. See the 'DataBlk' class.

This method, in general, is more efficient than the 'getCompData()' method since it may not copy the data. However if the array of returned data is to be modified by the caller then the other method is probably preferable.

If possible, the data in the returned 'DataBlk' should be the internal data itself, instead of a copy, in order to increase the data transfer efficiency. However, this depends on the particular implementation (it may be more convenient to just return a copy of the data). This is the reason why the returned data should not be modified.

If the data array in blk is null, then a new one is created if necessary. The implementation of this interface may choose to return the same array or a new one, depending on what is more efficient. Therefore, the data array in blk prior to the method call should not be considered to contain the returned data, a new array may have been created. Instead, get the array from blk after the method has returned.

The returned data may have its 'progressive' attribute set. In this case the returned data is only an approximation of the "final" data.

isOrigSigned ( int c ) : bool

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

Защищенные методы

Метод Описание
ColorSpaceMapper ( BlkImgDataSrc src, ColorSpace csMap ) : System

Ctor which creates an ICCProfile for the image and initializes all data objects (input, working, and output).

copyGeometry ( CSJ2K.j2k.image.DataBlk tgt, CSJ2K.j2k.image.DataBlk src ) : void

Copy the DataBlk geometry from source to target DataBlk and assure that the target has an appropriate data buffer.

Приватные методы

Метод Описание
InitBlock ( ) : void
initialize ( ) : void

General utility used by ctors

Описание методов

ColorSpaceMapper() защищенный Метод

Ctor which creates an ICCProfile for the image and initializes all data objects (input, working, and output).
protected ColorSpaceMapper ( BlkImgDataSrc src, ColorSpace csMap ) : System
src BlkImgDataSrc -- Source of image data ///
csMap ColorSpace
Результат System

close() публичный Метод

Closes the underlying file or network connection from where the image data is being read.
If an I/O error occurs. ///
public close ( ) : void
Результат void

copyGeometry() защищенный статический Метод

Copy the DataBlk geometry from source to target DataBlk and assure that the target has an appropriate data buffer.
protected static copyGeometry ( CSJ2K.j2k.image.DataBlk tgt, CSJ2K.j2k.image.DataBlk src ) : void
tgt CSJ2K.j2k.image.DataBlk has its geometry set. ///
src CSJ2K.j2k.image.DataBlk used to get the new geometric parameters. ///
Результат void

createInstance() публичный статический Метод

Factory method for creating instances of this class.
profile access exception ///
public static createInstance ( BlkImgDataSrc src, ColorSpace csMap ) : BlkImgDataSrc
src BlkImgDataSrc -- source of image data ///
csMap ColorSpace -- provides colorspace info ///
Результат BlkImgDataSrc

getCompData() публичный Метод

Returns, in the blk argument, a block of image data containing the specifed rectangular area, in the specified component. The data is returned, as a copy of the internal data, therefore the returned data can be modified "in place".

The rectangular area to return is specified by the 'ulx', 'uly', 'w' and 'h' members of the 'blk' argument, relative to the current tile. These members are not modified by this method. The 'offset' of the returned data is 0, and the 'scanw' is the same as the block's width. See the 'DataBlk' class.

This method, in general, is less efficient than the 'getInternCompData()' method since, in general, it copies the data. However if the array of returned data is to be modified by the caller then this method is preferable.

If the data array in 'blk' is 'null', then a new one is created. If the data array is not 'null' then it is reused, and it must be large enough to contain the block's data. Otherwise an 'ArrayStoreException' or an 'IndexOutOfBoundsException' is thrown by the Java system.

The returned data may have its 'progressive' attribute set. In this case the returned data is only an approximation of the "final" data.

public getCompData ( CSJ2K.j2k.image.DataBlk out_Renamed, int c ) : CSJ2K.j2k.image.DataBlk
out_Renamed CSJ2K.j2k.image.DataBlk
c int The index of the component from which to get the data. /// ///
Результат CSJ2K.j2k.image.DataBlk

getFixedPoint() публичный Метод

Returns the number of bits, referred to as the "range bits", corresponding to the nominal range of the data in the specified component. If this number is b then for unsigned data the nominal range is between 0 and 2^b-1, and for signed data it is between -2^(b-1) and 2^(b-1)-1. For floating point data this value is not applicable.
public getFixedPoint ( int c ) : int
c int The index of the component. /// ///
Результат int

getInternCompData() публичный Метод

Returns, in the blk argument, a block of image data containing the specifed rectangular area, in the specified component. The data is returned, as a reference to the internal data, if any, instead of as a copy, therefore the returned data should not be modified.

The rectangular area to return is specified by the 'ulx', 'uly', 'w' and 'h' members of the 'blk' argument, relative to the current tile. These members are not modified by this method. The 'offset' and 'scanw' of the returned data can be arbitrary. See the 'DataBlk' class.

This method, in general, is more efficient than the 'getCompData()' method since it may not copy the data. However if the array of returned data is to be modified by the caller then the other method is probably preferable.

If possible, the data in the returned 'DataBlk' should be the internal data itself, instead of a copy, in order to increase the data transfer efficiency. However, this depends on the particular implementation (it may be more convenient to just return a copy of the data). This is the reason why the returned data should not be modified.

If the data array in blk is null, then a new one is created if necessary. The implementation of this interface may choose to return the same array or a new one, depending on what is more efficient. Therefore, the data array in blk prior to the method call should not be considered to contain the returned data, a new array may have been created. Instead, get the array from blk after the method has returned.

The returned data may have its 'progressive' attribute set. In this case the returned data is only an approximation of the "final" data.

public getInternCompData ( CSJ2K.j2k.image.DataBlk out_Renamed, int c ) : CSJ2K.j2k.image.DataBlk
out_Renamed CSJ2K.j2k.image.DataBlk
c int The index of the component from which to get the data. /// ///
Результат CSJ2K.j2k.image.DataBlk

isOrigSigned() публичный Метод

Returns true if the data read was originally signed in the specified component, false if not.
public isOrigSigned ( int c ) : bool
c int The index of the component, from 0 to C-1. /// ///
Результат bool

Описание свойств

computed защищенное свойство

protected ComputedComponents computed
Результат ComputedComponents

csMap защищенное свойство

ColorSpace info
protected ColorSpace,CSJ2K.Color csMap
Результат ColorSpace

dataFloat защищенное свойство

protected float[][] dataFloat
Результат float[][]

dataInt защищенное свойство

protected int[][] dataInt
Результат int[][]

eol защищенное статическое свойство

Platform dependant end of line String.
protected static String,System eol
Результат System.String

fixedPtBitsArray защищенное свойство

protected int[] fixedPtBitsArray
Результат int[]

inFloat защищенное свойство

protected DataBlkFloat[],CSJ2K.j2k.image inFloat
Результат CSJ2K.j2k.image.DataBlkFloat[]

inInt защищенное свойство

protected DataBlkInt[],CSJ2K.j2k.image inInt
Результат CSJ2K.j2k.image.DataBlkInt[]

maxValueArray защищенное свойство

protected int[] maxValueArray
Результат int[]

ncomps защищенное свойство

Number of image components
protected int ncomps
Результат int

pl защищенное свойство

Parameter Specs
protected ParameterList,CSJ2K.j2k.util pl
Результат CSJ2K.j2k.util.ParameterList

shiftValueArray защищенное свойство

protected int[] shiftValueArray
Результат int[]

src защищенное свойство

The image source.
protected BlkImgDataSrc src
Результат BlkImgDataSrc

srcBlk защищенное свойство

The image source data per component.
protected DataBlk[],CSJ2K.j2k.image srcBlk
Результат CSJ2K.j2k.image.DataBlk[]

workDataFloat защищенное свойство

protected float[][] workDataFloat
Результат float[][]

workDataInt защищенное свойство

protected int[][] workDataInt
Результат int[][]

workFloat защищенное свойство

protected DataBlkFloat[] workFloat
Результат DataBlkFloat[]

workInt защищенное свойство

protected DataBlkInt[] workInt
Результат DataBlkInt[]