Re: volume rendering, scale

Hi Brad,

I think the problem is simply that you have an explicit or
implicit setRange() call on your ScalarMap to ZAxis that is
causing your volume to be squashed.  You want essentially

  zmap.setRange(0.0, 96.0)

Either you are explicitly calling setRange() with other
values, or if you do not call it then the VisAD autoscaling
is implicitly calling it with other values.  This can happen
if there is another data object linked to the display that
include values of the third RealType in your tuple3d greater
than 96.0, or less than 0.0.

Just to test this, I modified visad/examples/Test61.java
as follows:

    // int NX = 32;
    // int NY = 32;
    // int NZ = 32;
    // Integer3DSet set = new Integer3DSet(NX, NY, NZ);
    int NX = 64;
    int NY = 64;
    int NZ = 16;
    Linear3DSet set
      new Linear3DSet(earth_location3d, 0, 256, 64,
                                        0, 256, 64,
                                        0, 96, 16);

The volume loked fine (although the embedded texture map
was small, as expected with the expanded X and Y rages).

Please ignore the previous answer (nice try, but no cigar).

Cheers,
Bill
----------------------------------------------------------
Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738
http://www.ssec.wisc.edu/~billh/vis.html


On Mon, 15 Nov 1999, Brad Buchsbaum wrote:

> Hi,
> 
> I just started with VisAd and am trying to display a volume rendered image.  
> I have
> a stack of 16 images with dimensions (64,64,16) and voxel dimensions of 
> (4,4,6).  So
> I create a Linear3DSet like so:
> 
> Linear3Dset set = new Linear3DSet(tuple3d, 0, 256, 64,
>                                                                  0, 256, 64,
>                                                                  0, 96, 16);
> 
> However, the rendered image is not properly scaled in the z-plane.  The range 
> of the z axis
> goes from 1 to 96, as expected, but the actual image only takes up about 1/5 
> of that area.
> So what I get is a very smushed looking object (brain) in one dimension.  
> 
> Any help would be appreciated.
> 
> I'm on Windows Me and am using Java3D 1.2 (DirectX).
> 
> 
> Brad Buchsbaum
> 
>             
> 
>