Rescale intercept / slope in Multi-Frame SC objects

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
oroy
Posts: 6
Joined: Mon, 2010-05-24, 17:41

Rescale intercept / slope in Multi-Frame SC objects

#1 Post by oroy »

Hello,

I am trying to apply a rescale intercept of 10 and a slope of 2 to the pixel data of a grayscale multiframe word secondary capture object
(photometric intepretation = MONOCHROME2, bits allocated = 16, bits stored = 16, high bit = 15, samples per pixel = 1, transferSyntax = EXS_LittleEndianImplicit).

I am using the following code

Code: Select all

dataset->putAndInsertString(DCM_PresentationLUTShape, "IDENTITY");
dataset->putAndInsertString(DCM_RescaleIntercept, "10");
dataset->putAndInsertString(DCM_RescaleSlope, "2");
dataset->putAndInsertString(DCM_RescaleType, "US");
and it does not work. Note that when the slope is set to 1, the intercept is correctly interpreted but only for the first frame.

Any suggestions? Thanks!
Olivier

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 »

Note that when the slope is set to 1, the intercept is correctly interpreted but only for the first frame.
"Who" is doing this, i.e. which viewer or toolkit have you used?

If you used the DicomImage class from DCMTK, what is the relevant code snippet for rendering the pixel data? Of course, the modality LUT transformation is applied to all frames of a multi-frame image (if present and not disabled).

oroy
Posts: 6
Joined: Mon, 2010-05-24, 17:41

#3 Post by oroy »

I am viewing DICOM images using Image J. I do not use the DicomImage class from DCMTK. What I do is basically the following:

I create an empty dataset using

Code: Select all

dataset = fileformat.getDataset();
I fill all the required attributes with calls of the form

Code: Select all

dataset->putAndInsertString(DCM_PatientID, id);
dataset->putAndInsertUint16(DCM_BitsStored, bitsStored);
The pixel data is written using

Code: Select all

dataset->putAndInsertUint16Array(DCM_PixelData, values, numberOfRows * numberOfColumns * numberOfFrames);
where 'values' is an array of Uint16 containing the pixel values.

Thanks a lot for your help,
Olivier

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

#4 Post by Jörg Riesmeier »

Are you sure that your viewer is correct? What is the output of DCMTK's dcm2pnm for the first and subsequent frames?

oroy
Posts: 6
Joined: Mon, 2010-05-24, 17:41

#5 Post by oroy »

You are right, Image J is not properly interpreting the modality LUT tags. I tried with the iSite PACS viewer from Philips and it works. Next time I should use DICOMscope ;-)

Thanks for time Jörg,
Olivier

Post Reply

Who is online

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