[vtkusers] How extract a 2D slice from a volume using vtkImageReslice??

adexe adexe at ctm.ulpgc.es
Wed Aug 31 08:26:56 EDT 2005


Hi, I've used vtkExtractVOI but it doesn't work properly, My code is:

vtkImageReader--->vtkImageData--->vtkExtractVOI--->vtkImageViewer

*/READER(reader image) ----VOLUME_VIEW(image volume)---EXTRACTOR(extract 
one slice)---VIEWER(viewer the slice)

/*





/vtkImageReader reader
    reader SetDataByteOrderToBigEndian
    reader SetDataScalarTypeToUnsignedShort
    reader SetFilePattern "%s.%03d"
    reader SetFilePrefix "/mnt/home/adexe/exeda/data/Images/I"
    reader SetDataExtent 0 255 0 255 1 160
    reader Update

vtkImageData volume_view    
    volume_view ShallowCopy [reader GetOutput]

vtkExtractVOI extractor
    extractor SetInput volume_view
    extractor SetVOI 0 255 0 255 70 70
    extractor SetSampleRate 1 2 3 
    extractor Update

vtkImageViewer viewer
    viewer SetInput [reslice GetOutput]
    viewer SetColorLevel 300
    viewer SetColorWindow 1000
    viewer Render/
-------------- next part --------------
An embedded message was scrubbed...
From: Amy Squillacote <amy.squillacote at kitware.com>
Subject: Re: [vtkusers] How extract a 2D slice from a volume using
	vtkImageReslice??
Date: Mon, 29 Aug 2005 13:02:03 -0400
Size: 5907
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20050831/daa63842/attachment.eml>


More information about the vtkusers mailing list