DICOM @ OFFIS

Discussion Forum for OFFIS DICOM Tools - For registration, send email with desired user name to the OFFIS DICOM team
It is currently Mon, 2018-09-24, 12:43

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Mon, 2015-01-12, 09:30 
Offline

Joined: Mon, 2015-01-12, 08:15
Posts: 2
Hello,
I'm trying to create from the scratch a 32 bit pixeldata DICOM image with C++ using dcmtk. Diving into the forum and the dcmtk documentation I'm not being able to find how to use a 32 bit version of putAndInsertUint8Array() or putAndInsertUint16Array() functions.
How can I write a 32 bit DCM_PixelData array with dmtk?
Thanks in advance,
Juanjo


Top
 Profile  
 
PostPosted: Mon, 2015-01-12, 09:40 
Offline
DCMTK Developer

Joined: Fri, 2004-11-05, 13:47
Posts: 1687
Location: Oldenburg, Germany
Hi,

you can use putAndInsertUint8...(). 32 Bit Pixel data is also just a sequence of bytes where 4 bytes belong to a single pixel. The putAndInsert() call does not interpret the data but just inserts the provided blob of pixel data in memory into the Pixel Data element.

Best regards,
Michael


Top
 Profile  
 
PostPosted: Mon, 2015-01-12, 10:38 
Offline
DCMTK Developer

Joined: Tue, 2011-05-03, 14:38
Posts: 1975
Location: Oldenburg, Germany
No, for Pixel Data where Bits Allocated is greater than 8, you always have to use the Uint16 (OW) version of the API.

From DICOM PS3.5: "If Pixel Data (7FE0,0010) is sent in a Native Format, the Value Representation OW is most often required.
The Value Representation OB may also be used for Pixel Data (7FE0,0010) in cases where Bits Allocated has a value less than
or equal to 8, but only with Transfer Syntaxes where the Value Representation is explicitly conveyed (see Annex A)."


Top
 Profile  
 
PostPosted: Mon, 2015-01-12, 10:54 
Offline
DCMTK Developer

Joined: Fri, 2004-11-05, 13:47
Posts: 1687
Location: Oldenburg, Germany
Mea culpa :) Anyway, using the existing API functions is sufficient, you do not need a putAndInsertUint32() or the like.

Best,
Michael


Top
 Profile  
 
PostPosted: Mon, 2015-01-12, 21:56 
Offline

Joined: Mon, 2015-01-12, 08:15
Posts: 2
I've achived to create my 32 bit pixeldata DICOM image with your help.
Thanks to both of you,
Juanjo


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