I have a MRI dicom file with JPEG transfer syntax as mentioned above. The codes are shown below:
DJDecoderRegistration::registerCodecs();
dcmFormat.loadFile(filename);
DcmDataset *pDataSet = dcmFormat.getDataset();
pDataSet->chooseRepresentatio(EXS_JPEGProcess14SV1TransferSyntax, NULL);
DicomImage *pImage = new DicomImage(pDataSet,pDataSet>getOriginalXfer(),CIF_AcrNemaCompatibility,0,1);
if(pImage->isMonochrome())
nbits = pImage->createWindowsDIB(pData, 0, 0, 8, 1, 1);
The image could be displayed, however the contrast is very poor. I also use DicomImage writeBMP method to save it as a bmp file. The result is the same. The displayed image is not clear at all.
Any suggestions?
EXS_JPEGProcess14SV1TransferSyntax support
Moderator: Moderator Team
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
No, VOI means "value of interest" in this context. For example, an automatically computed VOI window can be specified with the following code line before calling createWindowsDIB():
Code: Select all
pImage->setMinMaxWindow();
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
What about reading the documentation?Would you please say something more about why setMinMaxWindow() need to be invoked, what's its function.
In short: If the pixel data does not use the complete range of grayscale values, you should apply an appropriate VOI window, because otherwise the rendering will result in an output image that also does not use the complete range of possible grayscale values.
This method does not return "raw data" (whatever you mean by that). The purpose of this method (and the complete DicomImage class) is visualization/rendering!If I want to obtain the raw data by
Uint8 *pixelData = (Uint8 *)(pImage->getOutputData(8 ));
Maybe, FAQ #24 is of some interest for you ...
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 1 guest