Help me out, please ... Here's what we are doing:
We have a compressed image (12 bit lossy) and all we want is to get it's uncompressed pixeldata (8 bit raw)...
To do that, we first decode it to 16 bit, get it's pixeldata and then convert it to 8 bits... Everything works, but I think it could be better...
There's probably an easier way to do this but I can't work it out myself...
Is there something in the dcmtk that can go from 12lossy to 8raw in one step?
Something like this would be perfect ;P
convert_12lossyTo8raw(const char* fileIn, Uint8* pixeldata)
but I could find joy in something a little bit less specific...
Image conversion
Moderator: Moderator Team
-
- OFFIS DICOM Team
- Posts: 1445
- Joined: Tue, 2004-11-02, 17:22
- Location: Oldenburg, Germany
- Contact:
Essentially, the tool "dcm2pnm" could work as a template for you. This tool first registers the decompression codecs in DCMTK, then loads an image using the DicomImage class and finally produces a bitmap (with various command line options that control how the output bitmap is generated). Decompression is handled transparently.
Who is online
Users browsing this forum: No registered users and 1 guest