I am trying to figure out how the Lossless Rice compression algorithm works on the following file. Here is a DICOM file.

Looking at the information I can see:

$ gdcmdump I160 | grep "Tamar Compression Type"
(07a1,1011) CS [LOSSLESS RICE ]                                # 14,1 Tamar Compression Type

I can open the image using TomoVision. The image is 512x512, 16bits (unsigned).

The compressed stream:

$ gdcmraw -t 07a1,100a I160 comp.raw

contains (hexdump comp.raw):

1A D5 F8 EB  F2 77 A5 CE  A3 54 D5 2A  C0 5D AA 32...

But TomoVision seems to output a series of zeroes until byte 0x1DE. I can also use a command line tool: DICOMatic to process the file. However without a proper license, the generated file contains a waterwark. So only the first few bytes looks ok:

$ gdcmraw /tmp/I160.dcm /tmp/pixeldata.raw
$ hexdump /tmp/pixeldata.raw |less

Some more encoded files can be found here.

  • 2
    this looks related. Also, providing a non-RICE dicom and a non-graphical tool (unlike TomoVision) supporting the RICE-compressed file would help. (5 years old ?)
    – Ange
    Nov 4 '13 at 10:51
  • You can edit the question and make changes. If you want to ask about specific aspects, or maybe try out a different approach, you can post another question. The only restriction being that it should be distinct enough to not warrant a close vote.
    – asheeshr
    Nov 26 '13 at 2:54

Not worth any bounty, but it might help, as Tomovision.exe doesn't look obfuscated in any way after a quick look, and contains the algorithm you're looking for:

  1. open it in your favorite disassembler
  2. check for reference to RICE strings (such as C:\TomoVision\Prog\Prog_Lib\TomoVision_Convert\NEMA_Compression_RICE_decode.cpp at address 4F59C4)
  3. study the ASM code - a.k.a. do your homework ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.