[vtkusers] ray casting, segmentation

Lyubomir Zagorchev lzagorch at verizon.net
Thu Apr 13 11:39:39 EDT 2006


Hi Andinet,

First, thanks for your quick reply.

I have just one prop, vtkVolume, but I am using vtkImageTracerWidget, 
linear extrusion and stencil to manually draw a contour that defines 
the clipping. I apply the same procedure repeatedly until I roughly 
clip out the parts of the volume that I don’t need. At the end, the 
structure of interest is the only “visible” piece that is left in the 
volume. Because I am drawing manually, however, there are some pieces 
from the original volume (which are not visible during clipping due 
to the opacity and color transfer functions) that cannot be 
removed and this is what is causing me the troubles.

I looked at vtkFrustumExtractor. According to the description, it 
intersects the input data set with the frustum to determine which 
cells and points are within the frustum. I could use vtkAreaPicker 
to pick the volume that I have drawn. It will return the selected 
frustum as vtkPlanes, but then I would like to intersect the rendered 
volume (after applying opacity and color transfer functions), which 
is a prop not a data set, with the frustum. Am I right or am I 
missing something? Is there a way to do this? 

Thanks again,

Lyubomir


From: Andinet Enquobahrie <andinet.enqu at kitware.com>
Date: Thu Apr 13 09:32:22 CDT 2006
To: Lyubomir Zagorchev <lzagorch at verizon.net>
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] ray casting, segmentation

Lyubomir Zagorchev wrote:

>I use volume rendering to clip a volume in an arbitrary fashion using image stencil.
>It works great, but after clipping I would like to keep only the visible structures that are displayed on the screen. I understand that volume rendering creates a 2D projection from the 3D volume using color and opacity lookup. Is there any way I can apply that same lookup to the original data voxels so that I can *segment* out the structures of interest in the volume? 
>
>Thanks,
>Lyubomir
>
>  
>
Hi Lyubmor,

If the area that you are clipping out can be approximated by a 
rectangle. In other words, if your "structure of interest" can be 
approximated by a rectangle,
you can do the following....

1) Use vtkInteractorStyleRubberBandPick to draw a rectangle on the 
render window..
2) Use vtkAreaPicker to pick props behind the rectangle you have drawn. 
VtkAreaPicker returns the selected frustum as vtkPlanes.
3) Pass the selected frustum (vtkPlanes) to vtkFrustumExtractor.
4) VtkFrustumExtractor returns the portion of the input dataset that 
lies within a selection frustum i.e your structure of interest

-Andinet



>
>_______________________________________________
>This is the private VTK discussion list. 
>Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers
>
>
>  
>




More information about the vtkusers mailing list