Hi Experts,
I am developing a DICOM Image Viewer application using DCMTK 3.5.4.
I am trying to load monochrome-2, RGB, monochrome-1, YCbCr images. But I could load only monochrome-2 dicom images. Can anyone help me to solve the problem?
My Code
--------
DcmFileFormat m_DcFile;
DicomImage* m_pDcmImage;
OFCondition cond = m_DcFile.loadFile(szImagePath, EXS_Unknown, EGL_withoutGL, DCM_MaxReadLength, ERM_autoDetect);
//Gets the Transfersyntax of the dicomfile
E_TransferSyntax xfer = m_DcFile.getDataset()->getOriginalXfer();
if(cond.good())
{
m_pDcmImage = new DicomImage(&m_DcFile, xfer, CIF_AcrNemaCompatibility, 0, 0);
//Gets the status of the dicomImage
if(m_pDcmImage->getStatus() != EIS_Normal)
{
AfxMessageBox((CString)m_pDcmImage->getString(m_pDcmImage->getStatus()));
}
}
I got the status code string as UNSUPPORTED DATA VALUE for the images otherthan monochrome-2.
Best Regards
Santhosh
Problem with Loading DICOM Image
Moderator: Moderator Team
-
- Posts: 2
- Joined: Wed, 2011-02-02, 07:26
- Location: India
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
If (uncompressed) color images fail to load, you probably forgot to register support for color images. The example in the documentation shows that you need to include the header file "diregist.h" for this purpose (and link the dcmimage library).
Of course, MONOCHROME1 images should not fail for this reason.
Of course, MONOCHROME1 images should not fail for this reason.
-
- Posts: 2
- Joined: Wed, 2011-02-02, 07:26
- Location: India
Who is online
Users browsing this forum: Bing [Bot] and 1 guest