[vtkusers] Create Multiple slices using vtkCutter and output all the slices into a single polydata file
    Ng Hong Wan 
    hongwan at myrealbox.com
       
    Wed Jul 24 08:07:31 EDT 2002
    
    
  
I am using a cutter to cut through the slice of a human head at
different z intervals using vtkcutter. Doing that requires a loop that
will create many cutedges, when I output it using vtkpolywriter, it will
create many files as well, is there a way to combine the all the slices
together??
set i 0
while {$i < 10} {
    incr i
vtkPlane plane$i
    plane$i SetOrigin 0 0 $i
    plane$i SetNormal 0 0 1
vtkCutter cutEdges$i; #Generate cut lines
  cutEdges$i SetInput [normals GetOutput]
  cutEdges$i SetCutFunction plane$i
  cutEdges$i GenerateCutScalarsOn
  cutEdges$i SetValue 0 0.5
}
set i 0
while {$i < 140} {
    incr i
   vtkPolyDataWriter pdw
   pdw SetInput [cutStrips1 GetOutput]
   pdw SetFileName test.pdw
   pdw Write
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20020724/20e30c57/attachment.htm>
    
    
More information about the vtkusers
mailing list