Package gov.nih.mipav.view.renderer.J3D
Class ViewJComponentSurfaceVolume
- java.lang.Object
-
- gov.nih.mipav.view.renderer.J3D.ViewJComponentSurfaceVolume
-
public class ViewJComponentSurfaceVolume extends java.lang.Object
Texture mapped image volume displayed in the surface renderer. .- See Also:
ViewJFrameSurfaceRenderer
-
-
Field Summary
Fields Modifier and Type Field Description private float
alphaBlend
AlphaBlending values for compositing two images.private float
alphaPrime
AlphaBlending values for compositing two images.private RenderViewBase
frame
Frame where the component image is displayed.private ModelImage
imageA
Model for image A.private ModelImage
imageActive
Model for active image.private ModelImage
imageB
Model for image A.private float[]
imageBufferA
Buffer holding image data for image A.private float[]
imageBufferA_GM
Buffer holding image data for imageA GM.private float[]
imageBufferActive
Buffer holding image data for active image.private float[]
imageBufferB
Buffer holding image data for image B.private float[]
imageBufferB_GM
Buffer holding image data for imageB GM.private int[]
imageExtents
Extents of the 3D image.private ModelLUT
LUTa
Lookup table for image A.private ModelLUT
LUTb
Lookup table for image A.private int[]
m_aiCompositeImageA
Buffer for holding volume texture composite values for image A.private javax.vecmath.Vector3f[]
m_akNormalsImageA
Buffer for holding the most recently computed normal vectors of image A.private int[]
paintBuffer
Paint buffer.private ModelRGB
RGBTA
RGB table for image A.private ModelRGB
RGBTB
RGB table for image B.private VolumeTexture
texture
Texture mapped image.private int
timeSlice
Current time slice being displayed.
-
Constructor Summary
Constructors Constructor Description ViewJComponentSurfaceVolume(RenderViewBase _frame, ModelImage _imageA, ModelLUT _LUTa, float[] imgBufferA, ModelImage _imageB, ModelLUT _LUTb, float[] imgBufferB, VolumeTexture volTexture, int[] extents)
Constructs new component image plane with the appropriate arrays.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
disposeLocal()
Sets all variables to null, disposes, and garbage collects.protected void
finalize()
Calls garbage collector to release system resources.ModelImage
getActiveImage()
Accessor that returns the active image.float[]
getActiveImageBuffer()
Accessor that returns the active image buffer.float
getAlphaBlend()
Accessor that returns the alphablend of the two image.int[]
getCompositeImageA()
Access to retrieve the array ARGB composite 3D texture values for image A.RenderViewBase
getFrame()
Accessor that returns the frame holding this component.ModelImage
getImageA()
Accessor that returns the image A.ModelImage
getImageB()
Accessor that returns the image B.ModelLUT
getLUTa()
Accessor that returns the model lut for the image A.ModelLUT
getLUTb()
Accessor that returns the model lut for the image B.ModelRGB
getRGBTA()
Accessor that returns the RGB table for image A.ModelRGB
getRGBTB()
Accessor that returns the RGB table for image B.void
setBuffers(float[] imgBufferA, float[] imgBufferB)
Sets the buffers for the actual data, the displayable image, and the paint.void
setImageA(ModelImage image)
Sets component's Image A.void
setImageB(ModelImage image)
Sets component's Image B.void
setImageBufferB(float[] buffer)
Sets component's Image B data buffer.void
setLUTa(ModelLUT LUT)
Accessor that sets the model lut for the image A.void
setLUTb(ModelLUT LUT)
Accessor that sets the model lut for the image B.void
setRGBTA(ModelRGB RGBT)
Sets the RGB table for ARGB image A.void
setRGBTB(ModelRGB RGBT)
Sets the RGB table for ARGB image B.boolean
show(int tSlice, boolean forceShow)
For generating the display of 1 or 2 RGB images.boolean
show(int tSlice, ModelLUT _LUTa, ModelLUT _LUTb, boolean forceShow)
Shows the gray scale image(s).private boolean
showAB(int tSlice, ModelLUT _LUTa, ModelLUT _LUTb, boolean forceShow)
-
-
-
Field Detail
-
alphaBlend
private float alphaBlend
AlphaBlending values for compositing two images.
-
alphaPrime
private float alphaPrime
AlphaBlending values for compositing two images.
-
frame
private RenderViewBase frame
Frame where the component image is displayed.
-
imageA
private ModelImage imageA
Model for image A.
-
imageActive
private ModelImage imageActive
Model for active image.
-
imageB
private ModelImage imageB
Model for image A.
-
imageBufferA
private float[] imageBufferA
Buffer holding image data for image A.
-
imageBufferA_GM
private float[] imageBufferA_GM
Buffer holding image data for imageA GM.
-
imageBufferActive
private float[] imageBufferActive
Buffer holding image data for active image.
-
imageBufferB
private float[] imageBufferB
Buffer holding image data for image B.
-
imageBufferB_GM
private float[] imageBufferB_GM
Buffer holding image data for imageB GM.
-
imageExtents
private int[] imageExtents
Extents of the 3D image.
-
LUTa
private ModelLUT LUTa
Lookup table for image A.
-
LUTb
private ModelLUT LUTb
Lookup table for image A.
-
m_aiCompositeImageA
private int[] m_aiCompositeImageA
Buffer for holding volume texture composite values for image A.
-
m_akNormalsImageA
private javax.vecmath.Vector3f[] m_akNormalsImageA
Buffer for holding the most recently computed normal vectors of image A.
-
paintBuffer
private int[] paintBuffer
Paint buffer.
-
RGBTA
private ModelRGB RGBTA
RGB table for image A.
-
RGBTB
private ModelRGB RGBTB
RGB table for image B.
-
texture
private VolumeTexture texture
Texture mapped image.
-
timeSlice
private int timeSlice
Current time slice being displayed.
-
-
Constructor Detail
-
ViewJComponentSurfaceVolume
public ViewJComponentSurfaceVolume(RenderViewBase _frame, ModelImage _imageA, ModelLUT _LUTa, float[] imgBufferA, ModelImage _imageB, ModelLUT _LUTb, float[] imgBufferB, VolumeTexture volTexture, int[] extents)
Constructs new component image plane with the appropriate arrays.- Parameters:
_frame
- Frame where image(s) will be displayed._imageA
- Model of the image that will be displayed._LUTa
- LUT used to display imageA.imgBufferA
- Storage buffer used to display image A._imageB
- Model of the image that will be displayed._LUTb
- LUT used to display imageB.imgBufferB
- Storage buffer used to display image B.volTexture
- Storage buffer used to build a displayable texture mapped image.extents
- Initial display dimensions of the image.
-
-
Method Detail
-
disposeLocal
public void disposeLocal()
Sets all variables to null, disposes, and garbage collects.
-
getActiveImage
public ModelImage getActiveImage()
Accessor that returns the active image.- Returns:
- The active image.
-
getActiveImageBuffer
public float[] getActiveImageBuffer()
Accessor that returns the active image buffer.- Returns:
- The active image buffer
-
getAlphaBlend
public float getAlphaBlend()
Accessor that returns the alphablend of the two image.- Returns:
- Opacity of paint.
-
getCompositeImageA
public int[] getCompositeImageA()
Access to retrieve the array ARGB composite 3D texture values for image A. This is a copy of those values currently stored in the 3D texture.- Returns:
- int[] Array of ARGB composite 3D texture values for image A.
-
getFrame
public RenderViewBase getFrame()
Accessor that returns the frame holding this component.- Returns:
- The frame.
-
getImageA
public ModelImage getImageA()
Accessor that returns the image A.- Returns:
- Image A.
-
getImageB
public ModelImage getImageB()
Accessor that returns the image B.- Returns:
- Image B.
-
getLUTa
public ModelLUT getLUTa()
Accessor that returns the model lut for the image A.- Returns:
- The model LUT for image A.
-
getLUTb
public ModelLUT getLUTb()
Accessor that returns the model lut for the image B.- Returns:
- The model LUT for image B.
-
getRGBTA
public ModelRGB getRGBTA()
Accessor that returns the RGB table for image A.- Returns:
- The RGB table.
-
getRGBTB
public ModelRGB getRGBTB()
Accessor that returns the RGB table for image B.- Returns:
- The RGB table.
-
setBuffers
public void setBuffers(float[] imgBufferA, float[] imgBufferB)
Sets the buffers for the actual data, the displayable image, and the paint.- Parameters:
imgBufferA
- Storage buffer used to display image A.imgBufferB
- Storage buffer used to display image B.
-
setImageA
public void setImageA(ModelImage image)
Sets component's Image A.- Parameters:
image
- The component's image A.
-
setImageB
public void setImageB(ModelImage image)
Sets component's Image B.- Parameters:
image
- The component's image B.
-
setImageBufferB
public void setImageBufferB(float[] buffer)
Sets component's Image B data buffer.- Parameters:
buffer
- The component's image B data buffer.
-
setLUTa
public void setLUTa(ModelLUT LUT)
Accessor that sets the model lut for the image A.- Parameters:
LUT
- The model LUT for image A.
-
setLUTb
public void setLUTb(ModelLUT LUT)
Accessor that sets the model lut for the image B.- Parameters:
LUT
- The model LUT for image B.
-
setRGBTA
public void setRGBTA(ModelRGB RGBT)
Sets the RGB table for ARGB image A.- Parameters:
RGBT
- RGB table.
-
setRGBTB
public void setRGBTB(ModelRGB RGBT)
Sets the RGB table for ARGB image B.- Parameters:
RGBT
- RGB table.
-
show
public boolean show(int tSlice, boolean forceShow)
For generating the display of 1 or 2 RGB images.- Parameters:
tSlice
- t (time) slice to show.forceShow
- Forces this method to import image and recalculate java image.- Returns:
- Confirms if the show was successful.
-
show
public boolean show(int tSlice, ModelLUT _LUTa, ModelLUT _LUTb, boolean forceShow)
Shows the gray scale image(s).- Parameters:
tSlice
- t (time) slice to show_LUTa
- LUTa - to change to new LUT for imageA else null._LUTb
- LUTb - to change to new LUT for imageB else null.forceShow
- Forces this method to import image and recalculate java image.- Returns:
- Confirms if the show was successful.
-
finalize
protected void finalize() throws java.lang.Throwable
Calls garbage collector to release system resources.- Overrides:
finalize
in classjava.lang.Object
- Throws:
java.lang.Throwable
- DOCUMENT ME!
-
-