[vtkusers] Opaque subvolumes
Vidyadhar
vidyadhar at lucidindia.com
Sat Aug 30 06:42:56 EDT 2008
Hi,
The volume visualization using volume mapper uses one color transfer
function and another opacity transfer function. I have not seen any
connection between lookup table stored in vtk file and color or opacity
transfer functions. As far as I know, this is ignored. You noticed opacity
problem. May be you will also notice color problem. What I mean is that even
if colors in lookup table are changed the volume shown by ParaView may not
change. I do not use ParaView but I noticed this type of thing with MayaVi.
I have tried using lookup table but I had to write some code to do this. I
do not know how that can be integrated into ParaView but the idea is to
check if the active scalars have associated lookup table and if it exist
split it into color and opacity transfer function.
Hopefully this atleast help you understand why opacity in lookup table is
not having any effect of volume in ParaView.
HTH
Vidyadhar
----- Original Message -----
From: "Allan Lyckegaard" <allan.lyckegaard at risoe.dk>
To: <vtkusers at vtk.org>
Sent: Saturday, August 30, 2008 3:24 AM
Subject: [vtkusers] Opaque subvolumes
> 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
> _______________________________________________
> 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