while (EJ_Suspension == result)
{
result = pixSeq->getItem(pixItem, currentItem++);
if (result.good())
{
fragmentLength = pixItem->getLength();
result = pixItem->getUint8Array(jpegData);
if (result.good())
{
result = jpeg->decode(jpegData, fragmentLength, imageData8, frameSize, isSigned);
}
}
Is it possible to get the pixel fragment file offsets, without actually reading them into memory?
I would like the registered codec to read the data directlry in from file
Are you talking about the Basic Offset Table (first item in the pixel sequence) or do you really mean the file offsets of each pixel item (within the pixel sequence)?
Loading large element values can be postponed by specifying an appropriate value for the "maxReadLength" parameter of loadFile() / read(), so large element values are only loaded when actually accessed (using one of the getXXX() methods).
Yes, I would like to know the actual file offsets of each block of pixel data, plus the length of each block.
I guess the first is buried somewhere in the DcmInputStream class (or related classes), the latter should be available from the length field of the DcmPixelItem instance.
For maxReadLength, can I set this to any value I like? Can I set it to 2, for example? just curious.
Yes, this should be possible, even though one usually sets this parameter to some kBytes. See default value and option --max-read-length for the various DCMTK command line tools.