dcmj2pnm and VOI LUT in multiframe file

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
nark
Posts: 8
Joined: Fri, 2009-09-04, 14:15

dcmj2pnm and VOI LUT in multiframe file

#1 Post by nark »

Hello everyone,

I'm used to convert single-frame DICOM files to JPEG using dcmj2pnm with the +Wl (--use-voi-lut) option in order to apply LUT transformation, and this works very well so far.

Here I'm trying to use the same command by adding the +Fa option in order to convert multi-frame DICOM files to JPEG files, and splitting them by frame automatically. It seems to also work, but unfortunately, when I try to add the +Wl option, dcmj2pnm replies with the following error :

Code: Select all

F: cannot select VOI LUT 1, only 0 LUT(s) in file
From what I understand, it's « normal » because the VOILUTSequence attribute is not present in the DICOM file. Indeed, what I know is that multi-frame DICOM files mostly use SharedFunctionalGroupsSequence and FrameVOILUTSequence attributes to store the LUT data.

So, does anyone here can confirm to me that dcmj2pnm does not implement this feature ?
Otherwise, is there a way with DCMTK to split multi-frame DICOM file into single-frame files ? This way I could convert each file to JPEG separately, using the dcmj2pnm command as I'm used to.

Thank you for your help

J. Riesmeier
DCMTK Developer
Posts: 2501
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: dcmj2pnm and VOI LUT in multiframe file

#2 Post by J. Riesmeier »

Indeed, what I know is that multi-frame DICOM files mostly use SharedFunctionalGroupsSequence and FrameVOILUTSequence attributes to store the LUT data.
This is at least true for those IODs that follow the Enhanced Multi-frame paradigm (e.g. Enhanced CT or MR Image).
So, does anyone here can confirm to me that dcmj2pnm does not implement this feature ?
Yes, being the author of the image rendering pipeline within the DCMTK, I can confirm this. See this Feature Request.

For background information: the development of the dcmimgle/dcmimage module started back in 1996, and at that time, the DICOM image IODs used the VOI settings on main dataset level only.

nark
Posts: 8
Joined: Fri, 2009-09-04, 14:15

Re: dcmj2pnm and VOI LUT in multiframe file

#3 Post by nark »

This is at least true for those IODs that follow the Enhanced Multi-frame paradigm (e.g. Enhanced CT or MR Image).
Yes, in my case I'm dealing with multi-frame Breast Tomosynthesis (MG) type of images, that I guess use a kind of same paradigm of the DICOM standard.
Yes, being the author of the image rendering pipeline within the DCMTK, I can confirm this.
Ok, many thanks for this confirmation.

Any clue about a proper way to do what I want to ? (Splitting is certainly not the best solution because I guess that if some tools exist, they will not take care of FrameVOILUTSequence attributes, and properly transform them accordingly to VOILUTSequence.)

J. Riesmeier
DCMTK Developer
Posts: 2501
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: dcmj2pnm and VOI LUT in multiframe file

#4 Post by J. Riesmeier »

Apart from implementing support for the corresponding Functional Groups Macros within the Shared and Per-Frame Functional Groups Sequence (see above referenced FR), you could, of course, feed the VOI settings (e.g. Window Center and Width) of the current frame to the DicomImage class using the setVoiWindow() settings, i.e. before calling getOutputData() or writeXXX().

Post Reply

Who is online

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