<div class="gmail_quote">
<div>
<div>Dear all,</div>
<div>I am trying to extract the color data from 3DS file after appending its objects, then render each color in a separate renderwindow.</div>
<div>My code looks like the following:</div>
<div> </div>
<div>vtk3DSImporter *importer = vtk3DSImporter::New();</div>
<div>importer->SetFileName('Sample.3ds');</div>
<div>importer->Read();</div>
<div>vtkAppendPolyData* append = vtkAppendPolyData::New();</div>
<div><font color="#0000ff"><font color="#0000ff">for</font></font> (vtk3DSMesh* mesh = importer->MeshList; mesh != (vtk3DSMesh *) NULL; mesh = (vtk3DSMesh *) mesh->next)</div>
<div>{</div>
<div> vtkPolyData* polyData = mesh->aPolyData;</div>
<div> append->AddInput(polyData);</div>
<div>}</div>
<div>vtkPolyDataMapper* mapper = vtkPolyDataMapper::New();</div>
<div>mapper->SetInputConnection(append->GetOutputPort());</div>
<div>vtkActor* actor = vtkActor::New();</div>
<div>actor->SetMapper(mapper);</div>
<div><font color="#008000"><font color="#008000"><font color="#000000">vtkRenderer* Ren=vtkRenderer::New();</font></font></font></div>
<div><font color="#008000"><font color="#008000"><font color="#000000">Ren->AddActor(actor);</font></font></font></div>
<div><font color="#008000"><font color="#008000"><font color="#000000">vtkRenderWindow* renWin = vtkRenderWindow::New();</font></font></font></div>
<div><font color="#008000"><font color="#008000"><font color="#000000">renWin->AddRenderer(Ren);</font></font></font></div>
<div><font color="#008000"><font color="#008000"><font color="#000000">renWin->Render();</font></font></font></div>
<div><font color="#000000"></font> </div>
<div><font color="#000000">The problem is</font> <font color="#000000">that the result image will be in gray, that means when appending the polyData, I'm taking the geometry without the values of each pixel. </font></div>
<div><font color="#000000">So which filters should I use in case I need to display the Red data only of the 3DS object???... How could I get color components after appending?</font></div>
<div><font color="#000000"> Any idea to solve this problem would be appreciated ...</font></div>
<div><font color="#000000">Thanks in advance...</font> </div></div></div><br>