Re: JPEG Lossless decompression
- From: Chuck McCrobie <mccrobie2000@xxxxxxxxx>
- Date: Sat, 25 Oct 2008 12:39:30 -0400
CT2049@xxxxxxxxx wrote:
On Oct 24, 4:44 pm, Mathieu Malaterre <mathieu.malate...@xxxxxxxxx>
wrote:
On Oct 24, 8:22 pm, CT2...@xxxxxxxxx wrote:
I'm currently working on my capstone project at school which is aHi
DICOM Viewer. I have the viewer to the point were I support all common
formats except compressed images, which is my next area of work. I'm
want to support DICOM images with transfer syntax
1.2.840.1008.1.2.4.70, JPEG lossless non-hierarchical first-order
prediction.
However, I have just hit a wall with this. I have not been able to
find very many resources online as to how I need to decompress the
pixel data, whether it be the algorithm or a library of some kind.
I should point out that while my capstone project is for school on
requirement is that an outside source (usually a business) requests
it. As such this viewer is going to be used internally at a local
business, which I'm not sure, but may cause some problems with
licensing on libraries. Any help you can provide me will be greatly
appreciated.
Also, I don't know if it makes a difference or not not but I am
creating this in C#.
I agree with Chuck. And to help you avoid hitting a brick wall:
avoid at all cost:
* stanford pvrg codec: buggy in lossless 16bits
* cornell: buggy in almost all lossless mode
ijg as such is not enough and you need the famous jpeg lossless patch.
Which is already integrated in offis.
See the sf.net project that I maintain:
http://sourceforge.net/projects/jpeg
Trust me I tried a *lot* of implementation before settling to IJG.
As a side note, GDCM is a C++ library that is wrapped in C#, and it
does support almost all kind of JPEG compressed images:
http://gdcm.sourceforge.net/
Supporting compressed transfer syntax is actually trivial,
supporting broken compressed transfer syntax from private vendor is
the hard part. See:
http://apps.sourceforge.net/mediawiki/gdcm/index.php?title=gdcm:Suppo...
BTW, if you are developing a viewer, have a look at my minimal GDCM
Conformance Tests here:
http://apps.sourceforge.net/mediawiki/gdcm/index.php?title=General_qu...
2cts
-Mathieu- Hide quoted text -
- Show quoted text -
Thanks for all the responses so far. I know am very uninformed in the
area of compression/decompression and this has really helped. I
figured if I use a library I would have would be in C or C++ and I
would have to go through the process of making a DLL and interface for
C#.
Maybe I get can some input if I describe my problem set a bit more.
The decompression is not the only thing I need to do, in fact after I
release it to my sponsor company it will probably be switched out with
another one. The main goal of my side is to create a proper design so
that the decompression system can be easily expanded later for more
types of decompression and vendor specific compression types.
So right now I'm am just looking for support .70 transfer syntax (as
much of it as I can) as more of a proof of concept for the project. As
if the project takes of later the company will probably enter into
some kind of deal with a private company such as Pegasus or create
their own codecs. If this is as trivial as you claimed it is,
Mathieu, this would fall under how I originally though it would be - a
month of research, 2-3 days of work.
That said I'm leaning towards these two libraries: http://sourceforge.net/projects/jpeg
and http://apps.sourceforge.net/mediawiki/gdcm/index.php?title=Main_Page
Mathieu you suggested using ijg, but I haven't seen any documentation
from their site saying they support JPEG lossless, in fact everything
thing I've read has said lossless is basically obsolete and no one
uses it.
If I may - the ijg from their site does not support lossless. You will need the "famous" lossless patch. Mathieu has collected them at the JPEG source forge site.
_IF_ you go with either the OFFIS libraries _OR_ gdcm, then you will get the lossless patch automatically integrated.
As Mathieu has suggested, the best approach will probably be using the GDCM. I personally used some of the OFFIS classes that wrapped the ijg libraries. I _think_ (and may Mathieu forgive me if I'm wrong) that GDCM also uses the OFFIS libraries for the JPEG decompression/compression.
You may wish to look at the OFFIS dcmtk code - that library has a framework for registering compressors/decompressors - specifically see dcmcjpeg and dcmdjpeg utilities. You may wish to glean their framework and do something like that in your viewer.
Chuck
.
- Follow-Ups:
- Re: JPEG Lossless decompression
- From: Mathieu Malaterre
- Re: JPEG Lossless decompression
- References:
- JPEG Lossless decompression
- From: CT2049
- Re: JPEG Lossless decompression
- From: Mathieu Malaterre
- Re: JPEG Lossless decompression
- From: CT2049
- JPEG Lossless decompression
- Prev by Date: Re: Free or Open Source DICOM Viewer and PACS Client
- Next by Date: Re: JPEG Lossless decompression
- Previous by thread: Re: JPEG Lossless decompression
- Next by thread: Re: JPEG Lossless decompression
- Index(es):
Relevant Pages
|