[vtkusers] vtkImageviewer2 display 2D contour line

Kahei Lok lokkahei.uniyccc4 at gmail.com
Sun Mar 23 23:37:19 EDT 2014


Dear VTK users,

I am using vtkImageviewer2 to visialize an CT image. I would like to
generate contours around the segmented regions. And then visualize the
contours over the original images. vtkImageVewer2 can do that by
vtkImageViewer->GetRenderer()->AddActor(contour_actor);

What I need is to generate 2D contour lines on each slice. but now the
visualization does not only include 2D contour lines but also 3D surface.
While I just need to show 2D contour lines, not 3D surface.

 I check the class vtkImageViewer2. It is documented in this way.

"This can be used to annotate an image with a PolyData of "edges" or or
highlight sections of an image or display a 3D isosurface with a slice from
the volume, etc. Any portions of your geometry that are in front of the
displayed slice will be visible; any portions of your geometry that are
behind the displayed slice will be obscured"

This problem is also asked in this post in 2011 (
http://vtk.1045678.n5.nabble.com/Generate-contours-around-the-segmented-regions-td3397963.html),
it suggest vtkExtractVOI but I would like to know if there is any
straight-forward way to do this now.

I would like to show 2D contour lines on each image slice. Does anyone know
how to achieve it?

Attached with the result image in that post. Actor seems to be 3D, but the
image is 2D.

Best Regrads,
Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140324/444e4899/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: result image.jpg
Type: image/jpeg
Size: 7825 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140324/444e4899/attachment.jpg>


More information about the vtkusers mailing list