[vtkusers] [visualizing a volume]

paulus joo paulusjoo at hotmail.com
Thu Jul 8 12:58:24 EDT 2004


Hi John

You can visualize your slices with volume rendering or surface rendering.
For suface rendering you can look at the medical1.cxx, medical2.cxx or
medical3.cxx example.

Good luck




----- Original Message ----- 
From: "John Fourkiotis" <gfourk at zeus.csd.auth.gr>
To: <vtkusers at vtk.org>
Sent: Wednesday, July 07, 2004 9:43 AM
Subject: [vtkusers] [visualizing a volume]


> Hi,
>
> i have used the following code to read 10 tiff image slices of a tooth,
> with each image having dimensions 250x188x8bits, (greyscale):
>
> #include <vtk/vtkTIFFReader.h>
>
> const int GREYSCALE = 1;
> const int TWO_DIMENSIONAL = 2;
> const int LENGTH = 250;
> const int WIDTH = 188;
>
> int main()
> {
> vtkTIFFReader * tiffReader = vtkTIFFReader::New();
> tiffReader->SetDataSpacing(1,1,1); // dont know what value is the
> correct
> tiffReader->SetFileDimensionality(TWO_DIMENSIONAL); // 2-> to read a
> volume from 2D files
> tiffReader->SetNumberOfScalarComponents(GREYSCALE); // greyscale
> tiffReader->SetDataScalarTypeToUnsignedChar();
> tiffReader->SetFilePattern("tooth%i.tif");
> tiffReader->SetDataExtent(0, LENGTH-1, 0, WIDTH-1, 1, 10);
> ...
> return 0;
> }//~
>
> now, how can try to visualize the volume and see if my code does work ?
> Should i use a vtkImageToStructuredPoints and then create a volume ?
>
> thanx
>
>
> -- 
> Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
> _______________________________________________
> 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