Class ShearWarpColorLighting

  • All Implemented Interfaces:
    RendererInterfaceColor

    public class ShearWarpColorLighting
    extends ShearWarpColor
    A renderer for RGBA+lighting volume data. See the document ShearWarpRendering.pdf for a detailed description of the renderer architecture.
    • Field Detail

      • m_bCompositeForward

        protected boolean m_bCompositeForward
        The actual order of compositing - true if front-to-back.
      • m_iPermute

        protected int m_iPermute
        the current permutation of the voxel indices (0, 1, or 2).
    • Constructor Detail

      • ShearWarpColorLighting

        public ShearWarpColorLighting​(ModelImage kImage,
                                      int iFinalBound,
                                      int[] aiFinal)
        Create an RGBA+lighting color renderer. The input color channel type is 'byte', a signed 8-bit quantity, but the data represents unsigned 8-bit values.
        Parameters:
        kImage - the 3D image
        iFinalBound - the dimension of the square 2D renderer image
        aiFinal - The 2D rendered image. The image is 24-bit RGB color, each pixel stored as a 32-bit integer. The 8 most significant bits are ignored. The blue channel is stored in the 8 least significant bits. The green channel is in the next 8 bits adjacent to the blue bits. The red channel is in the next 8 bits adjacent to the green channel.
    • Method Detail

      • usesNormals

        public boolean usesNormals()
        Return indication as to whether or not the particular renderer uses normal vectors as part of its implementation.
        Specified by:
        usesNormals in class Renderer
        Returns:
        boolean True if the implementation uses normals.
      • beforeResampleAll

        protected void beforeResampleAll​(int k0,
                                         int k1,
                                         int k2)
        This is a callback to be executed before resampleAll is executed. The base class initializes various primitive quantities. This class sets the current eye position to always be in front of the box along the current renderer view direction. This function also saves the current permutation for use in computing voxel positions for dynamic lighting.
        Overrides:
        beforeResampleAll in class ShearWarpRenderer
        Parameters:
        k0 - a permutation, one of (0,1,2), (1,2,0), (2,0,1)
        k1 - DOCUMENT ME!
        k2 - DOCUMENT ME!
      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Calls dispose.
        Overrides:
        finalize in class ShearWarpColor
        Throws:
        java.lang.Throwable - DOCUMENT ME!
      • resampleAll

        protected void resampleAll​(int iDS)
        Resample all the slices for the current permuted volume data.
        Overrides:
        resampleAll in class ShearWarpColor
        Parameters:
        iDS - The number of slices to increment during the resampling phase. The value should be one or larger. If one, all slices of the volume data are resampled. If two, only every other slice is resampled. An input larger than one is used to allow fast rendering during rotation of the volume data. Once the rotation terminates, a composite with input of one should be called.
      • resampleSingle

        protected void resampleSingle()
        Resample a single slice of the permuted volume data.
        Overrides:
        resampleSingle in class ShearWarpRenderer
      • traceInit

        protected void traceInit()
        Called at the beginning of the trace methods.
        Overrides:
        traceInit in class Renderer