All other questions regarding DCMTK
Moderator: Moderator Team
retarder
Posts: 26 Joined: Fri, 2010-11-19, 16:23
Location: Germany
Contact:
#1
Post
by retarder » Fri, 2012-07-20, 16:54
Hi,
we try to write DICOM datasets as DICOMDIR with JPEG2000 transfer syntax.
But the canWriteXfer method returns already false.
Code: Select all
DcmItem *metaInfo = fileformat.getMetaInfo();
D2DecoderRegistration::registerCodecs(); // register JPEG2000 codecs
DJ_RPLossless params;
status = pDataset->chooseRepresentation(EXS_JPEG2000LosslessOnly, ¶ms);
if (pDataset->canWriteXfer(EXS_JPEG2000LosslessOnly))
{
delete metaInfo->remove(DCM_MediaStorageSOPClassUID);
delete metaInfo->remove(DCM_MediaStorageSOPInstanceUID);
}
status = fileformat.saveFile(stringFilenamePointer, EXS_JPEG2000LosslessOnly);
Waht did we wrong?
J. Riesmeier
DCMTK Developer
Posts: 2503 Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:
#2
Post
by J. Riesmeier » Fri, 2012-07-20, 17:13
First of all, it makes no sense to write a DICOMDIR with any other transfer syntax than Explicit VR Little Endian (because this is what all existing Media Storage Application Profiles require). And then, it seems that you've only registered the JPEG2000 decoders .
retarder
Posts: 26 Joined: Fri, 2010-11-19, 16:23
Location: Germany
Contact:
#3
Post
by retarder » Mon, 2012-07-23, 09:34
That was a misunderstanding. I don't wanted to write a DICOMDIR with JPEG2000 but only the single frame files which are referenced by the DIOCMDIR.
But you are right, I registered the decoders instead of the encoders accidentally, now it works like a charm!
Users browsing this forum: Semrush [Bot] and 1 guest