Unable to compress a RGB CT Image

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
ravishankar
Posts: 7
Joined: Tue, 2015-02-10, 11:36

Unable to compress a RGB CT Image

#1 Post by ravishankar »

Hi,

I am using dcmtk3.6.0, i am not able to compress a RGB CT Image with planar configuration = 1.
Return value of chooseRepresentation api is "Illegal parameter"

Original transfer syntax: Explicit VR Little Endian
Target Transfer syntax: JPEG Lossless, Nonhierarchical, First- Order Prediction(Processes 14 [Selection Value 1])

What could be the possible reasons?

thanks

Michael Onken
DCMTK Developer
Posts: 2051
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: Unable to compress a RGB CT Image

#2 Post by Michael Onken »

Hi,

what kind of SOP Class you have? The CT Image IOD (CT Image Storage SOP Class) does not allow RGB at all.

However, conversion probably works anyway.

So what is the output if you enable debug logging?

Best,
Michael

ravishankar
Posts: 7
Joined: Tue, 2015-02-10, 11:36

Re: Unable to compress a RGB CT Image

#3 Post by ravishankar »

Hi,

The SOP Class is "Secondary Capture Image Storage".

After debugging i find out that , "togglePlanarConfiguration8"(djcodece.cc) api return "EC_IllegalParameter".
Their is a check in "togglePlanarConfiguration8":
(numValues%samplesPerPixel != 0)

This check failed for all RGB Images with Planar config=1,when trying to convert into JPEG Lossless.

Here is the link to one of the files.

https://drive.google.com/file/d/0Byiw_h ... sp=sharing

thanks

Michael Onken
DCMTK Developer
Posts: 2051
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: Unable to compress a RGB CT Image

#4 Post by Michael Onken »

Hi,

actually looks like a bug to me since the check does not consider any padding byte at the end of the pixel data. We'll fix that, I added the issue to the bug tracker.

Best,
Michael

Jan Schlamelcher
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 318
Joined: Mon, 2014-03-03, 09:51
Location: Oldenburg, Germany

Re: Unable to compress a RGB CT Image

#5 Post by Jan Schlamelcher »

It has been fixed in this commit.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest