<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>