[vtkusers] best way to reconstruct a stack of polydata

Marcelo Costa Oliveira marcelo at cci.fmrp.usp.br
Thu Sep 13 16:54:50 EDT 2001


Hi users !!!! First, sorry my poor poor english, i'm from Brazil and 
beginning with vtk.

Second, my condole to american people.

I need to reconstruct a volume from a stack of polydata (made by 
vtkCutter).  Because there aren't  a  FilePrefix to read a sequence of 
PolyData, I did..:

vtkAppendPolyData *append = vtkAppendPolyData :: New();
vtkPolyDataReader *reader1 = vtkPolyDataReader :: New();
vtkTransform *Transform3 = vtkTransform::New();
vtkTransformPolyDataFilter *TransformFilter3 = 
vtkTransformPolyDataFilter::New();
int cont = 1; 


if ((fp = fopen ("cutter1", "r")) != NULL )

       {
 
        reader1 -> SetFileName ("cutter1");
     
        Transform3 -> Translate (0, 0, cont);
        cont = cont + (-0.00001);
        TransformFilter3->SetInput (reader1 -> GetOutput());
 
        TransformFilter3->SetTransform (Transform3);     
      

        append -> AddInput ( TransformFilter3 -> GetOutput());
  
       }
      
   append -> AddInput ( cutter -> GetOutput());
    
vtkPolyDataWriter *write = vtkPolyDataWriter :: New();

vtkPolyDataReader *readerAppend = vtkPolyDataReader :: New();

 vtkImplicitModeller *modeller = vtkImplicitModeller::New();
 
vtkContourFilter *contour = vtkContourFilter::New();
 
vtkDecimatePro *decimate = vtkDecimatePro :: New();

  
vtkSmoothPolyDataFilter *smooth = vtkSmoothPolyDataFilter :: New();
 
  




More information about the vtkusers mailing list