[Insight-users] manual segmentation

Pingkun Yan pingkun.yan at gmail.com
Sat Oct 8 13:36:27 EDT 2005


Isabelle,

This can be done by using vtkPolyDataToImageStencil. An example is attached.

 vtkPolyDataToImageStencil *m_Poly2Stencil;
 vtkImageData       *m_image;
 vtkImageStencil      *m_stencil;

 this->m_Poly2Stencil->SetInput(this->m_pPolyDataSrc);

 this->m_stencil->SetInput(this->m_image);
 this->m_stencil->SetStencil(this->m_Poly2Stencil->GetOutput());
 this->m_stencil->ReverseStencilOff();
 this->m_stencil->SetBackgroundValue(255.0);

m_stencil->GetOutput is what you want.

HTH,
Pingkun



--------------------------------------------------------------------------------
Sent: Thursday, October 06, 2005 3:21 PM
To: insight-users at itk.org; vtkusers at public.kitware.com
Subject: [Insight-users] manual segmentation


Hi guys,

  I have to carry out a manual segmentation of a region of interest
that will be used to initialize a further algorithm.

  Until now, i successed to compute my manual contours by
interpolating some picked control points by splines. Now, I have got
my vtkImageData as well as my contours stored in vtkPolyData rendered
on my window.

I am wondering if there is already something to help me to extract or
set up a region of interest (ROI/VOI) from vtkPolyData = my manually
segmented contours.

I took a look on vtkExtractVOI but it seems to apply only to extract a
rectangular piece of my volume.

Isabelle


More information about the Insight-users mailing list