VolumeJ
Class VJCutout

java.lang.Object
  |
  +--VolumeJ.VJCutout

public class VJCutout
extends java.lang.Object

VJCutout. Implements cutouts: slice views in a volume rendering. Copyright (c) 1999-2002, Michael Abramoff. All rights reserved.


Constructor Summary
VJCutout(Volume v, int xcutout, int ycutout, int zcutout, VJInterpolator interpolator, VJShader shader, VJClassifier classifier)
           
 
Method Summary
 void cutout(VJAlphaColor ac, int i, int j, int k)
          This routine decides whether to show a cutout slice or a rendered surface at pixel i,j.
 void setup(VJMatrix m, VJMatrix mi)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VJCutout

public VJCutout(Volume v,
                int xcutout,
                int ycutout,
                int zcutout,
                VJInterpolator interpolator,
                VJShader shader,
                VJClassifier classifier)
Method Detail

setup

public void setup(VJMatrix m,
                  VJMatrix mi)

cutout

public void cutout(VJAlphaColor ac,
                   int i,
                   int j,
                   int k)
This routine decides whether to show a cutout slice or a rendered surface at pixel i,j. The routine is as follows: Check whether ac contains a surface near vl (the opacity of ac > 0.5). If there is a surface at or near vl, the 3 intersections of the ray from i,j into the volume with the x,y,z cutout-planes are determined. -the surface is rendered if the closest intersection is beyond the crossing of the cutout planes (as seen from the viewplane), or if the the ray is parallel to any of the planes. -the value at the intersection is interpolated, classified and composed if the closest intersection is on this side of the crossing. You can optimize this by only calculating the intersection if ijk is closer to the viewplane than the crossing of the cutout planes.