chooseRepresentation() fails.

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
markw
Posts: 84
Joined: Mon, 2005-01-17, 01:08

chooseRepresentation() fails.

#1 Post by markw »

Hi,

Why will the following code always fail?:

Code: Select all


DJEncoderRegistration::registerCodecs();

DcmFileFormat dcm;
if (dcm.loadFile("C:\\test.dcm).bad())
    return;

DJ_RPLossless params;
DcmDataset *ds = dcm.getDataset();

ds->chooseRepresentation(EXS_JPEGProcess14SV1TransferSyntax, &params);

if (ds->canWriteXfer(EXS_JPEGProcess14SV1TransferSyntax)) 
    cout << "Yes can write it." << endl;
else 
    cout << "No, cannot write it" << endl;

DJEncoderRegistration::cleanup();
canWriteXfer always returns false. What step have I missed?

Thanks

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#2 Post by Jörg Riesmeier »

Is it possible to compress the same DICOM image using dcmcjpeg?

markw
Posts: 84
Joined: Mon, 2005-01-17, 01:08

#3 Post by markw »

H Jorg,

I upgraded to 3.5.4 and it is compressing fine now. I must have not included some necessary component somewhere while using 3.5.3.

Everything is working well now though,

Thanks

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest