Hi Everyone,<br><br>I just downloaded and installed VTK using Visual Studio .Net 2003. Didnt have any pain in getting started. I compiled and installed the SDK. I also wrote a few examples to let me have a feel of VTK. <br>
<br>Actually, my intention right now is to use the vtkDecimatePro for polygon reduction of large terrain data (which is in 3DS file format). I know that vtk has a 3DS importer. I can import the 3DS file and view it on the screen. However, I have no clue on how to attach this 3DS file to the vtkDecimatePro. I found examples where the vtkDecimatePro takes in an input from the output of a vtkPolyDataReader as shown in the following code.
<br><br>My problem is:<br>1. how to get the the vtkPolyData from the 3DS importer and set to the vtkDecimatePro as input?<br>2. How to get all the triangles from the output of the reduced polygon and save to a 3DS file?<br>
<br><br>>><br> vtkPolyDataReader* fran = vtkPolyDataReader::New();<br> fran->SetFileName("E:/Try/VSolution/somedata.vtk");<br><br> //vtk3DSImporter *fran = vtk3DSImporter::New();<br> //fran->SetFileName("E:/Try/VSolution/VTKPolyReduction/knight.3ds");
<br> //fran->Read();<br><br> //We want to preserve topology (not let any cracks form). This may<br> //limit the total reduction possible, which we have specified at 90%.<br> vtkDecimatePro* deci = vtkDecimatePro::New();
<br> deci->SetInputConnection(fran->GetOutputPort()); // how to set data loaded by 3DS importer here?????<br> deci->SetTargetReduction(0.9);<br> deci->PreserveTopologyOn();<br>>><br><br><br>Any help will be greatly appreciated.
<br><br>Best regards, <br>Shamim Akhtar.<br><br>