[vtkusers] How read stack of TIF images

Amy Squillacote ahs at cfdrc.com
Tue Oct 7 10:50:23 EDT 2008


Hi Carl,

You should be able to use either vtkTIFFReader 
(http://www.vtk.org/doc/release/5.2/html/a01392.html) or vtkPNGReader 
(http://www.vtk.org/doc/release/5.2/html/a01039.html). You can specify 
the file names using either the SetFileNames or 
SetFilePrefix/SetFilePattern methods in vtkImageReader2 (superclass of 
both vtkTIFFReader and vtkPNGReader). vtkImageReader2 also has methods 
for specifying the spacing, origin, etc. Also, make sure to set the file 
dimensionality to 2 since you're reading slices.

- Amy

Carl Trapani wrote:
> Hi All,
>
> I'm trying to display a stack of 10 RGB cross section images as a 
> volume. The images are in-situ hybridization cross sections of the 
> mouse cerebellum that have been manually segmented and thresholded. 
> You can see them here:
>
> http://www.skytopsoftware.com/grits/ish/PAX6_P05/
>
> The files are TIF or PNG or I can convert to some other standard format.
>
> 1) vtkVolume16Reader doesn't seem appropriate, is it? Are there any 
> other vtkVolumeReader sub-classes that I might use?
> 2) What format are the images in VTKData/Data/headsq/quarter?
> 3) Any suggestions on classes to use or example to look at?
>
> I'm using VTK 5.2.
>
> Thanks,
> Carl
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: 
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>

-- 
Amy Squillacote                    Phone: (256) 726-4839
Computer Scientist                 Fax: (256) 726-4806
CFD Research Corporation           Web: http://www.cfdrc.com
215 Wynn Drive, Suite 501
Huntsville, AL  35805





More information about the vtkusers mailing list