Class RayCastColorMIP

  • All Implemented Interfaces:
    RendererInterfaceColor

    public class RayCastColorMIP
    extends RayCastColor
    Maximum intensity projection volume rendering for color-based volumes.
    • Field Detail

      • m_acImageI

        protected byte[] m_acImageI
        intensity channel computed for combination of RGB channels.
    • Constructor Detail

      • RayCastColorMIP

        public RayCastColorMIP​(ModelImage kImage,
                               int iRBound,
                               int[] aiRImage)
        The constructor for the ray tracer. Currently, the only client of this class is VolumeRenderer.
        Parameters:
        kImage - the 3D image
        iRBound - the dimension of the square 2D renderer image
        aiRImage - The rendered image data stored in row-major order. Each integer pixel represents an RGB color in the format B | (G
    • Method Detail

      • dispose

        public void dispose()
        Clean memory.
      • setInput

        public void setInput​(byte[] acImageR,
                             byte[] acImageG,
                             byte[] acImageB,
                             byte[] acImageA)
        Specify the input volume to use for rendering. The image data stored in order of slice indices, each slice stored in row-major order. That is, slice z=0 is stored first, slice z=1 is stored next, and so on. In slice z=0, the y=0 row is stored first, the y=1 row is stored next, and so on.
        Specified by:
        setInput in interface RendererInterfaceColor
        Overrides:
        setInput in class RayCastColor
        Parameters:
        acImageR - byte[] Array of byte red values for volume.
        acImageG - byte[] Array of byte green values for volume.
        acImageB - byte[] Array of byte blue values for volume.
        acImageA - byte[] Array of byte alpha values for volume.
      • 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.
      • finalize

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

        protected void processRay​(javax.vecmath.Point3f p0,
                                  javax.vecmath.Point3f p1,
                                  int iIndex,
                                  int rayTraceStepSize)
        Process a ray that has intersected the oriented bounding box of the 3D image. The method is only called if there is a line segment of intersection. The 'intersectsBox' stores the end points of the line segment in the class members P0 and P1 in image coordinates. P0 and P1 are used in the multi-thread rendering.
        Specified by:
        processRay in class RayCastRenderer
        Parameters:
        p0 - ray trace starting point
        p1 - ray trace stopping point
        iIndex - index of the pixel corresponding to the processed ray
        rayTraceStepSize - DOCUMENT ME!
      • processRay

        protected void processRay​(int iIndex,
                                  int rayTraceStepSize)
        Process a ray that has intersected the oriented bounding box of the 3D image. The method is only called if there is a line segment of intersection. The 'intersectsBox' stores the end points of the line segment in the class members m_kP0 and m_kP1 in image coordinates.
        Specified by:
        processRay in class RayCastRenderer
        Parameters:
        iIndex - index of the pixel corresponding to the processed ray
        rayTraceStepSize - DOCUMENT ME!
      • traceInit

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