1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
void IM_Page::getAllData(uint8* allData)
{
unsigned int dtx,dty,ftx,fty;
dtx = (unsigned short int)floor(currentReadBox.XTop/(float)tiffP.componentWidth);
ftx = (unsigned short int)ceil(currentReadBox.XBtm/(float)tiffP.componentWidth);
dty = (unsigned short int)floor(currentReadBox.YTop/(float)tiffP.componentHeight);
fty = (unsigned short int)ceil(currentReadBox.YBtm/(float)tiffP.componentHeight);
unsigned int row, col;
int dataSize = tiffP.componentWidth*tiffP.componentHeight*tiffP.colorMode;
int offset=0;
for(row=0; row < fty - dty; row++)
{
for(col=0; col < ftx - dtx; col++)
{
memcpy(allData+(dataSize*offset), (uint8*)(getData(row, col)), sizeof(uint8)*dataSize);
offset++;
}
}
} |
Partager