[vtkusers] How to read raw 24 bit images

Goodwin Lawlor goodwin.lawlor at ucd.ie
Tue Sep 19 11:41:41 EDT 2000


I asked that on the list last year. Here's a reply from David Gobbi:
<<
Hi Goodwin,

The vtkImageReader only supports packed color images.   If you
want to read 24-bit planar, you'll have to read the file as
a single-component image, use vtkImageClip to cut it into
three pieces, and then use vtkImageAppendComponents to
combine the three pieces into a 3-component RGB image.

All in all, it might be easiest to write a short C program
to convert the planar RGB file to packed format.

 - David
>>

There are some shareware programs (paint shop) the will read in the raw
images and save them as BMPs; these can be easily read in with vtk.

vtkImageLuminance will convert the images into grayscale

Hope this helps,

Goodwin

----- Original Message -----
From: Dimitris Agrafiotis <d.agrafiotis at bristol.ac.uk>
To: <vtkusers at public.kitware.com>
Sent: Sunday, September 19, 1999 4:08 PM
Subject: [vtkusers] How to read raw 24 bit images


> Dear all
>
> I want to read the full color images of the visible human dataset
> (raw RGB 24 BIT NON INTERLEAVED)using vtk. Does somebody know a Tcl
> script that would do that for me? How can I convert the images from rgb
> to grayscale?
>
> Thanks in advance
>
> Dimitris
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers





More information about the vtkusers mailing list