Class RayCastIntensityMIP

  • All Implemented Interfaces:
    RendererInterfaceIntensity

    public class RayCastIntensityMIP
    extends RayCastIntensity
    A sample ray tracer that extends RayTrace. The only two necessary member functions are a constructor and an override of 'processRay'. This sample shows how to change the color of the trace whenever a ray intersects a region bounded by a level surface of a specified yellow. In this sample, the color is changed to a yellow hue.
    • Constructor Detail

      • RayCastIntensityMIP

        public RayCastIntensityMIP​(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

      • 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.
      • processRay

        protected final 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 final 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!
      • processRaySlower

        protected void processRaySlower​(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.
        Parameters:
        iIndex - index of the pixel corresponding to the processed ray
        rayTraceStepSize - DOCUMENT ME!