DICOM @ OFFIS

Discussion Forum for OFFIS DICOM Tools - For registration, send email with desired user name to the OFFIS DICOM team
It is currently Sat, 2018-02-24, 01:29

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Thu, 2010-05-20, 05:10 
Offline

Joined: Wed, 2010-05-19, 14:00
Posts: 3
How to read a DICOM image data byte by byte using DCMTK and write it to a raw file? As the header length in DICOM Image is variable, how to know the offset for the image date in a DICOM Image so as to read the image data byte by byte.


Top
 Profile  
 
 Post subject:
PostPosted: Thu, 2010-05-20, 08:41 
Offline
ICSMED DICOM Services
ICSMED DICOM Services

Joined: Fri, 2004-10-29, 21:38
Posts: 2217
Location: Oldenburg, Germany
If you want to access certain data elements (like Pixel Data), you have to parse the whole file/dataset (at least up to the desired element).

Btw, what is the background of your question?

Quote:
How to read a DICOM image data byte by byte using DCMTK and write it to a raw file?

If "DICOM image data" refers to pixel data, you could simply use dcmdump with option --write-pixel (+W).


Top
 Profile  
 
 Post subject:
PostPosted: Thu, 2010-05-20, 17:40 
Offline

Joined: Wed, 2010-05-19, 14:00
Posts: 3
Yes DICOM Image data refers to pixeldata. dcmdump is an executable that does this offline but how to develop a piece of code to read the pixeldata and store it in a raw file?


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

Joined: Fri, 2004-10-29, 21:38
Posts: 2217
Location: Oldenburg, Germany
In case of uncompressed pixel data, you could use findAndGetUint8/16Array() on the DICOM dataset in order to retrieve the value of the pixel data element. I guess there are numerous postings in this forum explaining how to get the pixel data in "raw format", i.e. as stored in the file/dataset.


Top
 Profile  
 
 Post subject:
PostPosted: Wed, 2010-05-26, 05:06 
Offline

Joined: Wed, 2010-05-19, 14:00
Posts: 3
Thanks a lot.


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: Bing [Bot] 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:  
cron
Powered by phpBB® Forum Software © phpBB Group