Class RendererImageData
java.lang.Object
gov.nih.mipav.view.renderer.J3D.volumeview.RendererImageData
Storage of values for a 3D volume used by the volume renderers.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate byte[]DOCUMENT ME!private byte[]DOCUMENT ME!private byte[]DOCUMENT ME!private byte[]DOCUMENT ME!private float[]DOCUMENT ME!private final intDimensions of the volume.private final intDOCUMENT ME!private final intDOCUMENT ME!private final intDOCUMENT ME!private ModelImageDOCUMENT ME!private ModelSimpleImageDOCUMENT ME!private ModelRGBRGB intensity map for color images only.private ModelRGBRGB opacity map for color images only.private static final javax.vecmath.Vector3fDOCUMENT ME! -
Constructor Summary
ConstructorsConstructorDescriptionRendererImageData(ModelImage kImage) Constructor to setup renderer image data associated with specified 3D volume. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcomputeImageBytes(float[] afData, ModelRGB kIntensityRGB, RendererMapColor kMapColorToIntensity, JPanelVolumeOpacity volOpacityObj) private voidcomputeImageBytes(float[] afData, ModelRGB kIntensityRGB, RendererMapColor kMapColorToIntensity, JPanelVolOpacityRGB volOpacityObj) Deprecated.private voidcomputeImageBytes(float[] afData, TransferFunction transferFunction) Given an intensity volume and opacity map, fill in the byte and alpha values for each voxel.private voidcomputeImageBytes(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.private javax.vecmath.Vector3f[]createImageNormals(float[] afData) Create array of normal vectors corresponding to the voxels in the volume.voidClean up memory.protected voidfinalize()Calls dispose.private voidmodulateAlphaImageBytes(float[] afData, TransferFunction transferFunction) Given a single value volume and opacity map, modulate the alpha channel values for each value.private voidmodulateAlphaImageBytes(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.booleanupdateRenderer(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.booleanupdateRenderer(Renderer kRayTracer, ModelRGB kIntensityRGB, JPanelVolumeOpacity volOpacityObj, int iTimeSlice, boolean bUpdatedTimeSlice, boolean bForceShow) booleanupdateRenderer(Renderer kRayTracer, ModelRGB kIntensityRGB, JPanelVolOpacityRGB volOpacityObj, int iTimeSlice, boolean bUpdatedTimeSlice, boolean bForceShow) Deprecated.
-
Field Details
-
m_kZeroVector
private static final javax.vecmath.Vector3f m_kZeroVectorDOCUMENT ME! -
m_acImageA
private byte[] m_acImageADOCUMENT ME! -
m_acImageB
private byte[] m_acImageBDOCUMENT ME! -
m_acImageG
private byte[] m_acImageGDOCUMENT ME! -
m_acImageR
private byte[] m_acImageRDOCUMENT ME! -
m_afData
private float[] m_afDataDOCUMENT ME! -
m_iNumVoxels
private final int m_iNumVoxelsDimensions of the volume. -
m_iSizeX
private final int m_iSizeXDOCUMENT ME! -
m_iSizeY
private final int m_iSizeYDOCUMENT ME! -
m_iSizeZ
private final int m_iSizeZDOCUMENT ME! -
m_kImage
DOCUMENT ME! -
m_kImageGradMag
DOCUMENT ME! -
m_kIntensityRGB
RGB intensity map for color images only. -
m_kOpacityRGB
RGB opacity map for color images only.
-
-
Constructor Details
-
RendererImageData
Constructor to setup renderer image data associated with specified 3D volume.- Parameters:
kImage- ModelImage Input volume.
-
-
Method Details
-
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 definitionkOpacityGradMag- 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:
-
updateRenderer
public boolean updateRenderer(Renderer kRayTracer, ModelRGB kIntensityRGB, JPanelVolumeOpacity volOpacityObj, int iTimeSlice, boolean bUpdatedTimeSlice, boolean bForceShow) -
finalize
Calls dispose. -
computeImageBytes
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:
-
computeImageBytes
private void computeImageBytes(float[] afData, ModelRGB kIntensityRGB, RendererMapColor kMapColorToIntensity, JPanelVolumeOpacity volOpacityObj) -
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
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.
-