[vtkusers] vtkusers Digest, Vol 75, Issue 22

6dgis at 163.com 6dgis at 163.com
Thu Jul 15 13:33:24 EDT 2010


Hi david,
	
I am not sure that the following problem is same as this subject

        "I have a series of CT Images and render them in Volume by
 vtkVolumeRayCastMapper. Now given a polygon by user clicking
 on the screen, how to clip the volume with the inner objects removed?
 I just want the "hole" effect for displaying."

BTW, after rotating the scene, I want the hole also exist. Could I use 
vtkImageStencil to reach the  goal? Thanks in advance.
 
Best Regards!
------------------				 
6dgis at 163.com
2010-07-16

Date: Wed, 14 Jul 2010 16:31:13 -0600
From: David Gobbi <david.gobbi at gmail.com>
Subject: Re: [vtkusers] best way to clip vtkImageData using
	vtkPloyData
To: Prathamesh Kulkarni <prathameshmkulkarni at gmail.com>
Cc: VTK Mailing List <vtkusers at vtk.org>
Message-ID:
	<AANLkTilNAcpAgK_gWTrZapFYogkvbmD6RgnoMRgjeQMn at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Hi Prathamesh,

You should use either vtkClipVolume or vtkImageStencil, based on what
you want as an output. The vtkClipVolume filter will output an
unstructured grid, i.e. it will produce a geometric data set
consisting of voxel cells (each voxel cell will be a little cube with
eight points at its corners).  If you want the output to be an actual
image, with the background set to black or to transparent, then you
should use vtkImageStencil.

In either case, the best place to start is vtkImplicitLoop, which
takes a contour and produces an "implicit function", which in
VTK-speak, is a function used to define the inside vs. the outside of
a selection area.  Then the vtkImplicitLoop can be used as an input to
vtkImplicitFunctionToImageStencil.  The output of
vtkImplicitFunctionToImageStencil can then be used as an input to e.g.
vtkImageBlend (for pasting a cut-out image onto another image),
vtkImageStencil (for blacking out the non-selected region of the
image), or vtkImageAccumulate (for computing the average value,
standard deviation, or the histogram of the image area inside the
stencil).

   David




On Wed, Jul 14, 2010 at 4:13 PM, Prathamesh Kulkarni
<prathameshmkulkarni at gmail.com> wrote:
>
> Hello all,
>
> I want to extract a sub-image from vtkImageData given a closed set of points
> forming any arbitrary shape (may be a vtkPolyData).
>
> I have been looking at vtk classes like vtkClipVolume, vtkExtractVOI,
> vtkImageStencil. I am no able to understand which way should be preferred
> over which to do my task. Also, I am not able to figure out the exact
> pipeline structure for these clipping methods.
>
> Could someone please throw some light on this?
>
> Thanks,
> Prathamesh
>
> _______________________________________________
> 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
>
>


------------------------------

_______________________________________________
vtkusers mailing list
vtkusers at vtk.org
http://www.vtk.org/mailman/listinfo/vtkusers


End of vtkusers Digest, Vol 75, Issue 22
****************************************





More information about the vtkusers mailing list