public getCompData ( CSJ2K.j2k.image.DataBlk outblk, int c ) : CSJ2K.j2k.image.DataBlk | ||
outblk | CSJ2K.j2k.image.DataBlk | |
c | int | The index of the component from which to get the data. Only 0 /// and 3 are valid. /// /// |
Результат | CSJ2K.j2k.image.DataBlk |
public override DataBlk getCompData(DataBlk outblk, int c)
{
int type = outblk.DataType;
int i; // j removed
// Calculate all components:
for (i = 0; i < ncomps; ++i)
{
// Set up the working DataBlk geometry.
copyGeometry(workInt[i], outblk);
copyGeometry(workFloat[i], outblk);
copyGeometry(inInt[i], outblk);
copyGeometry(inFloat[i], outblk);
// Request data from the source.
inInt[i] = (DataBlkInt) src.getInternCompData(inInt[i], i);
}
if (type == DataBlk.TYPE_INT)
{
if (ncomps == 1)
workInt[c] = inInt[c];
else
workInt = mult(inInt);
outblk.progressive = inInt[c].progressive;
outblk.Data = workInt[c].Data;
}
if (type == DataBlk.TYPE_FLOAT)
{
if (ncomps == 1)
workFloat[c] = inFloat[c];
else
workFloat = mult(inFloat);
outblk.progressive = inFloat[c].progressive;
outblk.Data = workFloat[c].Data;
}
// Initialize the output block geometry and set the profiled
// data into the output block.
outblk.offset = 0;
outblk.scanw = outblk.w;
return outblk;
}