<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=Windows-1252">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.6487.1">
<TITLE>RE: [vtkusers] Re: .raw Can't See Any Color</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Thanks for all of your help. It work...!!<BR>
<BR>
<BR>
-----Original Message-----<BR>
From:&nbsp;&nbsp; vtkusers-bounces@vtk.org on behalf of Goodwin Lawlor<BR>
Sent:&nbsp;&nbsp; Wed 10/20/2004 1:22 PM<BR>
To:&nbsp;&nbsp;&nbsp;&nbsp; vtkusers@public.kitware.com<BR>
Cc:&nbsp;&nbsp;&nbsp;&nbsp;<BR>
Subject:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [vtkusers] Re: .raw Can't See Any Color<BR>
Hi Nathaniel,<BR>
<BR>
The VHP images are raw planar... not interlaced the way vtkImageReader<BR>
expects. You are seeing a grayscale image because you are only reading in<BR>
the first (monochrome) channel out of three.<BR>
<BR>
I have a tcl script to read in a raw vhp image and display it in colour. You<BR>
can get it here:<BR>
<BR>
<A HREF="http://www.bioengineering-research.com/vtk/vhpreader.tcl">http://www.bioengineering-research.com/vtk/vhpreader.tcl</A><BR>
<BR>
You can get some test images to play with here:<BR>
<A HREF="ftp://ftp.nlm.nih.gov/visible/bitmaps/color24/">ftp://ftp.nlm.nih.gov/visible/bitmaps/color24/</A><BR>
Decompress them first!<BR>
<BR>
I was going to write a small vtk/tcl app to read/view/crop/write vhp raw<BR>
images but time doesn't permit. This script was an initial test. There are<BR>
shareware apps out there that can batch convert raw planar images to bmp/png<BR>
that vtk can read directly.<BR>
<BR>
<BR>
hth<BR>
<BR>
Goodwin<BR>
<BR>
<BR>
&quot;Mathieu Malaterre&quot; &lt;mathieu.malaterre@kitware.com&gt; wrote in message<BR>
<A HREF="news:41768797.8050400@kitware.com">news:41768797.8050400@kitware.com</A>...<BR>
&gt; Nathaniel,<BR>
&gt;<BR>
&gt; If the raw image is RGB, use:<BR>
&gt;<BR>
&gt; SetNumberOfScalarComponents 3<BR>
&gt;<BR>
&gt; <A HREF="http://www.vtk.org/doc/nightly/html/classvtkImageReader2.html#z2829_0">http://www.vtk.org/doc/nightly/html/classvtkImageReader2.html#z2829_0</A><BR>
&gt;<BR>
&gt; HTH<BR>
&gt; Mathieu<BR>
&gt;<BR>
&gt; Nathaniel Gonzalez wrote:<BR>
&gt; &gt; Hi:<BR>
&gt; &gt; I'm reading a raw image, this image is part of the human visible<BR>
&gt; &gt; project. When I display it I only see gray image. When I open the image<BR>
&gt; &gt; in photoshop with the following raw parameter Header 0, Width 2048,<BR>
&gt; &gt; Height 1216, Count 3, Bits 8, Interlaced No I get a full color image. If<BR>
&gt; &gt; any one knows what can be my error please let me know. This is how I'm<BR>
&gt; &gt; doing it.<BR>
&gt; &gt;<BR>
&gt; &gt; vtkImageReader part<BR>
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; part SetFileName &quot;a_vm1002.raw&quot;<BR>
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; part SetDataSpacing 0.33 0.33 1.0<BR>
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; part SetDataExtent 0 2047 0 1215 0 0<BR>
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; part SetDataScalarTypeToUnsignedChar<BR>
&gt; &gt;<BR>
&gt; &gt;&nbsp; vtkImageActor imageActor<BR>
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; imageActor SetInput [ part GetOutput ]<BR>
&gt; &gt;<BR>
&gt; &gt; I don't know how to add the parameter Count or Interlaced.<BR>
&gt; &gt;<BR>
&gt; &gt; Thanks for any help.<BR>
&gt; &gt;<BR>
&gt; &gt; Nathaniel Gonzalez<BR>
&gt; &gt; Programmer<BR>
&gt; &gt; University of Puerto Rico<BR>
&gt; &gt; Medical Science Campus<BR>
&gt; &gt;<BR>
&gt; &gt;<BR>
&gt; &gt; _______________________________________________<BR>
&gt; &gt; This is the private VTK discussion list.<BR>
&gt; &gt; Please keep messages on-topic. Check the FAQ at:<BR>
&lt;<A HREF="http://public.kitware.com/cgi-bin/vtkfaq">http://public.kitware.com/cgi-bin/vtkfaq</A>&gt;<BR>
&gt; &gt; Follow this link to subscribe/unsubscribe:<BR>
&gt; &gt; <A HREF="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</A><BR>
&gt; &gt;<BR>
&gt;<BR>
&gt;<BR>
&gt;<BR>
&gt; _______________________________________________<BR>
&gt; This is the private VTK discussion list.<BR>
&gt; Please keep messages on-topic. Check the FAQ at:<BR>
&lt;<A HREF="http://public.kitware.com/cgi-bin/vtkfaq">http://public.kitware.com/cgi-bin/vtkfaq</A>&gt;<BR>
&gt; Follow this link to subscribe/unsubscribe:<BR>
&gt; <A HREF="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</A><BR>
&gt;<BR>
<BR>
<BR>
<BR>
_______________________________________________<BR>
This is the private VTK discussion list.<BR>
Please keep messages on-topic. Check the FAQ at: &lt;<A HREF="http://public.kitware.com/cgi-bin/vtkfaq">http://public.kitware.com/cgi-bin/vtkfaq</A>&gt;<BR>
Follow this link to subscribe/unsubscribe:<BR>
<A HREF="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</A><BR>
<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>