Class RayCastColorComposite
- java.lang.Object
-
- gov.nih.mipav.view.renderer.J3D.volumeview.Renderer
-
- gov.nih.mipav.view.renderer.J3D.volumeview.RayCastRenderer
-
- gov.nih.mipav.view.renderer.J3D.volumeview.RayCastColor
-
- gov.nih.mipav.view.renderer.J3D.volumeview.RayCastColorComposite
-
- All Implemented Interfaces:
RendererInterfaceColor
public class RayCastColorComposite extends RayCastColor
Ray traced rendering of the volume using composition of colors and alpha values at each voxel.
-
-
Field Summary
-
Fields inherited from class gov.nih.mipav.view.renderer.J3D.volumeview.RayCastColor
m_acImageA, m_acImageB, m_acImageG, m_acImageR, m_kMap
-
Fields inherited from class gov.nih.mipav.view.renderer.J3D.volumeview.RayCastRenderer
blue, clipRegionXNeg, clipRegionXPos, clipRegionYNeg, clipRegionYPos, clipRegionZNeg, clipRegionZPos, fXDelta, fYDelta, fZDelta, green, m_fInvXDelta, m_fInvYDelta, m_fInvZDelta, m_kExtent, m_kMDir, m_kMOrig, m_kP0, m_kP1, m_kPDiff, m_kV, m_kWDir, m_kWOrig, opacityFunctA, opacityFunctB, red, vertexDiffuse, vertexSpecular, xLUTa, xLUTb, yLUTa, yLUTb
-
Fields inherited from class gov.nih.mipav.view.renderer.J3D.volumeview.Renderer
m_aiRImage, m_akAxis, m_akNormal, m_bParallel, m_bReloadInput, m_fAngle, m_fExtreme, m_fFMult, m_fGamma, m_fNear, m_fRScaleX, m_fRScaleY, m_fXTrn, m_fYTrn, m_fZoom, m_iMaxBound, m_iMinBound, m_iRBound, m_iXBound, m_iXBoundM1, m_iXBoundM2, m_iXYProduct, m_iXYZProduct, m_iYBound, m_iYBoundM1, m_iYBoundM2, m_iZBound, m_iZBoundM1, m_iZBoundM2, m_kBackgroundColor, m_kEyeModel, m_kEyeWorld, m_kImage, m_kLightSet, m_kMaterial, m_kRotate
-
-
Constructor Summary
Constructors Constructor Description RayCastColorComposite(ModelImage kImage, int iRBound, int[] aiRImage)
The constructor for the ray tracer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
disposeLocal(boolean flag)
Clean memory.protected void
finalize()
Calls dispose.protected void
processRay(int iIndex, int rayTraceStepSize)
Process a ray that has intersected the oriented bounding box of the 3D image.protected void
processRay(javax.vecmath.Point3f p0, javax.vecmath.Point3f p1, int iIndex, int rayTraceStepSize)
Process a ray that has intersected the oriented bounding box of the 3D image.protected void
traceInit()
Called at the beginning of the trace methods.boolean
usesNormals()
Return indication as to whether or not the particular renderer uses normal vectors as part of its implementation.-
Methods inherited from class gov.nih.mipav.view.renderer.J3D.volumeview.RayCastColor
hasInputData, hasInputMap, interpolateColor, setInput, setInputMap
-
Methods inherited from class gov.nih.mipav.view.renderer.J3D.volumeview.RayCastRenderer
getAxis, interpolate, rotateBy, rotateFrameBy, setAxis, setBlurFlag, setDiffuse, setOpacityFunctions, setSpecular, setXBoundNeg, setXBoundPos, setYBoundNeg, setYBoundPos, setZBoundNeg, setZBoundPos, trace, traceBlockRays
-
Methods inherited from class gov.nih.mipav.view.renderer.J3D.volumeview.Renderer
computeIntegralNormalizationFactor, convertWorldToModel, disposeLocal, getAngle, getBackgroundColor, getExtreme, getEyeDist, getEyePoint, getGamma, getMaxBound, getMinBound, getNear, getParallel, getXBound, getXTranslate, getYBound, getYTranslate, getZBound, getZoom, hasNormals, orthonormalize, reloadInputData, reloadInputData, setAngle, setBackgroundColor, setExtreme, setEyeDist, setGamma, setLighting, setMaterialShininess, setNear, setNearAndAngle, setNormals, setParallel, setXTranslate, setYTranslate, setZoom
-
-
-
-
Constructor Detail
-
RayCastColorComposite
public RayCastColorComposite(ModelImage kImage, int iRBound, int[] aiRImage)
The constructor for the ray tracer. Currently, the only client of this class is MjVolumeRenderer.- Parameters:
kImage
- the 3D imageiRBound
- the dimension of the square 2D renderer imageaiRImage
- The rendered image data stored in row-major order. Each integer pixel represents an RGB color in the format B | (G
-
-
Method Detail
-
disposeLocal
public void disposeLocal(boolean flag)
Clean memory.- Overrides:
disposeLocal
in classRayCastColor
- Parameters:
flag
- is true call the super.disposeLocal
-
usesNormals
public boolean usesNormals()
Return indication as to whether or not the particular renderer uses normal vectors as part of its implementation.- Specified by:
usesNormals
in classRenderer
- Returns:
- boolean True if the implementation uses normals.
-
finalize
protected void finalize() throws java.lang.Throwable
Calls dispose.- Overrides:
finalize
in classRayCastColor
- Throws:
java.lang.Throwable
- DOCUMENT ME!
-
processRay
protected void processRay(javax.vecmath.Point3f p0, javax.vecmath.Point3f p1, int iIndex, int rayTraceStepSize)
Process a ray that has intersected the oriented bounding box of the 3D image. The method is only called if there is a line segment of intersection. The 'intersectsBox' stores the end points of the line segment in the class members P0 and P1 in image coordinates. This method uses the Trapezoid Rule to numerically integrates the image along the line segment. The number of integration samples is chosen to be proportional to the length of the line segment. P0 and P1 are used for multi-thread rendering.The function sets the color of the pixel corresponding to the processed ray. The RGB value is stored as an integer in the format B | (G
- Specified by:
processRay
in classRayCastRenderer
- Parameters:
p0
- ray trace starting pointp1
- ray trace stopping pointiIndex
- int the index of the pixel corresponding to the processed rayrayTraceStepSize
- int size of steps to take along ray being traced
-
processRay
protected void processRay(int iIndex, int rayTraceStepSize)
Process a ray that has intersected the oriented bounding box of the 3D image. The method is only called if there is a line segment of intersection. The 'intersectsBox' stores the end points of the line segment in the class members m_kP0 and m_kP1 in image coordinates. This method uses the Trapezoid Rule to numerically integrates the image along the line segment. The number of integration samples is chosen to be proportional to the length of the line segment.The function sets the color of the pixel corresponding to the processed ray. The RGB value is stored as an integer in the format B | (G
- Specified by:
processRay
in classRayCastRenderer
- Parameters:
iIndex
- int the index of the pixel corresponding to the processed rayrayTraceStepSize
- int size of steps to take along ray being traced
-
-