DICOM @ OFFIS

Discussion Forum for OFFIS DICOM Tools - For registration, send email with desired user name to the OFFIS DICOM team
It is currently Thu, 2018-02-22, 04:17

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Mon, 2010-05-24, 17:57 
Offline

Joined: Mon, 2010-05-24, 17:41
Posts: 6
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:
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


Top
 Profile  
 
 Post subject:
PostPosted: Tue, 2010-05-25, 08:01 
Offline
ICSMED DICOM Services
ICSMED DICOM Services

Joined: Fri, 2004-10-29, 21:38
Posts: 2217
Location: Oldenburg, Germany
Quote:
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).


Top
 Profile  
 
 Post subject:
PostPosted: Tue, 2010-05-25, 15:47 
Offline

Joined: Mon, 2010-05-24, 17:41
Posts: 6
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:
dataset = fileformat.getDataset();


I fill all the required attributes with calls of the form
Code:
dataset->putAndInsertString(DCM_PatientID, id);
dataset->putAndInsertUint16(DCM_BitsStored, bitsStored);


The pixel data is written using
Code:
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


Top
 Profile  
 
 Post subject:
PostPosted: Tue, 2010-05-25, 15:54 
Offline
ICSMED DICOM Services
ICSMED DICOM Services

Joined: Fri, 2004-10-29, 21:38
Posts: 2217
Location: Oldenburg, Germany
Are you sure that your viewer is correct? What is the output of DCMTK's dcm2pnm for the first and subsequent frames?


Top
 Profile  
 
 Post subject:
PostPosted: Tue, 2010-05-25, 16:24 
Offline

Joined: Mon, 2010-05-24, 17:41
Posts: 6
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group