dcmdump and naming of raw file

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
gnchen
Posts: 14
Joined: Tue, 2006-04-11, 18:00

dcmdump and naming of raw file

#1 Post by gnchen »

Hi!

Can anyone tell me how dcmdump create the file name whne I use +W option?

It seems it is always like:

dcmfilename.0.raw

Is it correct?

I will like dump pixel data to a file or pipe it throught stand output. So, I can easily read them in my python script. Any alternative way to achieve this is also welcomed...


Gen

Marco Eichelberg
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 1445
Joined: Tue, 2004-11-02, 17:22
Location: Oldenburg, Germany
Contact:

#2 Post by Marco Eichelberg »

For an uncompressed image, the filename is always dcmfilename.0.raw. For a compressed image, where PixelData essentially is a sequence with multiple item, each item is written to a separate file named dcmfilename.0.raw, dcmfilename.1.raw etc.

gnchen
Posts: 14
Joined: Tue, 2006-04-11, 18:00

#3 Post by gnchen »

Thanks!

Is there any DICOm tag indicating the image is compressed? And How many items I will get from that??

Gen

Alexander Fedotov
Posts: 53
Joined: Thu, 2005-04-14, 15:07
Location: St. Petersburg, Russia

#4 Post by Alexander Fedotov »

[quote="gnchen"]
Is there any DICOm tag indicating the image is compressed?
[/quote]

In a file?
Transfer Syntax UID (0002,0010)

[quote="gnchen"]
And How many items I will get from that??
[/quote]

What do you mean by "items"?

gnchen
Posts: 14
Joined: Tue, 2006-04-11, 18:00

#5 Post by gnchen »

Items refer to what Marco described in the previous response, i.e. how many slices in that multi-frame pixel data? Any dicom tag for this kind of info?? Sometimes, I really feel quite troubling that there is no any info regarding how many slices in a series and how many seires in this study.
Lacking of these kind of info just make the design of post processing steps miserable...

Gen

Marco Eichelberg
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 1445
Joined: Tue, 2004-11-02, 17:22
Location: Oldenburg, Germany
Contact:

#6 Post by Marco Eichelberg »

The transfer syntax in which the dataset is encoded determines whether or not pixel data on main dataset level will be encapsulated. DcmDataset::getOriginalgetOriginalXfer() will provide this transfer syntax and DcmXfer::isEncapsulated() will check whether this is one with encapsulated pixel data. The code might look like this:

Code: Select all

DcmXfer xfer (dataset->getOriginalgetOriginalXfer());
bool isEncapsulated = xfer.isEncapsulated();
If the pixel data is encapsulated, DcmPixelData::getEncapsulatedRepresentation() provides access to the sequence like structure (a DcmPixelSequence instance). Use DcmPixelData::getOriginalRepresentationKey() to retrieve the other parameters expected by DcmPixelData::getEncapsulatedRepresentation(). Within the DcmPixelSequence object finally, the number of sequence items can be determined with DcmPixelSequence::card().

Post Reply

Who is online

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