[vtkusers] Generate contours around the segmented regions
Xiaopeng Yang
yxp233 at postech.ac.kr
Thu Feb 24 19:55:13 EST 2011
Hi Jerome,
Thanks very much. I prefer to use vtkExtractVOI. However, as far as I know, it just extract one slice from the volume. What I need is to generate 2D contour lines on each slice. I checked my results and found that the visualization not only includes 2D contour lines but also 3D surface. While I just need to show 2D contour lines, not 3D surface.
Could you tell me how to use vtkExtractVOI to make it, for example the parameters?
Thanks,
Yang
发件人: Jérôme [mailto:jerome.velut at gmail.com]
发送时间: 2011년 2월 24일 목요일 오후 5:07
收件人: Xiaopeng Yang
抄送: vtk
主题: Re: [vtkusers] Generate contours around the segmented regions
Hi Yang,
Indeed, the vtkContourFilter is doing exactly what you are asking for : it encloses the binary region inside a contour/surface. If you need to check the segmentation result on each slice, you can
- either use a vtkCutter after the vtkContourFilter,
vtkImporter2 -> vtkContourFilter -> vtkCutter
- or apply vtkContourFilter on an extracted slice of your input volume (eg. vtkExtractVOI).
vtkImporter2 -> vtkExtractVOI ->vtkContourFilter
(assumption made that vtkImporter2 is a sort of reader that imports your binary volume)
I don't know which method is the most efficient.
HTH,
Jerome
2011/2/24 Xiaopeng Yang <yxp233 at postech.ac.kr>
Hello VTK users,
After segmentation, I would like to generate contours around the segmented regions. And then visualize the contours over the original images. However, The generated “contours” look like 3D surface, not 2D contours (see the following image). Do you guys know what’s going on?
The code for generating contours:
vtkContourFilter * contour = vtkContourFilter::New();
contour->SetInput( vtkImporter2->GetOutput() );
contour->SetValue(0, 128); // edges of a binary image with values 0,255
Thanks a lot,
Yang
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110225/568bc91c/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/octet-stream
Size: 7825 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110225/568bc91c/attachment.obj>
More information about the vtkusers
mailing list