Hi Ali,<br><br>I am not a specialist of tetrahedral meshes. But as far as I know, marching cube algorithm outputs a surface, that only has 2D cells. Your DataSetTriangle does the job, I think, that is to triangulate these 2D cells. Your output is coherent with your code. You won&#39;t have tets unless you give it an input with 3D cells.<br>
<br>I hope that I am right and that helps.<br>Jerome<br><br><div class="gmail_quote">2009/10/28 Ali Habib <span dir="ltr">&lt;<a href="mailto:ali.mahmoud.habib@gmail.com">ali.mahmoud.habib@gmail.com</a>&gt;</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><div></div><div class="h5"><div dir="ltr"><div class="gmail_quote"><br>
<div dir="ltr">Hi All, 
<div><br></div>
<div>I use dicom reader to read about just 48 slices , after that I want to apply a mesh algorithm to the volume be reconstructed from those 2d slices, as in this figure appear at this link :  <span style="font-family: &#39;Segoe UI&#39;; white-space: pre; font-size: 12px;"><a href="http://www.zib.de/Numerik/software/kardos/projects/mandible3.gif" target="_blank">http://www.zib.de/Numerik/software/kardos/projects/mandible3.gif</a></span></div>


<div><br></div>
<div>I just tried this algorithm algorithms but  no effect to the stripper(No tetrahedral mesh appeared )  any advice please (attached is the output ) and the used code is :</div>
<div>
<div><br></div>
<div> //Variables</div>
<div><span style="white-space: pre;"></span>array&lt;double&gt; ^metaScalarRange = gcnew array&lt;double&gt;(2) { 0, 0 };</div>
<div><br></div>
<div><br></div>
<div><span style="white-space: pre;"></span>// Read a DICOM series path:</div>
<div><span style="white-space: pre;"></span>vtk::vtkDICOMImageReader ^VDR = gcnew vtk::vtkDICOMImageReader();</div>
<div><span style="white-space: pre;"></span>VDR-&gt;SetDirectoryName(&quot;H:\\work\\Master Degree\\DataSet\\case2\\DICOM\\PA1\\ST1\\SE2&quot;);</div>
<div><span style="white-space: pre;"></span>VDR-&gt;SetDataOrigin(0, 0, 0);</div>
<div><br></div>
<div><span style="white-space: pre;"></span>VDR-&gt;Update();</div>
<div><br></div>
<div><span style="white-space: pre;"></span>/////</div>
<div><span style="white-space: pre;"></span>vtk::vtkImageChangeInformation ^VIC = gcnew vtk::vtkImageChangeInformation();</div>
<div><span style="white-space: pre;"></span>VIC-&gt;SetInput(VDR-&gt;GetOutput());</div>
<div><br></div>
<div><span style="white-space: pre;"></span>VIC-&gt;CenterImageOn();</div>
<div><br></div>
<div><span style="white-space: pre;"></span>VIC-&gt;Update();</div>
<div><br></div>
<div><span style="white-space: pre;"></span>// set the imagedata </div>
<div><span style="white-space: pre;"></span>vtk::vtkImageData ^VoxelData = VIC-&gt;GetOutput();</div>
<div><br></div>
<div><span style="white-space: pre;"></span>vtk::vtkMarchingCubes ^mcubes = gcnew vtk::vtkMarchingCubes();</div>
<div><span style="white-space: pre;"></span>mcubes-&gt;GetOutput()-&gt;ReleaseDataFlagOff();</div>
<div><span style="white-space: pre;"></span>mcubes-&gt;SetInput(VoxelData);</div>
<div><span style="white-space: pre;"></span>mcubes-&gt;SetValue(0, 4);</div>
<div><span style="white-space: pre;"></span>mcubes-&gt;ComputeGradientsOn();</div>
<div><span style="white-space: pre;"></span>mcubes-&gt;Update();</div>
<div><br></div>
<div><br></div>
<div><span style="white-space: pre;"></span>vtk::vtkSmoothPolyDataFilter ^smoother = gcnew vtk::vtkSmoothPolyDataFilter();</div>
<div><span style="white-space: pre;"></span>smoother-&gt;GetOutput()-&gt;ReleaseDataFlagOff();</div>
<div><span style="white-space: pre;"></span>smoother-&gt;SetInput(mcubes-&gt;GetOutput());</div>
<div><span style="white-space: pre;"></span>smoother-&gt;SetNumberOfIterations(5);</div>
<div><span style="white-space: pre;"></span>smoother-&gt;SetRelaxationFactor(0.70);</div>
<div><span style="white-space: pre;"></span>smoother-&gt;SetFeatureAngle(70);</div>
<div><span style="white-space: pre;"></span>smoother-&gt;FeatureEdgeSmoothingOn();</div>
<div><span style="white-space: pre;"></span>smoother-&gt;BoundarySmoothingOn();</div>
<div><span style="white-space: pre;"></span>smoother-&gt;Update();</div>
<div><br></div>
<div><span style="white-space: pre;"></span>vtk::vtkPolyDataNormals ^normals = gcnew vtk::vtkPolyDataNormals();</div>
<div><span style="white-space: pre;"></span>normals-&gt;GetOutput()-&gt;ReleaseDataFlagOff();</div>
<div><span style="white-space: pre;"></span>normals-&gt;SetInput(smoother-&gt;GetOutput());</div>
<div><span style="white-space: pre;"></span>normals-&gt;SetFeatureAngle(80);</div>
<div><span style="white-space: pre;"></span>normals-&gt;Update();</div>
<div><br></div>
<div><span style="white-space: pre;"></span> vtk::vtkStripper ^stripper1 = gcnew vtk::vtkStripper();</div>
<div><span style="white-space: pre;"></span>stripper1-&gt;SetInput(normals-&gt;GetOutput());</div>
<div><span style="white-space: pre;"></span>stripper1-&gt;GetOutput()-&gt;ReleaseDataFlagOff();</div>
<div><span style="white-space: pre;"></span>stripper1-&gt;Update();</div>
<div>// </div>
<div>//          vtkDelaunay3D stripper = new vtkDelaunay3D();</div>
<div>//            stripper.SetInputConnection(normals.GetOutputPort());</div>
<div>//            stripper.Update();</div>
<div><span style="white-space: pre;"></span> vtkDataSetTriangleFilter ^stripper = gcnew vtkDataSetTriangleFilter();</div>
<div><span style="white-space: pre;"></span>stripper-&gt;SetInputConnection(normals-&gt;GetOutputPort());</div>
<div><br></div>
<div><br></div>
<div><span style="white-space: pre;"></span>vtkDataSetMapper ^mapper = gcnew vtkDataSetMapper();</div>
<div><span style="white-space: pre;"></span>mapper-&gt;SetInputConnection(stripper-&gt;GetOutputPort());</div>
<div><br></div>
<div><span style="white-space: pre;"></span>/////////////////////</div>
<div><br></div>
<div><br></div>
<div><span style="white-space: pre;"></span>// actor coordinates geometry, properties, transformation </div>
<div><span style="white-space: pre;"></span>vtkActor ^aSphere = gcnew vtkActor();</div>
<div><span style="white-space: pre;"></span>aSphere-&gt;SetMapper(mapper);</div>
<div><span style="white-space: pre;"></span>   // aSphere.GetProperty().SetRepresentationToWireframe();</div>
<div><span style="white-space: pre;"></span>//aSphere.GetProperty().SetColor(0,0,1); // sphere color blue</div>
<div><br></div>
<div><span style="white-space: pre;"></span>// a renderer and render window </div>
<div><span style="white-space: pre;"></span>vtkRenderer ^ren1 = gcnew vtkRenderer();</div>
<div><span style="white-space: pre;"></span>vtkRenderWindow ^renWin = gcnew vtkRenderWindow();</div>
<div><span style="white-space: pre;"></span>renWin-&gt;AddRenderer(ren1);</div>
<div><br></div>
<div><span style="white-space: pre;"></span>// an interactor </div>
<div><span style="white-space: pre;"></span>vtkRenderWindowInteractor ^iren = gcnew vtkRenderWindowInteractor();</div>
<div><span style="white-space: pre;"></span>iren-&gt;SetRenderWindow(renWin);</div>
<div><br></div>
<div><span style="white-space: pre;"></span>// add the actor to the scene </div>
<div><span style="white-space: pre;"></span>ren1-&gt;AddActor(aSphere);</div>
<div><span style="white-space: pre;"></span>//ren1.SetBackground(1,1,1); // Background color white</div>
<div><br></div>
<div><span style="white-space: pre;"></span>// render an image (lights and cameras are created automatically) </div>
<div><span style="white-space: pre;"></span>renWin-&gt;Render();</div>
<div><br></div>
<div><span style="white-space: pre;"></span>// begin mouse interaction </div>
<div><span style="white-space: pre;"></span>iren-&gt;Start();</div>
<div><br></div>
<div>Hint : the delaunary3d take along time , so I stoped it before seeing the resuult</div></div></div></div><br></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>