DICOM @ OFFIS

Discussion Forum for OFFIS DICOM Tools - For registration, send email with desired user name to the OFFIS DICOM team
It is currently Tue, 2017-10-24, 01:23

All times are UTC + 1 hour




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Thu, 2007-10-04, 17:10 
Offline

Joined: Wed, 2007-09-12, 19:33
Posts: 2
I am having trouble getting the image data when the dicom image is compressed.

Sadly, I am trying to update some old code and I am new to dcmtk. So, it is the old code that doesn't appear to work.

Also, the pixel data is compressed using JPEG2000, and we have our own toolset we wish to use to decompress it.

here is the code that is currently being used to extract the image data:

Code:
DcmStack stack;
E_Condition ret = m_dataset->search(DCM_PixelData, stack, ESM_fromHere, OFFalse);

DcmOtherByteOtherWord *pixdata = (DcmOtherByteOtherWord*)stack.top();

Uint16 *pixels2;
pixdata->getUint16Array( pixels2);

m_dataset is a DcmDataset object and was loaded successfully.

The problem is the last line of code, getUint16Array, returns a NULL pointer. I could use help on figuring out why this doesn't return any data.

Thanks,

Jared


Top
 Profile  
 
 Post subject:
PostPosted: Fri, 2007-10-05, 09:31 
Offline
ICSMED DICOM Services
ICSMED DICOM Services

Joined: Fri, 2004-10-29, 21:38
Posts: 2217
Location: Oldenburg, Germany
In order to extract JPEG2000 compressed pixel data, you need to register the codecs from module DCMJP2K. This module is not available as part of the DCMTK but has to be licensed separately. See web site for further details.


Top
 Profile  
 
 Post subject:
PostPosted: Fri, 2007-10-05, 18:55 
Offline

Joined: Wed, 2007-09-12, 19:33
Posts: 2
In post:http://forum.dcmtk.org/viewtopic.php?t=1332&sid=efe7783e4cfdc89ee441059308f48a60 Michael Onken stated that it is possible to get the pixel data of a compressed dicom image without using the DCMJP2K library and then use another JPG2K library to decompress the data.

Is that not possible and Michael is mistaken? I just want to get at the compressed data and use my own libraries to decompress it.


Top
 Profile  
 
 Post subject:
PostPosted: Fri, 2007-10-05, 20:57 
Offline
ICSMED DICOM Services
ICSMED DICOM Services

Joined: Fri, 2004-10-29, 21:38
Posts: 2217
Location: Oldenburg, Germany
In this case, you should probably have a look at the dcmjpeg module in order to learn how to integrate your JPEG2000 implementation with the DCMTK.


Top
 Profile  
 
 Post subject:
PostPosted: Sun, 2009-04-19, 18:13 
Offline

Joined: Tue, 2009-04-14, 03:09
Posts: 7
I want create new class "DJDecoderJpeg200Lossy" like DJDecoderLossless to decode JPEG2000 compressed pixel data. But i don't get Pixel Data by function findAndGetUint16Array. Help me.

Jörg Riesmeier wrote:
In this case, you should probably have a look at the dcmjpeg module in order to learn how to integrate your JPEG2000 implementation with the DCMTK.

_________________
hayhv


Top
 Profile  
 
 Post subject:
PostPosted: Sun, 2009-04-19, 18:13 
Offline

Joined: Tue, 2009-04-14, 03:09
Posts: 7
I want create new class "DJDecoderJpeg200Lossy" like DJDecoderLossless to decode JPEG2000 compressed pixel data. But i don't get Pixel Data by function findAndGetUint16Array. Help me.

Jörg Riesmeier wrote:
In this case, you should probably have a look at the dcmjpeg module in order to learn how to integrate your JPEG2000 implementation with the DCMTK.

_________________
hayhv


Top
 Profile  
 
 Post subject:
PostPosted: Tue, 2009-04-28, 12:36 
Offline
OFFIS DICOM Team
OFFIS DICOM Team

Joined: Tue, 2004-11-02, 17:22
Posts: 1206
Location: Oldenburg, Germany
findAndGetUint16Array() does not work on compressed pixel data because the structure of compressed pixel data is quite different in DICOM - it uses a sequence-like structure with multiple fragments containing compressed bitstream information. There are other API methods to access these fragments, which you can then feed into your own JPEG 2000 decode, and as my collegue suggests, you should look at the implementation of the dcmjpeg library in the toolkit on how to use these API methods - that's exactly what the JPEG decoder does, it just feeds the bitstream data to a JPEG decoder instead of a JPEG 2000 decoder.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 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:  
cron
Powered by phpBB® Forum Software © phpBB Group