Graphics-VTK
view release on metacpan or search on metacpan
examples/old_examples/imaging/ShrinkStream.pl view on Meta::CPAN
#!/usr/local/bin/perl -w
#
use Graphics::VTK;
$VTK_DATA = 0;
$VTK_DATA = $ENV{VTK_DATA};
# Halves the size of the image in the x, Y and Z dimensions.
# Computes the whole volume, but streams the input using the streaming
# functionality in vtkImageFilter class.
#source vtkImageInclude.tcl
# Image pipeline
$reader = Graphics::VTK::ImageReader->new;
$reader->SetDataByteOrderToLittleEndian;
$reader->SetDataExtent(0,255,0,255,1,93);
$reader->SetFilePrefix("$VTK_DATA/fullHead/headsq");
$reader->SetDataMask(0x7fff);
#reader SetStartMethod {puts "reading: [[reader GetOutput] GetUpdateExtent]"}
$shrink = Graphics::VTK::ImageShrink3D->new;
( run in 0.227 second using v1.01-cache-2.11-cpan-4d50c553e7e )