[vtkusers] [Insight-users] itk snap . Question

Ali Habib ali.mahmoud.habib at gmail.com
Tue Mar 16 15:35:00 EDT 2010


dear luis,

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

best regards

On Tue, Mar 16, 2010 at 7:57 PM, Luis Ibanez <luis.ibanez at kitware.com>wrote:

> Hi Ali,
>
> Thanks for your detailed post.
>
>
> It seems however that you missed
> to describe what the problem is.
>
> What exactly is what you want to fix ?
>
> ---
>
> If you are looking for examples on how to use
> VTK to visualize a segmentation produced by ITK,
> then you may want to look at:
>
> InsightApplications/Auxiliary/vtk/
>     itkReadITKImage3DSegmentShowVTK.cxx
>
>
> http://www.itk.org/cgi-bin/viewcvs.cgi/Auxiliary/vtk/itkReadITKImage3DSegmentShowVTK.cxx?root=InsightApplications&view=log
>
>
>      Regards,
>
>
>             Luis
>
>
> -----------------------------------------------------------
> On Fri, Mar 12, 2010 at 3:36 PM, Ali Habib <ali.mahmoud.habib at gmail.com>
> wrote:
> > Dear All,
> > I use ITK snap program to segment , then save the segmentation output to
> raw
> > image data (using the menu segmentation --> Save As )
> > I read it using vtk, and try t extract the bone ad reconstruct it using
> the
> > following code :
> >  vtkMetaImageReader metaImageReader = new vtkMetaImageReader();
> >             metaImageReader.SetFileName(@"C:\Users\Eng. Ali
> > Mahmoud\Desktop\yyymhdmhd");
> >             metaImageReader.Update();
> >
> >             vtkImageShrink3D VIS = new vtkImageShrink3D();
> >             VIS.SetShrinkFactors(2, 2, 2);
> >             VIS.SetInputConnection(metaImageReader.GetOutputPort());
> >             VIS.Update();
> >             vtkImageThreshold VIT = new vtkImageThreshold();
> >             VIT.ThresholdBetween(200, 2000);
> >             VIT.SetInputConnection(VIS.GetOutputPort());
> >             VIT.Update();
> >             vtkImageMarchingCubes imageMarchingCubes = new
> > vtkImageMarchingCubes();
> >             imageMarchingCubes.SetInput(VIT.GetOutput());
> >             imageMarchingCubes.SetValue(0, 500);
> >             imageMarchingCubes.ComputeScalarsOff();
> >             imageMarchingCubes.ComputeNormalsOff();
> >             imageMarchingCubes.ComputeGradientsOff();
> >             imageMarchingCubes.Update();
> >              vtkPolyDataMapper map =new vtkPolyDataMapper();
> >   map.SetInput(imageMarchingCubes.GetOutput());
> >   // actor coordinates geometry, properties, transformation
> >   vtkActor aSphere =new vtkActor();
> >   aSphere.SetMapper(map);
> >   aSphere.GetProperty().SetColor(0,0,1); // sphere color blue
> >   // a renderer and render window
> >   vtkRenderer ren1 =new vtkRenderer();
> >   vtkRenderWindow renWin =new vtkRenderWindow();
> >   renWin.AddRenderer(ren1);
> >   // an interactor
> >   vtkRenderWindowInteractor iren =new vtkRenderWindowInteractor();
> >   iren.SetRenderWindow(renWin);
> >   // add the actor to the scene
> >   ren1.AddActor(aSphere);
> >   ren1.SetBackground(1,1,1); // Background color white
> >   // render an image (lights and cameras are created automatically)
> >   renWin.Render();
> >   // begin mouse interaction
> >    iren.Start();
> >
> > how to fix that
> > Best regards
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > _____________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Kitware offers ITK Training Courses, for more information visit:
> > http://www.kitware.com/products/protraining.html
> >
> > Please keep messages on-topic and check the ITK FAQ at:
> > http://www.itk.org/Wiki/ITK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.itk.org/mailman/listinfo/insight-users
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100316/2c2c3f88/attachment.htm>


More information about the vtkusers mailing list