<div dir="ltr"><div><div><div>dear luis,</div><div><br></div><div>i want to display the segmented part using vtk , but the problem when save segmented data and try to display it nothing appear , just blank data , how to reconstruct the 3D of the segmented part </div>
<div><br></div><div>best regards</div><br><div class="gmail_quote">On Tue, Mar 16, 2010 at 7:57 PM, Luis Ibanez <span dir="ltr"><<a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">Hi Ali,<br>
<br>
Thanks for your detailed post.<br>
<br>
<br>
It seems however that you missed<br>
to describe what the problem is.<br>
<br>
What exactly is what you want to fix ?<br>
<br>
---<br>
<br>
If you are looking for examples on how to use<br>
VTK to visualize a segmentation produced by ITK,<br>
then you may want to look at:<br>
<br>
InsightApplications/Auxiliary/vtk/<br>
itkReadITKImage3DSegmentShowVTK.cxx<br>
<br>
<a href="http://www.itk.org/cgi-bin/viewcvs.cgi/Auxiliary/vtk/itkReadITKImage3DSegmentShowVTK.cxx?root=InsightApplications&view=log" target="_blank">http://www.itk.org/cgi-bin/viewcvs.cgi/Auxiliary/vtk/itkReadITKImage3DSegmentShowVTK.cxx?root=InsightApplications&view=log</a><br>
<br>
<br>
Regards,<br>
<br>
<br>
Luis<br>
<br>
<br>
-----------------------------------------------------------<br>
</div><div><div></div><div class="h5">On Fri, Mar 12, 2010 at 3:36 PM, Ali Habib <<a href="mailto:ali.mahmoud.habib@gmail.com">ali.mahmoud.habib@gmail.com</a>> wrote:<br>
> Dear All,<br>
> I use ITK snap program to segment , then save the segmentation output to raw<br>
> image data (using the menu segmentation --> Save As )<br>
> I read it using vtk, and try t extract the bone ad reconstruct it using the<br>
> following code :<br>
> vtkMetaImageReader metaImageReader = new vtkMetaImageReader();<br>
> metaImageReader.SetFileName(@"C:\Users\Eng. Ali<br>
> Mahmoud\Desktop\yyymhdmhd");<br>
> metaImageReader.Update();<br>
><br>
> vtkImageShrink3D VIS = new vtkImageShrink3D();<br>
> VIS.SetShrinkFactors(2, 2, 2);<br>
> VIS.SetInputConnection(metaImageReader.GetOutputPort());<br>
> VIS.Update();<br>
> vtkImageThreshold VIT = new vtkImageThreshold();<br>
> VIT.ThresholdBetween(200, 2000);<br>
> VIT.SetInputConnection(VIS.GetOutputPort());<br>
> VIT.Update();<br>
> vtkImageMarchingCubes imageMarchingCubes = new<br>
> vtkImageMarchingCubes();<br>
> imageMarchingCubes.SetInput(VIT.GetOutput());<br>
> imageMarchingCubes.SetValue(0, 500);<br>
> imageMarchingCubes.ComputeScalarsOff();<br>
> imageMarchingCubes.ComputeNormalsOff();<br>
> imageMarchingCubes.ComputeGradientsOff();<br>
> imageMarchingCubes.Update();<br>
> vtkPolyDataMapper map =new vtkPolyDataMapper();<br>
> map.SetInput(imageMarchingCubes.GetOutput());<br>
> // actor coordinates geometry, properties, transformation<br>
> vtkActor aSphere =new vtkActor();<br>
> aSphere.SetMapper(map);<br>
> aSphere.GetProperty().SetColor(0,0,1); // sphere color blue<br>
> // a renderer and render window<br>
> vtkRenderer ren1 =new vtkRenderer();<br>
> vtkRenderWindow renWin =new vtkRenderWindow();<br>
> renWin.AddRenderer(ren1);<br>
> // an interactor<br>
> vtkRenderWindowInteractor iren =new vtkRenderWindowInteractor();<br>
> iren.SetRenderWindow(renWin);<br>
> // add the actor to the scene<br>
> ren1.AddActor(aSphere);<br>
> ren1.SetBackground(1,1,1); // Background color white<br>
> // render an image (lights and cameras are created automatically)<br>
> renWin.Render();<br>
> // begin mouse interaction<br>
> iren.Start();<br>
><br>
> how to fix that<br>
> Best regards<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
</div></div><div><div></div><div class="h5">> _____________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Kitware offers ITK Training Courses, for more information visit:<br>
> <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
><br>
> Please keep messages on-topic and check the ITK FAQ at:<br>
> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
><br>
><br>
</div></div></blockquote></div><br></div></div></div>