Using dcmiod for reading/writing Dicom image files

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
c_k
Posts: 1
Joined: Mon, 2016-04-25, 13:31

Using dcmiod for reading/writing Dicom image files

#1 Post by c_k »

I am using the DCMTK dcmiod module (from the latest snapshot), which provides an API for reading/writing images on a higher level than dcmdata. I now use DcmIODImage with IODGeneralImageModule and IODImagePixelModule, but can't find functions regarding scaling of pixel data.

In the DCMTK source code I found the IODEnhUSImageModule class, which provides access to e.g. DCM_RescaleSlope. (How) Is it possible to use this class in the context of dcmiod?

This post is a copy from the following Stackoverflow question: http://stackoverflow.com/questions/3674 ... e-utilized

Michael Onken
DCMTK Developer
Posts: 2055
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: Using dcmiod for reading/writing Dicom image files

#2 Post by Michael Onken »

Hi,

the classes in dcmiod do not have support for pixel data operations.

DcmIODCommon and DcmIODImage are just arranging common DICOM modules (in the form of classes from dcmiod). DcmIODCommon for non-image IODs, and DcmIODImage for image-based IODs. DcmIODImage supports (parts of the) Image Pixel Module (through class IODImagePixelModule) but that module implementation misses support for the Pixel Data element but only provides access to "meta" info like Rows, Columns, Bits Allocated and so on.

As an example, how you can use DcmIODImage to write your own, IOD-specific API with support for Pixel Data, you can look at DcmSegmentation (dcmseg/libsrc/segdoc.cc) which derives from DcmIODImage and uses its API to set, read and write common image IOD attributes. Pixel data is added by addFrame() calls on DcmSegmentation which implements all (very simple in that case) pixel data logic itself.

Best,
Michael

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 0 guests