Package gov.nih.mipav.view.renderer.J3D
Class ViewJComponentTriSliceImage
java.lang.Object
gov.nih.mipav.view.renderer.J3D.ViewJComponentTriSliceImage
Image plane displayed in the surface renderer. The image plane is
initialized with one of the following orientations: FileInfoBase.AXIAL,
FileInfoBase.CORONAL, FileInfoBase.SAGITTAL.
ViewJComponentTriSliceImage contains oriented 2D slices of the ModelImage
data, reconfigured to the axial, sagittal, and coronal coordinates. It
passes the oriented 2D ModelImage slice buffer to the SurfaceRender object
where it is used as a Texture2D object on a texture-mapped polygon.
- Version:
- 0.1 Nov 18, 1997
- Author:
- Matthew J. McAuliffe, Ph.D. (primary)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate floatAlphaBlending values for compositing two images.private SurfaceRenderFrame where the component image is displayed.private ModelImageModel for image A.private ModelImageModel for active image.private ModelImageModel for image A.private BufferedImageBufferedImage to hold the slice image.private int[]Extents of the 3D image.private PatientSlicePatientSlice contains all the Patient Coordinate System view-specific data for rendering this component:private intOrientation of this component image. -
Constructor Summary
ConstructorsConstructorDescriptionViewJComponentTriSliceImage(SurfaceRender _frame, ModelImage _imageA, ModelImage _imageB, int _orientation) Constructs new component image plane with the appropriate arrays. -
Method Summary
Modifier and TypeMethodDescriptionvoidSets all variables to null, disposes, and garbage collects.protected voidfinalize()Calls garbage collector to release system resources.floatAccessor that returns the alphablend of the two image.booleanReturns whether the slice is axis-aligned or rotated.getImage()Get the buffered image.Accessor that returns the image A.Accessor that returns the image B.intAccessor that returns the component's orientation either FileInfoBase.AXIAL, FileInfoBase.CORONAL, FileInfoBase.SAGITTAL, or FileInfoBase.UNKNOWN_ORIENTvoidInterpolate(boolean bSample) When set to true, the m_kPatientSlice.showDiagonal function does tri-linear interpolation of the ModelImage data:voidsetAlphaBlend(int value) Sets the alpha blending of parameter for two image displaying.voidsetBuffers(float[] imgBufferA, float[] imgBufferB) Sets the buffers for the actual data, the displayable image, and the paint.voidsetCenter(int i, int j, int k) setCenter sets the PatientSlice center: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.voidAccessor that sets the model lut for the image A.voidAccessor that sets the model lut for the image B.voidsetOrientation(int _orientation) Accessor that sets the orientation of the component either FileInfoBase.AXIAL, FileInfoBase.CORONAL, FileInfoBase.SAGITTAL, or FileInfoBase.UNKNOWN_ORIENTvoidSets the RGB table for ARGB image A.voidSets the RGB table for ARGB image B.voidsetSlice(int _slice) Accessor that sets the slice of the image component.booleanshow(int tSlice, int zSlice, ModelLUT _LUTa, ModelLUT _LUTb, boolean forceShow, javax.vecmath.Vector3f[] akVertices) Shows the image.
-
Field Details
-
alphaBlend
private float alphaBlendAlphaBlending values for compositing two images. -
frame
Frame where the component image is displayed. -
imageA
Model for image A. -
imageActive
Model for active image. -
imageB
Model for image A. -
localImageExtents
private int[] localImageExtentsExtents of the 3D image. -
img
BufferedImage to hold the slice image. -
orientation
private int orientationOrientation of this component image. -
m_kPatientSlice
PatientSlice contains all the Patient Coordinate System view-specific data for rendering this component:
-
-
Constructor Details
-
ViewJComponentTriSliceImage
public ViewJComponentTriSliceImage(SurfaceRender _frame, ModelImage _imageA, ModelImage _imageB, int _orientation) Constructs new component image plane with the appropriate arrays.- Parameters:
_frame- The SurfaceRender parent frame_imageA- Model of the image that will be displayed._imageB- Model of the image that will be displayed._orientation- Orientation of the image.
-
-
Method Details
-
disposeLocal
public void disposeLocal()Sets all variables to null, disposes, and garbage collects. -
getAlphaBlend
public float getAlphaBlend()Accessor that returns the alphablend of the two image.- Returns:
- Opacity of paint.
-
getImage
Get the buffered image.- Returns:
- BufferedImage Buffered image.
-
getImageA
Accessor that returns the image A.- Returns:
- Image A.
-
getImageB
Accessor that returns the image B.- Returns:
- Image B.
-
getOrientation
public int getOrientation()Accessor that returns the component's orientation either FileInfoBase.AXIAL, FileInfoBase.CORONAL, FileInfoBase.SAGITTAL, or FileInfoBase.UNKNOWN_ORIENT- Returns:
- Image orientation (AXIAL, CORONAL, SAGITTAL)
-
Interpolate
public void Interpolate(boolean bSample) When set to true, the m_kPatientSlice.showDiagonal function does tri-linear interpolation of the ModelImage data:- Parameters:
bSample- when true interpolate the ModelImage data
-
setAlphaBlend
public void setAlphaBlend(int value) Sets the alpha blending of parameter for two image displaying.- Parameters:
value- Amount [0,100] that is the percentage of Image A to be displayed.
-
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
Sets component's Image A.- Parameters:
image- The component's image A.
-
setImageB
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
Accessor that sets the model lut for the image A.- Parameters:
LUT- The model LUT for image A.
-
setLUTb
Accessor that sets the model lut for the image B.- Parameters:
LUT- The model LUT for image B.
-
setOrientation
public void setOrientation(int _orientation) Accessor that sets the orientation of the component either FileInfoBase.AXIAL, FileInfoBase.CORONAL, FileInfoBase.SAGITTAL, or FileInfoBase.UNKNOWN_ORIENT- Parameters:
_orientation- Orientaiton of image slice to be displayed.
-
setRGBTA
Sets the RGB table for ARGB image A.- Parameters:
RGBT- RGB table.
-
setRGBTB
Sets the RGB table for ARGB image B.- Parameters:
RGBT- RGB table.
-
setSlice
public void setSlice(int _slice) Accessor that sets the slice of the image component.- Parameters:
_slice- Image slice to be displayed.
-
setCenter
public void setCenter(int i, int j, int k) setCenter sets the PatientSlice center:- Parameters:
i- FileCoordinatesj- FileCoordinatesk- FileCoordinates
-
show
public boolean show(int tSlice, int zSlice, ModelLUT _LUTa, ModelLUT _LUTb, boolean forceShow, javax.vecmath.Vector3f[] akVertices) Shows the image.- Parameters:
tSlice- t (time) slice to showzSlice- z 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.akVertices- four corners of the cut-plane bounding box for diagonal slices- Returns:
- Confirms if the show updated the image
-
finalize
Calls garbage collector to release system resources. -
getAxisAligned
public boolean getAxisAligned()Returns whether the slice is axis-aligned or rotated.- Returns:
- true when the slice is axis-aligned, false otherwise.
-