Re: get slice texture?

New Message Reply Date view Thread view Subject view Author view

From: Werner Wohlfahrter (wwohlfah@crcg.edu)
Date: 04/14/2000 08:36:12


Hi,

you are right, having more context information helps finding solutions for
problems.

My task is finding new ways to interact with volume data. I am working in an
virtual environment using a Barco Virtual Table, magnetic tracker,
Studierstube (http://www.cg.tuwien.ac.at/research/vr/studierstube/) and
Volumizer.

Studierstube is an augmented reality framework build on top of OpenInventor
which provides stereo vision and 2 handed interaction using a personal
interaction panel (PIP) in the one hand and a pen in the other.
The Pen and the PIP are tracked.
The PIP is a see-through plastic palette on which the virtual menus are
displayed. (Think of a painter who holds a painters palette in the left and a
brush in his right.)
Volumizer is used to display the Volume data (surprise :). It is encapsulated
in OpenInventor Nodes having a renderAction inside which is used by
OpenInventor when traversing the sceneGraph.
Using these tools enables me to display tiff and raw format volume data on the
virtual table.
I mapped a button and some sliders on the PIP where the button enables or
disables Volumizers lookup-table and the sliders set the center and the width
to get different displays.
If you stick the pen into the volume and hold the pen's button down the volume
will follow the pens movement.
If you turn over the PIP the virtual menu disappears and you use the PIP as a
cutting plane by sweeping through the volume. I am also able to fix cutting
planes, move the volume and fix another one which is a very natural way of
defining a volume of interest.
Now I try to grab the texture of such a cutting plane and stick it somewhere
on the virtual table. Imagine xray sheets on a doctors lightingwall.... These
textures should be mapped on an OpenInventor Object (SoIndexedFace Set,
SoCube) which is pickable and therefore moveable. If this would work I could
set different cutting planes, getting different "xrays" and still have the 3d
volume beside it .... which would be cool.

So my problem now is to get the texture out of the volume and into an
OpenInventor Object.

I tried to run polygonizeMPR() using C3F_V3F and C4F_V3F but it still doesn't
work.

I also got a good hint from Manfred. It makes sense to take care of
interleavedArrayFormat from the beginning not only before using the
polygonizeMPR() function..... I did not check that yet.

Hope this context information gives you a deeper understanding of my problem.
Thanks for all your help. If you have any good ideas how to solve this problem
- i would REALLY appreciate
it!

thanks ww ;)

Dave Akers wrote:

> Hi Werner,
>
> There are a couple of things you need to know about MPR in 2D texturing
> mode. What you get back in this case is a whole bunch of polygon-pairs
> associated with the bricks of the current brickset. The two polygons in
> each pair have identical vertex information, but they are binned in
> different bricks and have different per-vertex colorings. The two polygons
> in each pair are drawn on top of each other, and the colors are used as
> weights in the blending process. Make sense?
>
> So the result of all of this is that you absolutely must use C3F_V3F or
> C4F_V3F as your interleavedArray type for MPR and 2D texturing. (You'll
> notice that the voglMPR demos use C4F_V3F.) That would explain why you
> would be getting strange results from the call to polygonizeMPR().
>
> You may also be confused about the way the texture mapping works in
> Volumizer. You asked where the texture was stored when using an
> interleavedArrayFormat without a T3F component to it. In this case,
> Volumizer uses texgen in order to set up the texture coordinate system
> implicitly from the vertex coordinates. So just before each brick is
> bound, there is a call to voAppearanceActions::texgenSetEquation(), which
> sets up the OpenGL texgen equations depending on whether 2-D or 3-D
> textures are being used.
>
> That said, can you tell us more about what you're trying to do - not
> just how you're trying to do it? Understanding the context in more detail
> would give us a better idea of how to help you solve your problem..
>
> Thanks,
>
> Dave
>
> On Thu, 13 Apr 2000, Werner Wohlfahrter wrote:
>
> > Hi!
> >
> > I use Volumizer in combination with OpenInventor. I cutted my Volume
> > using a SoClipPlane (works great!). Now I try to grab the texture of the
> > cuttingPlane and map it on an OpenInventor Object.
> > I think the following should work (please correct me if i'm wrong!):
> > - create allVertexData
> > - create aPolygonSetArray
> > - xfmVox2TexCoords
> > - polygonizeMPR using the planeEquation of SoClipPlane
> > - grab the geometry data from the aPolygonSetArray
> > - grab the texture data from the aPolygonSetArray
> > - use SoCoordinate3 Object to store geometry
> > - use SoTextureCoordinate2 to store texture
> > - use SoNormal
> > - use SoNormalBinding
> > - use SoTextureCoordinateBinding
> > - use So(Indexed)FaceSet
> >

--
                                                         \|/
                                                         @ @
======================================================oOO(_)OOo=====
      Werner Wohlfahrter
      Fraunhofer CRCG, Inc.
      321 South Main St.
      Providence, RI 02903, USA

phone : (+1) 401 453-6363 x110 email : wwohlfah@crcg.edu, ww@cg.tuwien.ac.at url : http://www.crcg.edu/ww icq : 9611406 =====================================================================


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Apr 19 2000 - 11:32:42 PDT