[vtkusers] display a thick shell of volume
Weiguang Guan
guanw at rhpcs.mcmaster.ca
Wed Oct 29 12:09:55 EDT 2014
Hi David,
How to combine the outputs from two vtkImplicitFunctionToImageStencil
instances as I need to use two spheres to define a shell? Thanks.
Best,
Weiguang
On 28/10/2014 5:20 PM, David Gobbi wrote:
> Hi Weiguang,
>
> You definitely want to avoid using vtkClipVolume before volume
> rendering, because it produces vtkUnstructuredGrid data instead of
> image data.
>
> If you need a shell, you can use vtkImageGaussianSource to create an
> image of a Gaussian, and then threshold it with lower and upper
> thresholds to create a shell. A Gaussian has radial symmetry, so
> thresholding will create a binary image of a spherical shell. You
> can then multiply this shell by your image.
>
> Or, instead of using vtkClipVolume, you can use
> vtkImplicitFunctionToImageStencil with vtkImageStencil. The output
> will be a vtkImageData. Or, for greater efficiency, use
> vtkROIStencilSource to create a spherical (ellipsoidal) stencil for
> vtkImageStencil.
>
> Or, possibly the easiest "quick fix" would be to convert the
> vtkUnstructuredGrid that you already have into a vtkImageData by using
> vtkProbeFilter. The vtkProbeFilter is a generic filter for copying
> (or interpolating) scalar data from one kind of data set onto another
> kind of data set.
>
> - David
>
>
>
> On Tue, Oct 28, 2014 at 2:23 PM, Weiguang Guan
> <guanw at rhpcs.mcmaster.ca <mailto:guanw at rhpcs.mcmaster.ca>> wrote:
>
> Hi VTK users,
>
> I want to volume render (using 3D texture mapper) a shell with
> specified thickness. Previously, I used vtkClipVolume twice, one
> clipped away the inner portion of a regular volume data, the other
> clipped away outer portion. The only problem is slow rendering
> speed because the resultant data is no longer a regular volume data.
>
> Can anyone suggest a better solution? Would it be faster if I used
> several spheres with texture mapped on them and alpha-blending?
> Thanks.
>
> Best,
> Weiguang
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141029/99bc8009/attachment.html>
More information about the vtkusers
mailing list