[vtkusers] .raw Can't See Any Color

Mathieu Malaterre mathieu.malaterre at kitware.com
Wed Oct 20 11:43:19 EDT 2004


Nathaniel,

If the raw image is RGB, use:

SetNumberOfScalarComponents 3

http://www.vtk.org/doc/nightly/html/classvtkImageReader2.html#z2829_0

HTH
Mathieu

Nathaniel Gonzalez wrote:
> Hi:
> I'm reading a raw image, this image is part of the human visible
> project. When I display it I only see gray image. When I open the image
> in photoshop with the following raw parameter Header 0, Width 2048,
> Height 1216, Count 3, Bits 8, Interlaced No I get a full color image. If
> any one knows what can be my error please let me know. This is how I'm
> doing it.
> 
> vtkImageReader part
>      part SetFileName "a_vm1002.raw"
>      part SetDataSpacing 0.33 0.33 1.0
>      part SetDataExtent 0 2047 0 1215 0 0
>      part SetDataScalarTypeToUnsignedChar
> 
>  vtkImageActor imageActor
>     imageActor SetInput [ part GetOutput ]
> 
> I don't know how to add the parameter Count or Interlaced.
> 
> Thanks for any help.
> 
> Nathaniel Gonzalez
> Programmer
> University of Puerto Rico
> Medical Science Campus
> 
> 
> _______________________________________________
> 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://www.vtk.org/mailman/listinfo/vtkusers
> 






More information about the vtkusers mailing list