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
write a 32 bit DCM_PixelData
Moderator: Moderator Team
-
- DCMTK Developer
- Posts: 2048
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Re: write a 32 bit DCM_PixelData
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
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
-
- DCMTK Developer
- Posts: 2501
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: write a 32 bit DCM_PixelData
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)."
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)."
-
- DCMTK Developer
- Posts: 2048
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Re: write a 32 bit DCM_PixelData
Mea culpa Anyway, using the existing API functions is sufficient, you do not need a putAndInsertUint32() or the like.
Best,
Michael
Best,
Michael
Re: write a 32 bit DCM_PixelData
I've achived to create my 32 bit pixeldata DICOM image with your help.
Thanks to both of you,
Juanjo
Thanks to both of you,
Juanjo
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest