Get data from DcmDataset and put it in a buffer

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
wassio
Posts: 4
Joined: Mon, 2008-10-13, 08:58

Get data from DcmDataset and put it in a buffer

#1 Post by wassio »

Hi,

I made a program that décommresse a Dicom- JPEG lossless.

What I want now is to retrieve only data after decompression from DcmDataset and put it in a buffer.

I did not know how to do it :cry:

Waitting for your help and thank you in advance

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 »

Do you want to access the uncompressed pixel data?

wassio
Posts: 4
Joined: Mon, 2008-10-13, 08:58

#3 Post by wassio »

thank you for

I want to recover the uncompressed data and put it in a buffer.

I don't want to save the uncompressed dicom file using methode

Code: Select all

 fileformat.saveFile(opt_ofname, opt_oxfer, opt_oenctype, opt_oglenc,opt_opadenc, (Uint32) opt_filepad, (Uint32)opt_itempad,opt_oDataset);
What I want now is to retrieve only data after decompression from DcmDataset or DcmFileFormat and put it in a buffer.

using

memcopy(......)

Thank you in advance

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 »

I'm sorry but I'm still not quite sure what you intend to do ...

wassio
Posts: 4
Joined: Mon, 2008-10-13, 08:58

#5 Post by wassio »

i want to retrieve the pixel data of the dicom file.

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

#6 Post by Jörg Riesmeier »

This is what I was asking in my first reply ...

Depending on the data type of the PixelData element (OB or OW), you could use findAndGetUint8Array() or findAndGet16Array() after calling chooseRepresentation() to decompress the pixel data. This gives you access to the uncompressed (raw) pixel data. If the purpose of accessing the pixel data is image visualization, you should have a closer look to the DicomImage class.

wassio
Posts: 4
Joined: Mon, 2008-10-13, 08:58

#7 Post by wassio »

Thank you for your help
How to get the data type of the PixelData element ?

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

#8 Post by Jörg Riesmeier »

Did you already try getVR()?

Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 0 guests