[vtkusers] Opaque subvolumes

Allan Lyckegaard allan.lyckegaard at risoe.dk
Fri Aug 29 17:54:09 EDT 2008


Dear all,

I am quite new to VTK nad have a question about file formats.

I have a Matlab script that does some processing of volume data and
writes a ACSII VTK file to be rendered in ParaView.

My volume data is a set of subvolumes numbered from 1 to 100. Each
subvolume should have its own (random) color, but a few of them should
be opaque.

So far I write a VTK file something like this:

[VTK]
# vtk DataFile Version 2.0
Volume example
ASCII
DATASET STRUCTURED_POINTS
DIMENSIONS 2 2 2
ASPECT_RATIO 1 1 1
ORIGIN 0 0 0
POINT_DATA 8
SCALARS volume_scalars float 1

LOOKUP_TABLE my_table
1
2
3
4
5
6
7
8

LOOKUP_TABLE my_table 8
0.0 0.0 0.0 0.0
1.0 0.0 0.0 0.0
0.0 1.0 0.0 0.0
1.0 1.0 0.0 0.0
0.0 0.0 1.0 1.0
1.0 0.0 1.0 1.0
0.0 1.0 1.0 1.0
1.0 1.0 1.0 1.0
[/VTK]

When I render this in ParaView as a volume I do not get what I expect
i.e. point 1-4 opaque. Instead all the colors have the same opacity.
When I render it as a surface with the "volume_scalars" as values it is
just grey.

What am I doing wrong? I studiet the vtk file-format documentation but
cannot find any answer. Is it a problem with ParaView perhaps?


Thanks,
Allan



More information about the vtkusers mailing list