[vtkusers] RGB image based volume data

Francois Bertel francois.bertel at kitware.com
Wed Apr 22 00:02:05 EDT 2009


Hello Dave,

In VTK, (for historical reasons?), scalars can have up to 4 components.

Volume mappers can interpret a 3-component scalar has 3 independents
values that will be
individually mapped through some color transfer function. The volume
mappers can also view the 3-component scalar
 as 3 dependent values encoding a color (basically assuming the
mapping from a one-component scalar to a
color value already happened (by some pre-processing or in your case
by some data acquisition process) )

This interpretation is controlled by vtkVolumeProperty, see the
description of SetIndependentComponents() :

http://www.vtk.org/doc/nightly/html/classvtkVolumeProperty.html

Regarding the mapping to opacity values, in the case of 3 components,
I think VolView first generates
a 4th component from the RGB components, probably the luminance and
maps it through the opacity transfer
function. 	(see vtkImageLuminance )

This probably gives you also some hint for contouring RGB images:
first compute the luminance and perform isocontouring on the luminance
values.


Also, there are different volume mappers for uniform grids
(vtkImageData). Not all of them can
do this interpretation or deal with all kind of component types
(unsigned char, unsigned short, ....) .
VolView uses a class from VTKEdge (vtkKWEVolumeMapper) to pick the
VolumeMapper which matches best the hardware
capabilities and type of data. (see http://www.vtkedge.org ) Also,
VolView can uses the
vtkKWEGPUVolumeRayCastMapper which perform ray casting on the graphics
card itself.


In VTK, you can combine opaque polygonal geometry and volume rendering
without any problem. Or combine
opaque polygonal geometry and translucent polygonal geometry (see the
FAQ http://www.vtk.org/Wiki/VTK_FAQ#How_to_display_transparent_objects.3F
) . But you cannot combine volume rendering and translucent polygonal
geometry (the resulting image on screen will be incorrect).

Regards.

On Tue, Apr 21, 2009 at 6:23 PM,  <David.Pont at scionresearch.com> wrote:
> I have used vtk and Paraview for some time primarily to visualise polygonal
> data but we are now collecting data which is 'volumetric' and I would like
> advice on suitable data formats, filters and techniques for visualising it.
>
> We are a forestry research institute and are destructively sampling the
> stems of whole pine trees by serially slicing them and imaging the cross
> sectional discs. The trees are about 12m in length, sliced at approx, 35mm
> intervals yielding in the order of 3-400 disc images per tree (currently
> have 8 trees, more to come!). Discs are imaged sitting on a reference frame
> with control points to allow perspective correction and to establish scale.
> Images are full RGB at 5634 by 3753 pixels although the region of interest
> in the frame (the largest disc) occupies more like 1000 pixels square.
> Preprocessing is used to apply perspective correction, crop (and downsample)
> to produce an image 'stack' that we want to visualise and process using
> Paraview and/or vtk.
>
> I have had some success with this data set using Volview to load and
> visualise as an image stack, and saving as a vtk dataset which Paraview can
> load.
> Issues apparent so far:
> - The size of the stack can be huge, but ideally we would like to retain
> resolution, at least to zoom in on a ROI. This may well require a custom
> built app to handle multi-resolution.
> - The volume is inherently RGB rather than a 'typical' volume which has a
> scalar value at each pixel, yet there seems to be recognition of RGB (by
> Volview) but I am failing to understand what can be done with this type of
> data.
> - Volume filters, eg contouring, presumably operate on scalar values, is it
> possible to operate on 3 component data? Having said that most of the useful
> information is in the red channel.
>
> We also have software to 'segment' the images: extracting the disc from the
> background and then delineating boundaries of the growth rings on each disc
> surface, each boundary is digitised at 700 points around each ring (1/2
> degree polar intervals). This is more familiar territory for me and I have
> written code to connect these points and create polygonal surfaces following
> growth rings from disc to disc (loosely speaking a set of nested polygonal
> cones) and to create hexahedral elements for a 'solid' stem. I used
> unstructured grid for these.
> I have also played around with using the boundaries to create 4 component
> images, for example setting alpha to 0 outside the disc boundary to remove
> the background from the RGB images.
>
> Our goals are still a bit vague as this type of data is new to us, but at
> least:
> - View the RGB image stack: Volview does a nice job of showing the
> individual (or grouped) discs, and 'longitudinal' slices in RGB. This kind
> of capability is definately useful.
> - View the volume. Volview was doing some interesting things here but I was
> very confused about what it was doing and what it might be able to do.
> - Segment the volume using edge detection / contouring etc - help me here,
> what can be done?
> - View the polygonal data from the manual segmentation - this I'm reasonably
> comfortable with.
> - Combine high res images, volume and polygonal data sets in a single
> visualisation! Probably using transparency to blend the 3 data sources.
>
> Finally any recommendations on hardware that will be good for all this. My
> boss might go to $20 - 30K, $10K would be better. Any suggestions: my naive
> thoughts are: a small cluster? too complicated?, a grunty dual core? and
> some kind of stereo monitor sounds good.
>
> Sorry for the looong post, but any help with these queries will be greatly
> appreciated.
>
> regards, Dave Pont
>
>
>
> _______________________________________________
> 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
>
>



-- 
François Bertel, PhD  | Kitware Inc. Suite 204
1 (518) 371 3971 x113 | 28 Corporate Drive
                      | Clifton Park NY 12065, USA



More information about the vtkusers mailing list