<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-&gt;SetFileName(&#39;Sample.3ds&#39;);</div>
<div>importer-&gt;Read();</div>
<div>vtkAppendPolyData* append = vtkAppendPolyData::New();</div>
<div><font color="#0000ff"><font color="#0000ff">for</font></font> (vtk3DSMesh* mesh = importer-&gt;MeshList; mesh != (vtk3DSMesh *) NULL; mesh = (vtk3DSMesh *) mesh-&gt;next)</div>
<div>{</div>
<div>     vtkPolyData* polyData = mesh-&gt;aPolyData;</div>
<div>     append-&gt;AddInput(polyData);</div>
<div>}</div>
<div>vtkPolyDataMapper* mapper = vtkPolyDataMapper::New();</div>
<div>mapper-&gt;SetInputConnection(append-&gt;GetOutputPort());</div>
<div>vtkActor* actor = vtkActor::New();</div>
<div>actor-&gt;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-&gt;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-&gt;AddRenderer(Ren);</font></font></font></div>
<div><font color="#008000"><font color="#008000"><font color="#000000">renWin-&gt;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&#39;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>