[vtkusers] passing an vtkCharArray through vtkExtractPolyDataGeometry filter

Karl Merkley karl at elemtech.com
Fri Oct 17 18:52:47 EDT 2008


I have polydata that has a vtkCharArray attached as cell data to the  
polydata.   I pass this polydata through the  
vtkExtractPolyDataGeometry filter and the cell data is set on all the  
wrong cells.  This is embedded in a big piece of code so I don't have  
a small problem that demonstrates this but this is basically what I am  
doing . . .


     // set up a selection loop based on the ordered points in the edges
     vtkSmartPointer<vtkMyImplicitSelectionOffset> loop =
        vtkSmartPointer<vtkMyImplicitSelectionOffset>::New();
     loop->SetLoop(loopPts);
     loop->SetNormal(0.0, 0.0, 1.0);
     loop->SetAutomaticNormalGeneration(0);
     loop->SetOffsetValue(offsetSize);

     // now extract the geometry from each loop
     vtkSmartPointer<vtkExtractPolyDataGeometry> extract =
       vtkSmartPointer<vtkExtractPolyDataGeometry>::New();
     extract->SetImplicitFunction(loop);
     extract->ExtractInsideOff();
     extract->SetInput(extractedGeometry);
     extract->Update();


When I write out the data before and after this block of code I find  
that the vtkCharArray is set correctly before and it is incorrect  
after this point.   Is this a bug?   Am I misusing the filter?  I  
_thought_ that filters were supposed to pass the data arrays through  
without mangling them.

Clarification would be appreciated!

   Karl







More information about the vtkusers mailing list