I want to get the pure image data (no header information at all) from a dicom image, then do some image processing work, then write the image data back to dicom format. First, I created a DCMFileformat object, then I get the dataset, from the dataset I get the DicomImage, then I use the following to get the pixel data:
Uint8 *pixelData = (Uint8 *)(image->getOutputData(8 /* bits per sample */));
But I don't know how write the processed pixel data back to DicomImage object. I tried to searched the dcmimage class, dcmimgle class, I didn't find anything like writing or putting pixel data back to dicomimage object.
Thank you very much.
Qingling
how to write the pixal data back to DCMImage object?
Moderator: Moderator Team
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
First of all, the main purpose of class DicomImage (and module dcmimgle/dcmimage) is visualization, i.e. getOutputData() returns transformed and not original pixel data which might not be what you want (see FAQ #24 for details).
This also explains why there is no way to feed the processed pixel data back into the DicomImage object. Currently, you have to do this manually using the appropriate DcmDataset::putAndInsertXXX() methods (see FAQ #34 for details).
This also explains why there is no way to feed the processed pixel data back into the DicomImage object. Currently, you have to do this manually using the appropriate DcmDataset::putAndInsertXXX() methods (see FAQ #34 for details).
Who is online
Users browsing this forum: No registered users and 1 guest