[vtkusers] Is vtkUnsignedCharScalars available?

Fabrice Vincent fabrice.vincent at creatis.insa-lyon.fr
Mon Aug 21 12:39:51 EDT 2000


Hi,

I think vtk can read your data. There is no need for conversion.
You can have a look at  the example viewer.tcl and at the documentation of the class vtkImageReader
to learn how to read images.
Try and modify the "viewer.tcl" code for the vtkImageReader  as follows :

#######
vtkImageReader reader
reader SetDataExtent 0 255 0 255 0 255
reader SetFileName "filename"
reader SetDataScalarTypeToUnsignedChar

#######



Have a nice day too!

Fabrice


Dai Chong wrote:

> Hi,
>
> I am a new vtk user. And I am doing a project in
> medical visualization.
>
> I want to convert a 3D raw data file
> (256*256*256,structured points, 1 byte for each point)
> to an appropriate vtk source object.
>
> The data in the file are composed of unsigned char, so
> the natural way is to use vtkUnsignedCharScalars.But
> it seems only vtkFloatScalars exists.I don't want to
> use vtkFloatScalars because this will increase the
> memory for storing the data. Is there any
> implementation of vtkUnsignedCharScalars available?
>
> By the way, is there any other way to transfer my data
> to appropriate vtk source object?
>
> have a nice day!
>
> Dai Chong
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Mail – Free email you can access from anywhere!
> http://mail.yahoo.com/
>
> _______________________________________________
> 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

--
Fabrice VINCENT

CREATIS (CNRS UMR 5515), INSA 502, 69621 Villeurbanne, FRANCE
email: fabrice.vincent at creatis.insa-lyon.fr
tel: 04 72 43 63 06






More information about the vtkusers mailing list