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.ObjectTexture mapped image volume displayed in the surface renderer. .- See Also:
ViewJFrameSurfaceRenderer
-
-
Field Summary
Fields Modifier and Type Field Description private floatalphaBlendAlphaBlending values for compositing two images.private floatalphaPrimeAlphaBlending values for compositing two images.private RenderViewBaseframeFrame where the component image is displayed.private ModelImageimageAModel for image A.private ModelImageimageActiveModel for active image.private ModelImageimageBModel for image A.private float[]imageBufferABuffer holding image data for image A.private float[]imageBufferA_GMBuffer holding image data for imageA GM.private float[]imageBufferActiveBuffer holding image data for active image.private float[]imageBufferBBuffer holding image data for image B.private float[]imageBufferB_GMBuffer holding image data for imageB GM.private int[]imageExtentsExtents of the 3D image.private ModelLUTLUTaLookup table for image A.private ModelLUTLUTbLookup table for image A.private int[]m_aiCompositeImageABuffer for holding volume texture composite values for image A.private javax.vecmath.Vector3f[]m_akNormalsImageABuffer for holding the most recently computed normal vectors of image A.private int[]paintBufferPaint buffer.private ModelRGBRGBTARGB table for image A.private ModelRGBRGBTBRGB table for image B.private VolumeTexturetextureTexture mapped image.private inttimeSliceCurrent 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 voiddisposeLocal()Sets all variables to null, disposes, and garbage collects.protected voidfinalize()Calls garbage collector to release system resources.ModelImagegetActiveImage()Accessor that returns the active image.float[]getActiveImageBuffer()Accessor that returns the active image buffer.floatgetAlphaBlend()Accessor that returns the alphablend of the two image.int[]getCompositeImageA()Access to retrieve the array ARGB composite 3D texture values for image A.RenderViewBasegetFrame()Accessor that returns the frame holding this component.ModelImagegetImageA()Accessor that returns the image A.ModelImagegetImageB()Accessor that returns the image B.ModelLUTgetLUTa()Accessor that returns the model lut for the image A.ModelLUTgetLUTb()Accessor that returns the model lut for the image B.ModelRGBgetRGBTA()Accessor that returns the RGB table for image A.ModelRGBgetRGBTB()Accessor that returns the RGB table for image B.voidsetBuffers(float[] imgBufferA, float[] imgBufferB)Sets the buffers for the actual data, the displayable image, and the paint.voidsetImageA(ModelImage image)Sets component's Image A.voidsetImageB(ModelImage image)Sets component's Image B.voidsetImageBufferB(float[] buffer)Sets component's Image B data buffer.voidsetLUTa(ModelLUT LUT)Accessor that sets the model lut for the image A.voidsetLUTb(ModelLUT LUT)Accessor that sets the model lut for the image B.voidsetRGBTA(ModelRGB RGBT)Sets the RGB table for ARGB image A.voidsetRGBTB(ModelRGB RGBT)Sets the RGB table for ARGB image B.booleanshow(int tSlice, boolean forceShow)For generating the display of 1 or 2 RGB images.booleanshow(int tSlice, ModelLUT _LUTa, ModelLUT _LUTb, boolean forceShow)Shows the gray scale image(s).private booleanshowAB(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.ThrowableCalls garbage collector to release system resources.- Overrides:
finalizein classjava.lang.Object- Throws:
java.lang.Throwable- DOCUMENT ME!
-
-