[vtkusers] visualize a 3d matrix?

David.Pont at ensisjv.com David.Pont at ensisjv.com
Sun Dec 17 15:05:55 EST 2006


"TheSaint 555" <thesaint555 at hotmail.com> wrote on 15/12/2006 22:58:20:

> Im new to VTK and have a few questions before I start using it.
>
> I have an NxNxN matrix (N typically being 15-30). Each element is in the
> range [0-3]. I would like to visualize the matrix as a collection of
NxNxN
> little cubes each colored only if the value is non zero (and be able to
> rotate it with the mouse). I would like the zero-values elements to be
fully
> transparent. What is the easiest way to do this in VTK? Is there already
a
> class that implements this?
>
> I would like to also be able to slice the matrix arbitrarily along the
axes
> and view the intersection of the elements with the cross section plane.
>
> And is there an easy way to generate postscript of these image?
>
> _________________________________________________________________
> Tried the new MSN Messenger? It’s cool! Download now.
> http://messenger.msn.com/Download/Default.aspx?mkt=en-in
>
> _______________________________________________
> 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

vtkLookupTable allows control of alpha. You can build a lookup table 'by
hand' using SetNumberOfColors, SetTableValue-(one per color), Build. You
would set alpha to 0 (transparent) for the appropriate scalar values and
set to 1 for everything else, probably using RGB to show variation in
scalars.

  Dave P
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20061218/079b6534/attachment.htm>


More information about the vtkusers mailing list