Class RendererImageData


  • public class RendererImageData
    extends java.lang.Object
    Storage of values for a 3D volume used by the volume renderers.
    • Field Detail

      • m_kZeroVector

        private static final javax.vecmath.Vector3f m_kZeroVector
        DOCUMENT ME!
      • m_acImageA

        private byte[] m_acImageA
        DOCUMENT ME!
      • m_acImageB

        private byte[] m_acImageB
        DOCUMENT ME!
      • m_acImageG

        private byte[] m_acImageG
        DOCUMENT ME!
      • m_acImageR

        private byte[] m_acImageR
        DOCUMENT ME!
      • m_afData

        private float[] m_afData
        DOCUMENT ME!
      • m_iNumVoxels

        private final int m_iNumVoxels
        Dimensions of the volume.
      • m_iSizeX

        private final int m_iSizeX
        DOCUMENT ME!
      • m_iSizeY

        private final int m_iSizeY
        DOCUMENT ME!
      • m_iSizeZ

        private final int m_iSizeZ
        DOCUMENT ME!
      • m_kImage

        private ModelImage m_kImage
        DOCUMENT ME!
      • m_kIntensityRGB

        private ModelRGB m_kIntensityRGB
        RGB intensity map for color images only.
      • m_kOpacityRGB

        private ModelRGB m_kOpacityRGB
        RGB opacity map for color images only.
    • Constructor Detail

      • RendererImageData

        public RendererImageData​(ModelImage kImage)
        Constructor to setup renderer image data associated with specified 3D volume.
        Parameters:
        kImage - ModelImage Input volume.
    • Method Detail

      • disposeLocal

        public void disposeLocal()
        Clean up memory.
      • updateRenderer

        public boolean updateRenderer​(Renderer kRayTracer,
                                      ModelLUT kLUT,
                                      TransferFunction transferFunction,
                                      ViewJComponentVolOpacity kOpacityGradMag,
                                      int iTimeSlice,
                                      boolean bUpdatedTimeSlice,
                                      boolean bUpdatedLut,
                                      boolean bForceShow)
        Update the data for the intensity-based color mapped image.
        Parameters:
        kRayTracer - Renderer Used to renderer the ray traced image.
        kLUT - ModelLUT Input color map definition.
        transferFunction - int[] Input intensity opacity map definition
        kOpacityGradMag - ViewJComponentVolOpacity Input gradient magnitude opacity map (optional by specifying a null reference).
        iTimeSlice - int Current time slice of data in the volume.
        bUpdatedTimeSlice - boolean Flag set if time slice is different.
        bUpdatedLut - boolean Flag set if color map definition is different.
        bForceShow - boolean Flag set if the color mapping must be performed even if nothing else changed.
        Returns:
        boolean True if renderer is up-to-date; false if an error occurred.
      • updateRenderer

        public boolean updateRenderer​(Renderer kRayTracer,
                                      ModelRGB kIntensityRGB,
                                      JPanelVolOpacityRGB volOpacityObj,
                                      int iTimeSlice,
                                      boolean bUpdatedTimeSlice,
                                      boolean bForceShow)
        Deprecated.
        Update the data for the ARGB color image.
        Parameters:
        kRayTracer - Renderer Used to renderer the ray traced image.
        kIntensityRGB - ModelRGB Input transfer function for each RGB channel.
        volOpacityObj - image opacity histogram reference.
        iTimeSlice - int Current time slice of data in the volume.
        bUpdatedTimeSlice - boolean Flag set if time slice is different.
        bForceShow - boolean Flag set if the color mapping must be performed even if nothing else changed.
        Returns:
        boolean True if renderer is up-to-date; false if an error occurred.
        See Also:
        JPanelVolumeOpacity
      • updateRenderer

        public boolean updateRenderer​(Renderer kRayTracer,
                                      ModelRGB kIntensityRGB,
                                      JPanelVolumeOpacity volOpacityObj,
                                      int iTimeSlice,
                                      boolean bUpdatedTimeSlice,
                                      boolean bForceShow)
      • finalize

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

        private void computeImageBytes​(float[] afData,
                                       TransferFunction transferFunction)
        Given an intensity volume and opacity map, fill in the byte and alpha values for each voxel.
        Parameters:
        afData - float[] Input array of voxel intensity values.
        transferFunction - int[] Input opacity map to apply to values.
      • computeImageBytes

        private void computeImageBytes​(float[] afData,
                                       TransferFunction transferFunction,
                                       ModelLUT kModelLut)
        Given an intensity volume, opacity map, and color map, fill in the byte red, green, blue, and alpha values for each voxel.
        Parameters:
        afData - float[] Input array of voxel intensity values.
        transferFunction - int[] Input opacity map to apply to values.
        kModelLut - ModelLUT Input color map to apply to values.
      • computeImageBytes

        private void computeImageBytes​(float[] afData,
                                       ModelRGB kIntensityRGB,
                                       RendererMapColor kMapColorToIntensity,
                                       JPanelVolOpacityRGB volOpacityObj)
        Deprecated.
        Given an RGB volume, a map from RGB to intensity, and an opacity map, fill in the RGB byte and alpha values for each voxel.
        Parameters:
        afData - float[] Input array of voxel ARGB channel values interleaved.
        kIntensityRGB - ModelRGB Input transfer function for each RGB channel.
        kMapColorToIntensity - RendererMapColor Map to convert RGB channel valeus to intensity.
        volOpacityObj - opacity map to apply to values.
        See Also:
        JPanelVolumeOpacity
      • createImageNormals

        private javax.vecmath.Vector3f[] createImageNormals​(float[] afData)
        Create array of normal vectors corresponding to the voxels in the volume. The normal vector is computed based on the gradient of the volume intensity values.
        Parameters:
        afData - float[] Input array of voxel values.
        Returns:
        DOCUMENT ME!
      • modulateAlphaImageBytes

        private void modulateAlphaImageBytes​(float[] afData,
                                             TransferFunction transferFunction)
        Given a single value volume and opacity map, modulate the alpha channel values for each value.
        Parameters:
        afData - float[] Input array of voxel values.
        transferFunction - int[] Input opacity map to apply to values.
      • modulateAlphaImageBytes

        private void modulateAlphaImageBytes​(float[] afData,
                                             RendererMapColor kMapColorToIntensity,
                                             ModelRGB kOpacityRGB)
        Given an RGB value volume and opacity map for each channel, modulate the alpha channel values for each value.
        Parameters:
        afData - float[] Input array of voxel values.
        kMapColorToIntensity - RendererMapColor Map to convert RGB channel valeus to intensity.
        kOpacityRGB - ModelRGB Input opacity map to apply to values.