[vtkusers] Problem getting vtkExtractVOI to work

Elvis Dowson elvis.dowson at mac.com
Wed Nov 5 20:51:45 EST 2008

        I am unable to get vtkExtractVOI working.

I have some DEM data that I am reading in, and it reads in correctly.  
However, no points exist immediately after applying the vtkExtractVOI  
filter. What am I doing wrong?

vtkDataSetReader readerr DebugOn
     reader SetFileName "SampleDEM.vtk"
     reader Update
     puts "Dataset reader actual memory: [[reader GetOutput]  
     puts "Dataset reader no of points: [[reader GetOutput]  

# Get the physical xy extent of dataset
scan [[reader GetOutput] GetWholeExtent] "%d %d %d %d" XminR XmaxR  
YminR YmaxR
puts "Physical extent of dataset: $XminR $XmaxR $YminR $YmaxR"

vtkExtractVOI subset
   subset DebugOn
   subset SetInputConnection [reader GetOutputPort]
   subset SetSampleRate 5 5 1;
   subset SetVOI $XminR $XmaxR $YminR $YmaxR 1 1
   subset Update
   puts "Extract VOI no of cells : [[subset GetOutput]  
   puts "Extract VOI no of points: [[subset GetOutput]  

Here is the output:

Dataset reader actual memory: 6092
Dataset reader no of points: 1559481
Physical extent of dataset: 0 1098 0 1418

Extract VOI no of cells : 0
Extract VOI no of points: 0

Best regards,

Elvis Dowson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081106/31257213/attachment.htm>

More information about the vtkusers mailing list