Hi Ali,<br><br>1. You should be more precise about what you want exactly. There are a lot of different ways for interpreting this question:<br> - Do you want the bounding box of your volume? -> vtkOutlineFilter<br>
- Do you want a physical grid representing the volume?<br> - Do you want to extract an iso-surface from your volume? -> vtkContourFilter, vtkMarchingCube,...<br> - vtkThreshold could be of help, but outputs an unstructured grid, not a polydata.<br>
<br>2. Sorry for that, I cannot debug .NET code, since I don't know the concept of "managed" objects. However, I wonder if gcnew does the same work as ::New() from VTK, regarding the reference count and garbage collector. VTK guru's wanted!<br>
<br>HTH<br>Jerome<br><br><div class="gmail_quote">2009/10/19 Ali Habib <span dir="ltr"><<a href="mailto:ali.mahmoud.habib@gmail.com">ali.mahmoud.habib@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div dir="ltr"><div>Dear All ,</div>
<div><br></div>
<div>1. How to convert vtkvolume and vtkimagedata to vtkpolydata </div>
<div> </div>
<div>2.while running the following code , a warning appear :</div>
<div>
<div>Generic Warning: In m:\dev\cur\vtkdotnet\branch\50\Common\vtkMath.cxx, line 394</div>
<div>Unable to factor linear system:</div>
<div> </div>
<div>vtkSphereSource ^sphere = gcnew vtkSphereSource();<br> sphere->SetRadius(1.0);<br> sphere->SetThetaResolution(18);<br> sphere->SetPhiResolution(18);</div>
<div> vtkStripper ^v = gcnew vtkStripper();<br> v->SetInputConnection(sphere->GetOutputPort());<br> v->Update();</div>
<div> vtkDelaunay3D ^v3 = gcnew vtkDelaunay3D();<br> v3->SetInputConnection(v->GetOutputPort());<br> v3->Update()</div>
<div><br> vtkDataSetMapper ^mapper = gcnew vtkDataSetMapper();<br> mapper->SetInputConnection(v3->GetOutputPort());<br> vtkActor ^triangulation = gcnew vtkActor();<br> triangulation->SetMapper(mapper);<br>
triangulation->GetProperty()->SetRepresentationToWireframe();</div>
<div> // Create the standard rendering stuff.<br> vtkRenderer ^ren1 = gcnew vtkRenderer();<br> vtkRenderWindow ^renWin = gcnew vtkRenderWindow();<br> renWin->AddRenderer(ren1);<br> vtkRenderWindowInteractor ^iren = gcnew vtkRenderWindowInteractor();<br>
iren->SetRenderWindow(renWin);</div>
<div> // Add the actors to the renderer, set the background and size<br> //<br> ren1->AddActor(triangulation);<br> ren1->SetBackground(1, 1, 1);<br> renWin->SetSize(300, 300);<br> renWin->Render();</div>
<div><br> renWin->Render();</div>
<div> iren->Initialize();</div>
<div><br> iren->Start();</div>
<div><br></div>
<div>any advice please</div></div></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br>