Class NodeAlignedVolumeTextureRender
java.lang.Object
javax.media.j3d.SceneGraphObject
javax.media.j3d.Node
javax.media.j3d.Group
javax.media.j3d.TransformGroup
gov.nih.mipav.view.renderer.J3D.surfaceview.NodeVolumeTextureRender
gov.nih.mipav.view.renderer.J3D.surfaceview.NodeAlignedVolumeTextureRender
Used to generate a scene node item that that represents the rendering of the volume using texture maps.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final floatMaximum size of any side of cube for rendering slices.private final floatSize of each axis in the original volume.private final floatSize of each axis in the original volume.private final floatSize of each axis in the original volume.private floatDOCUMENT ME!private floatSpacing between slices.private javax.media.j3d.AppearanceThe same appearance properties used to render each slice.private javax.media.j3d.OrderedGroupDOCUMENT ME!private javax.media.j3d.OrderedGroupThe slicing through the volume will be contained in an OrderedGroup to ensure that the slices are rendered back-to-front for correct blending effect.private javax.media.j3d.SwitchThis is the only node attached to this TransformGroup.private javax.media.j3d.Transform3DDOCUMENT ME!private javax.vecmath.Matrix3dDOCUMENT ME!private javax.media.j3d.Transform3DThese are declared in the class to avoid allocating temporary instances each call into methods of this class.private VolumeTextureKeep track of the texture instance.private static final intDOCUMENT ME!private static final intUsed to select which nodes in the switch is selected.Fields inherited from class javax.media.j3d.TransformGroup
ALLOW_TRANSFORM_READ, ALLOW_TRANSFORM_WRITEFields inherited from class javax.media.j3d.Group
ALLOW_CHILDREN_EXTEND, ALLOW_CHILDREN_READ, ALLOW_CHILDREN_WRITE, ALLOW_COLLISION_BOUNDS_READ, ALLOW_COLLISION_BOUNDS_WRITEFields inherited from class javax.media.j3d.Node
ALLOW_AUTO_COMPUTE_BOUNDS_READ, ALLOW_AUTO_COMPUTE_BOUNDS_WRITE, ALLOW_BOUNDS_READ, ALLOW_BOUNDS_WRITE, ALLOW_COLLIDABLE_READ, ALLOW_COLLIDABLE_WRITE, ALLOW_LOCAL_TO_VWORLD_READ, ALLOW_LOCALE_READ, ALLOW_PARENT_READ, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING -
Constructor Summary
ConstructorsConstructorDescriptionNodeAlignedVolumeTextureRender(ModelImage image, VolumeTexture kVolumeTexture) Create the scene graph node for the rendering of the volume data, everything except the textures from the volume data to be applied to the slices through the volume. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcreateSlices(javax.media.j3d.OrderedGroup kOrderedGroupSlices, float fSpacing) Create the z-axis aligned slices through the volume so that any rotation of the volume does not result in the slices getting clipped by the texture volume.voiddispose()Clean up memory of this class.private voiddisposeSlices(javax.media.j3d.OrderedGroup kOrderedGroupSlices) Remove all children (geometries) of the specified ordered group node.protected voidfinalize()Used to call dispose of this class to clean up memory.floatRetrieve the current "coarse" spacing between slices.floatRetrieve the current "fine" spacing between slices.booleanRetrieves whether the "coarse" slice sampling is currently selected.booleanRetrieves whether the "fine" slice sampling is currently selected.voidsetSliceSpacingCoarse(float fSpacing) Set the desired "coarse" spacing between slices.voidsetSliceSpacingFine(float fSpacing) Set the desired "fine" spacing between slices.voidupdateOpacity(int iValue) Not used at the moment.voidupdateView(javax.media.j3d.Transform3D kViewTransform) Automatically call selectSlices with the correct axis (X, Y, or Z) and increasing/decreasing coordinate order flag based on the specified view direction vector such that the slices are rendered back to front for the plane which is most parallel to the view plane.voidSelect the "coarse" slice sampling for rendering.voidSelect the "fine" slice sampling for rendering.Methods inherited from class gov.nih.mipav.view.renderer.J3D.surfaceview.NodeVolumeTextureRender
getAxisSlice, getIncreasingOrder, updateSlicingMethods inherited from class javax.media.j3d.TransformGroup
cloneNode, getTransform, setTransformMethods inherited from class javax.media.j3d.Group
addChild, getAllChildren, getAlternateCollisionTarget, getChild, getCollisionBounds, indexOfChild, insertChild, moveTo, numChildren, removeAllChildren, removeChild, removeChild, setAlternateCollisionTarget, setChild, setCollisionBoundsMethods inherited from class javax.media.j3d.Node
cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, duplicateNode, getBounds, getBoundsAutoCompute, getCollidable, getLocale, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickableMethods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString, updateNodeReferences
-
Field Details
-
SLICES_FINE
private static final int SLICES_FINEUsed to select which nodes in the switch is selected.- See Also:
-
SLICES_COARSE
private static final int SLICES_COARSEDOCUMENT ME!- See Also:
-
m_fCubeSize
private final float m_fCubeSizeMaximum size of any side of cube for rendering slices. -
m_fSizeX
private final float m_fSizeXSize of each axis in the original volume. -
m_fSizeY
private final float m_fSizeYSize of each axis in the original volume. -
m_fSizeZ
private final float m_fSizeZSize of each axis in the original volume. -
m_fSliceSpacingCoarse
private float m_fSliceSpacingCoarseDOCUMENT ME! -
m_fSliceSpacingFine
private float m_fSliceSpacingFineSpacing between slices. -
m_kAppearance
private javax.media.j3d.Appearance m_kAppearanceThe same appearance properties used to render each slice. -
m_kOrderedGroupSlicesCoarse
private javax.media.j3d.OrderedGroup m_kOrderedGroupSlicesCoarseDOCUMENT ME! -
m_kOrderedGroupSlicesFine
private javax.media.j3d.OrderedGroup m_kOrderedGroupSlicesFineThe slicing through the volume will be contained in an OrderedGroup to ensure that the slices are rendered back-to-front for correct blending effect. One set each is available for fine and coarse resolution quality rendering. -
m_kSwitch
private javax.media.j3d.Switch m_kSwitchThis is the only node attached to this TransformGroup. It will enable either the selection of the "fine" or "coarse" resolution slice sampling. -
m_kTempLocalViewTransform
private javax.media.j3d.Transform3D m_kTempLocalViewTransformDOCUMENT ME! -
m_kTempRotateMatrix
private javax.vecmath.Matrix3d m_kTempRotateMatrixDOCUMENT ME! -
m_kTempWorldToLocalTransform
private javax.media.j3d.Transform3D m_kTempWorldToLocalTransformThese are declared in the class to avoid allocating temporary instances each call into methods of this class. -
m_kVolumeTexture
Keep track of the texture instance.
-
-
Constructor Details
-
NodeAlignedVolumeTextureRender
Create the scene graph node for the rendering of the volume data, everything except the textures from the volume data to be applied to the slices through the volume.- Parameters:
image- description of the parameters for the volumes which can be rendered with this node, where all volumes must shared the same description parameterskVolumeTexture- VolumeTexture-derived instance which contains the texture properties. This description parameters for the volume associated with this instance must match the parameters for which this node and its geometry.
-
-
Method Details
-
dispose
public void dispose()Clean up memory of this class.- Overrides:
disposein classNodeVolumeTextureRender
-
getSliceSpacingCoarse
public float getSliceSpacingCoarse()Retrieve the current "coarse" spacing between slices.- Returns:
- float Current "coarse" spacing between slices.
-
getSliceSpacingFine
public float getSliceSpacingFine()Retrieve the current "fine" spacing between slices.- Returns:
- float Current "fine" spacing between slices.
-
isUsingSliceSpacingCoarse
public boolean isUsingSliceSpacingCoarse()Retrieves whether the "coarse" slice sampling is currently selected.- Returns:
- boolean Returns true if "coarse" slice sampling is currently selected.
-
isUsingSliceSpacingFine
public boolean isUsingSliceSpacingFine()Retrieves whether the "fine" slice sampling is currently selected.- Returns:
- boolean Returns true if "fine" slice sampling is currently selected.
-
setSliceSpacingCoarse
public void setSliceSpacingCoarse(float fSpacing) Set the desired "coarse" spacing between slices.- Parameters:
fSpacing- float Desired "coarse" spacing between slices.
-
setSliceSpacingFine
public void setSliceSpacingFine(float fSpacing) Set the desired "fine" spacing between slices.- Parameters:
fSpacing- float Desired "fine" spacing between slices.
-
updateOpacity
public void updateOpacity(int iValue) Not used at the moment. Update the opacity from the relate opacity change slider- Overrides:
updateOpacityin classNodeVolumeTextureRender- Parameters:
iValue- Opacity value from the opacity slider
-
updateView
public void updateView(javax.media.j3d.Transform3D kViewTransform) Automatically call selectSlices with the correct axis (X, Y, or Z) and increasing/decreasing coordinate order flag based on the specified view direction vector such that the slices are rendered back to front for the plane which is most parallel to the view plane.- Overrides:
updateViewin classNodeVolumeTextureRender- Parameters:
kViewTransform- current view transform in virtual world coordinates
-
useSliceSpacingCoarse
public void useSliceSpacingCoarse()Select the "coarse" slice sampling for rendering. -
useSliceSpacingFine
public void useSliceSpacingFine()Select the "fine" slice sampling for rendering. -
finalize
Used to call dispose of this class to clean up memory.- Overrides:
finalizein classNodeVolumeTextureRender- Throws:
Throwable- DOCUMENT ME!
-
createSlices
private void createSlices(javax.media.j3d.OrderedGroup kOrderedGroupSlices, float fSpacing) Create the z-axis aligned slices through the volume so that any rotation of the volume does not result in the slices getting clipped by the texture volume.- Parameters:
kOrderedGroupSlices- Node containing the sequenced ordering of the slices for correct back to front rendering when looking down the -Z axis.fSpacing- float Spacing between slices
-
disposeSlices
private void disposeSlices(javax.media.j3d.OrderedGroup kOrderedGroupSlices) Remove all children (geometries) of the specified ordered group node.- Parameters:
kOrderedGroupSlices- OrderedGroup Node which is to be cleared of all children.
-