Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RLE compression and US RGB images #15

Closed
leonardorame opened this issue Aug 10, 2015 · 12 comments
Closed

RLE compression and US RGB images #15

leonardorame opened this issue Aug 10, 2015 · 12 comments

Comments

@leonardorame
Copy link
Contributor

I'm testing the new RLE decompressor and found RGB US images aren't displayed correctly. Please take a look at the following image. The upper image is what I get when I display an uncompressed image, the bottom one is what I get on RLE compressed.

rle

@chafey
Copy link
Collaborator

chafey commented Aug 10, 2015

Can you provide a test image by any chance?

On Mon, Aug 10, 2015 at 10:52 AM, Leonardo M. Ramé <notifications@github.com

wrote:

I'm testing the new RLE decompressor and found RGB US images aren't
displayed correctly. Please take a look at the following image. The upper
image is what I get when I display an uncompressed image, the bottom one is
what I get on RLE compressed.

[image: rle]
https://cloud.githubusercontent.com/assets/1405017/9175885/534af4de-3f5e-11e5-8611-f54a13fb264d.png


Reply to this email directly or view it on GitHub
#15.

@leonardorame
Copy link
Contributor Author

Chris, I've sent a .rar containing both the uncompressed and rle version of the same image to your email. I cannot share the samples here because the images aren't anonymized.

@chafey
Copy link
Collaborator

chafey commented Aug 10, 2015

Hi Leonardo,

The RLE image is displayed in cornerstone the same way as it does in
Osirix. Have you verified that your RLE encoded image actually displays as
you expected?

Chris

On Mon, Aug 10, 2015 at 12:11 PM, Leonardo M. Ramé <notifications@github.com

wrote:

Chris, I've sent a .rar containing both the uncompressed and rle version
of the same image to your email. I cannot share the samples here because
the images aren't anonymized.


Reply to this email directly or view it on GitHub
#15 (comment)
.

@leonardorame
Copy link
Contributor Author

How do you see it, it must be only one image, not a grid of 3 by 3. I opened it in Weasis and both looks as the top image in my example.

BTW, I'm using:

cornerstone v0.8.1
dicomParser v1.1.4
cornerstoneWADOImageLoader v0.6.0
cornerstoneTools v0.6.2

@leonardorame
Copy link
Contributor Author

Chris, I've sent to your gmail account the WADO URL I use for this image. Please try to open in Cornerstone.

@leonardorame
Copy link
Contributor Author

BTW, you can put that URL in http://rawgit.com/chafey/cornerstoneWADOImageLoader/master/examples/index.html and see how it looks.

@chafey
Copy link
Collaborator

chafey commented Aug 10, 2015

When I open the RLE image in Osirix, it displays 3x3 images just like it does in cornerstone. Since cornerstone and Osirix display it the same, we should do more testing to make sure that the image is in fact correct. Can you please double check weasis to make sure its not loading the non RLE version and also find another viewer to validate the RLE version against?

@leonardorame
Copy link
Contributor Author

I also opened it using RadiAnt and looks exactly as in Weasis, it might be that Osirix is not displaying it correctly. The conversion to RLE is done using DCMTK's dcmcrle command.

To download both versions you can change the last part of the URL I sent to you, from contentType=dicom/rle to contentType=dicom/explicit

@leonardorame
Copy link
Contributor Author

I've sent the test RLE image to a Fuji Synapse PACS and it looks the same as RadiAnt and Weasis.

@chafey
Copy link
Collaborator

chafey commented Aug 15, 2015

OK did some research into this and see that foDicom's RLE decoder has a bit more logic in it than ours related to number of segments:

https://github.com/fo-dicom/fo-dicom/blob/development/DICOM%20%5BNative%5D/Dicom.Imaging.Codec.Rle.cpp

Your image has 3 segments in it so that may be the issue. I actually didn't write the RLE code - it was contributed, so this is all new to me. I'll put it on my list to dig into but if someone else has the time I would take a PR! (doesn't look too bad...)

@chafey
Copy link
Collaborator

chafey commented Aug 17, 2015

Just checked in a fix for this, can you verify? 0.6.2

@leonardorame
Copy link
Contributor Author

Confirmed, it's working perfectly right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants