Adding JPEG output image file support to VTK
kitware-vtk at kulnet.kuleuven.ac.be
kitware-vtk at kulnet.kuleuven.ac.be
Sun May 14 05:28:02 EDT 2000
--- Forwarded by news2mail for "Joris Vanden Wyngaerd" <joris.vandenwyngaerd at esat.kuleuven.ac.be> ---
I once tried to add support not only for jpeg I/O but for all kinds of
formats by interfacing with ImageMagick. I concluded that vtk and
imagemagick are impossible to combine because of conflicting libraries
(iostream.h vs iostream (stl)). I do not expect that the image I/O
capabilities of Imagemagick will become available in vtk soon, so I would
like to have the possibility to interface them.
Could this be done with something like this ?
#ifdef VTK-USE_STL
#include <iostream>
#else
#include <iostream.h>
with this, a filter like vtkMagickReader (and writer) could be created (as
contrib maybe, not necessarily in the vtk core) wich could read a lot of
formats based on the file name extension.
Joris
"Will Schroeder" <will.schroeder at kitware.com> wrote in message
news:4.2.2.20000509101650.00bdea80 at pop.nycap.rr.com...
> Hi John-
>
> I've been away for a couple of days, sorry for the late response.
>
> Why don't you send me the diffs. I'll look into getting them into the
system. And thanks for the contribution.
>
> The work you've done raises some issues that we've been wrestling with.
> Namely, how do we include software that has dependencies on external
packages? Certainly your addition is extremely valuable and many people
would like to use it. On the other hand, since the contribution requires
additional external software, it ends up making VTK harder to compile and
test. Do you (or anyone on this list) have any ideas on how to manage this
situation?
>
> Will
>
> At 04:08 PM 5/4/00 -0600, you wrote:
> >I've added JPEG output file support to VTK and would like to contribute
> >it back to the code base. But therein hangs a tale, and any advice
> >would be appreciated.
> >
> >First, I'm told that others have also added JPEG output image file
> >support to VTK. However, I don't see it in the source base, and my
> >search of the E-mail archives yielded no hits on JPEG. Please speak up
> >if I'm wasting my time here. Also please speak up if there's a good
> >reason why such support hasn't made it into the code base
> >heretofore--maybe there's a technical or political issue I'm ignorant of
> >in this regard.
> >
> >Second, somehow the configuration script needs to sense both the
> >presence of libjpeg.{a,so,lib} and the include file jpeglib.h. And it
> >needs to run under NT as well (the JPEG library itself compiles and runs
> >just fine under NT). I'm not a configuration script maven--can someone
> >please advise the best way to do this?
> >
> >Third, the source base needs to be updated. VTK gurus have CVS access,
> >but I'm not sure I want to get this deep. Is there someone I can just
> >send the diffs to?
> >
> >Fourth are the details of my implementation. I just added methods to
> >vtkRenderWindow.{h,cxx} that parallel the PPM file output methods that
> >already exist. The only unusual thing about my JPEG output file
> >implementation is that I have added code to turn of chroma downsampling
> >so that the JPEG image is as high quality as can be obtained by an
> >inherently lossy compression scheme. Of course, the location of the
> >origin needed to be remapped between the framebuffer and the JPEG image.
> >
> >In short, works great, would like to contribute it back to the source
> >base if others find it useful, but don't wanna get tied up in my
> >underwear. How to proceed, O ye gods of VTK?
> >
> >Enjoy!
> >
> >John M. Linebarger
> >Sandia National Laboratories
> >
> >
> >--------------------------------------------------------------------
> >This is the private VTK discussion list. Please keep messages on-topic.
> >Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> >To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
> ><majordomo at public.kitware.com>. For help, send message body containing
> >"info vtkusers" to the same address.
> >--------------------------------------------------------------------
>
> --------------------------------------------------------------------
> This is the private VTK discussion list. Please keep messages on-topic.
> Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
> <majordomo at public.kitware.com>. For help, send message body containing
> "info vtkusers" to the same address.
> --------------------------------------------------------------------
>
--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------
More information about the vtkusers
mailing list