<div>Hi,</div>
<div>I'm running through a problem which I hope that someone can help me to solve it.</div>
<div>I've appended many vtkPolyData objects in one vtkAppendPolyData* append object.</div>
<div>Each vtkPolyData object has PointData and CellData contains scalars with three components (RGB) for each point and cell.</div>
<div><font size="2"></font> </div>
<div><font size="2">I can successfully draw append with its PointData and CellData </font></div>
<div><font size="2">vtkPolyDataMapper* mapper =<font size="2">mapper->SetInputConnection(append-><font size="2">GetOutputPort());</font></font></font></div>
<div><font size="2"><font size="2">vtkActor* actor = vtkActor::New();</font></font></div>
<div><font size="2"><font size="2">actor->SetMapper(mapper);</font></font></div>
<div><font size="2"><font size="2"><font size="2">vtkRenderer* ren = vtkRenderer::New();</font></font></font></div>
<div><font size="2"><font size="2"><font size="2"><font size="2">ren->AddActor(actor);</font></font></font></font></div>
<div><font size="2"><font size="2"><font size="2"><font size="2"><font size="2">vtkRenderWindow* renWin = vtkRenderWindow::New();</font></font></font></font></font></div>
<div><font size="2"><font size="2"><font size="2"><font size="2"><font size="2">renWin->AddRenderer(ren);</font></font></font></font></font></div>
<div><font size="2"><font size="2"><font size="2"><font size="2"><font size="2">renWin->SetSize(300,300);</font></font></font></font></font></div>
<div><font size="2"><font size="2"><font size="2"><font size="2"><font size="2">renWin->Render();</font></font></font></font></font></div>
<div><font size="2"><font size="2"><font size="2"><font size="2"><font size="2">which means that append contains the color data for each point and cell.</font></font></font></font></font></div>
<div> </div>
<div>I tried to get vtkImageData object from append, so this image will contain the color components as well.</div>
<div><font size="2">vtkTransformPolyDataFilter* polyDataTransfer = vtkTransformPolyDataFilter::New();</font></div>
<div><font size="2"><font size="2">polyDataTransfer->SetInputConnection(append->GetOutputPort());</font></font></div>
<div><font size="2"><font size="2"><font size="2">vtkImplicitModeller* implicitModeller = vtkImplicitModeller::New();</font></font></font></div>
<div><font size="2"><font size="2"><font size="2">implicitModeller->SetMaximumDistance(0.25);</font></font></font></div>
<div><font size="2"><font size="2"><font size="2">polyDataTransfer->Update();</font></font></font></div>
<div><font size="2"><font size="2"><font size="2">implicitModeller->SetInputConnection(polyDataTransfer->GetOutputPort());</font></font></font></div>
<div><font size="2"><font size="2"><font size="2">implicitModeller->Update();</font></font></font></div>
<div><font size="2"><font size="2"><font size="2"><font size="2"><font size="2">vtkImageData* ima=<font size="2">implicitModeller->GetOutput();</font></font></font></font></font></font></div>
<div>int <font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2">comp = ima->GetNumberOfScalarComponents();</font></font></font></font></font></font></div>
<div><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"></font></font></font></font></font></font> </div>
<div><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2">The problem here is that comp is 1 insted of 3, that means the color components are not passed through these filters..</font></font></font></font></font></font></div>
<div><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2">Does anyone knowes how can I pass the PointData and CellData of append through these filters (vtkTransformPolyDataFilter and vtkImplicitModeller)? (So I'll get a color image which represent the cutting plane through append).</font></font></font></font></font></font></div>
<div><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2">Waiting for your reply and thanks in advance.</font></font></font></font></font></font></div>
<div><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2">BS</font></font></font></font></font></font></div>