Class ShearWarpColor
- java.lang.Object
-
- gov.nih.mipav.view.renderer.J3D.volumeview.Renderer
-
- gov.nih.mipav.view.renderer.J3D.volumeview.ShearWarpRenderer
-
- gov.nih.mipav.view.renderer.J3D.volumeview.ShearWarpColor
-
- All Implemented Interfaces:
RendererInterfaceColor
- Direct Known Subclasses:
ShearWarpColorComposite
,ShearWarpColorDRR
,ShearWarpColorLighting
,ShearWarpColorMIP
public abstract class ShearWarpColor extends ShearWarpRenderer implements RendererInterfaceColor
The base class renderer to support shear-warp rendering of color images. See the document ShearWarpRendering.pdf for a detailed description of the renderer architecture.
-
-
Field Summary
Fields Modifier and Type Field Description protected byte[]
m_acImageA
DOCUMENT ME!protected byte[]
m_acImageB
DOCUMENT ME!protected byte[]
m_acImageG
DOCUMENT ME!protected byte[]
m_acImageR
color channels of the image (R = red, G = green, B = blue, A = alpha).protected float[]
m_afInterB
DOCUMENT ME!protected float[]
m_afInterG
DOCUMENT ME!protected float[]
m_afInterR
intermediate 2D images.(package private) RendererMapColor
m_kMap
map to convert RGB channel values to intensity.protected java.lang.Float
m_kNormalizeB
DOCUMENT ME!protected java.lang.Float
m_kNormalizeG
DOCUMENT ME!protected java.lang.Float
m_kNormalizeR
Factor used to scale the computed sum along each ray for the purpose of normalizing the integral.-
Fields inherited from class gov.nih.mipav.view.renderer.J3D.volumeview.ShearWarpRenderer
m_aaaasEncode, m_aaasVolumeEncode, m_aafBox, m_aafM, m_aaiIndex, m_aasSliceEncode, m_afA, m_afB, m_afOffset, m_afShear, m_aiBound, m_aiClipMax, m_aiClipMin, m_aiCurrentI, m_aiInterC, m_aiSliceBound, m_aiSliceMax, m_aiSliceMin, m_asSkip, m_bDoEncodeSkip, m_fInv255, m_iI0, m_iInterBound, m_iInterBoundM1, m_iInterIndex, m_iInterOffset, m_iInterQuantity, m_iPermute, m_iPixel, m_iQuantity, m_iSIndex, m_iSlice, m_iSliceQuantity, m_kP00, m_kP01, m_kP10, m_kP11, m_kPosition
-
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 ShearWarpColor(ModelImage kImage, int iFinalBound, int[] aiFinal)
Create a color renderer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
disposeLocal()
DOCUMENT ME!protected void
finalize()
Calls dispose.boolean
hasInputData()
Return indication as to whether or not the input image data has been specified yet.boolean
hasInputMap()
Return indication as to whether or not a map has been defined for mapping input colors to intensity.protected void
mapIntermediateToFinal()
Map the intermediate images to the final color image.protected void
resampleAll(int iDS)
Resample all the slices for the current permuted volume data.void
setInput(byte[] acImageR, byte[] acImageG, byte[] acImageB, byte[] acImageA)
Specify the input volume to use for rendering.void
setInputMap(RendererMapColor kMap)
Specify the lookup table to use for mapping input RGB colors to intensity.-
Methods inherited from class gov.nih.mipav.view.renderer.J3D.volumeview.ShearWarpRenderer
beforeResampleAll, beforeResampleSingle, composite, computeEncode, computePositions, fromFloat, fromInt, getAxis, getAxis, initializeEncodeSkip, resampleSingle, rotateBy, rotateFrameBy, setAxis, setParallel, setXBoundNeg, setXBoundPos, setYBoundNeg, setYBoundPos, setZBoundNeg, setZBoundPos, skipToNonopaque, toFloat, toInt, updateSkip
-
Methods inherited from class gov.nih.mipav.view.renderer.J3D.volumeview.Renderer
computeIntegralNormalizationFactor, convertWorldToModel, 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, setXTranslate, setYTranslate, setZoom, traceInit, usesNormals
-
-
-
-
Field Detail
-
m_acImageA
protected byte[] m_acImageA
DOCUMENT ME!
-
m_acImageB
protected byte[] m_acImageB
DOCUMENT ME!
-
m_acImageG
protected byte[] m_acImageG
DOCUMENT ME!
-
m_acImageR
protected byte[] m_acImageR
color channels of the image (R = red, G = green, B = blue, A = alpha).
-
m_afInterB
protected float[] m_afInterB
DOCUMENT ME!
-
m_afInterG
protected float[] m_afInterG
DOCUMENT ME!
-
m_afInterR
protected float[] m_afInterR
intermediate 2D images.
-
m_kNormalizeB
protected java.lang.Float m_kNormalizeB
DOCUMENT ME!
-
m_kNormalizeG
protected java.lang.Float m_kNormalizeG
DOCUMENT ME!
-
m_kNormalizeR
protected java.lang.Float m_kNormalizeR
Factor used to scale the computed sum along each ray for the purpose of normalizing the integral.
-
m_kMap
RendererMapColor m_kMap
map to convert RGB channel values to intensity.
-
-
Constructor Detail
-
ShearWarpColor
public ShearWarpColor(ModelImage kImage, int iFinalBound, int[] aiFinal)
Create a color renderer. The input color channel type is 'byte', a signed 8-bit quantity, but the data represents unsigned 8-bit values.- Parameters:
kImage
- the 3D imageiFinalBound
- the dimension of the square 2D renderer imageaiFinal
- The 2D rendered image. The image is 24-bit RGB color, each pixel stored as a 32-bit integer. The 8 most significant bits are ignored. The blue channel is stored in the 8 least significant bits. The green channel is in the next 8 bits adjacent to the blue bits. The red channel is in the next 8 bits adjacent to the green channel.
-
-
Method Detail
-
disposeLocal
public void disposeLocal()
DOCUMENT ME!- Overrides:
disposeLocal
in classShearWarpRenderer
-
hasInputData
public boolean hasInputData()
Return indication as to whether or not the input image data has been specified yet.- Specified by:
hasInputData
in interfaceRendererInterfaceColor
- Specified by:
hasInputData
in classRenderer
- Returns:
- boolean True if the input image data has been specified.
-
hasInputMap
public boolean hasInputMap()
Return indication as to whether or not a map has been defined for mapping input colors to intensity.- Specified by:
hasInputMap
in interfaceRendererInterfaceColor
- Returns:
- boolean True if such a map has been defined.
-
setInput
public void setInput(byte[] acImageR, byte[] acImageG, byte[] acImageB, byte[] acImageA)
Specify the input volume to use for rendering. The image data stored in order of slice indices, each slice stored in row-major order. That is, slice z=0 is stored first, slice z=1 is stored next, and so on. In slice z=0, the y=0 row is stored first, the y=1 row is stored next, and so on.- Specified by:
setInput
in interfaceRendererInterfaceColor
- Parameters:
acImageR
- byte[] Array of byte red values for volume.acImageG
- byte[] Array of byte green values for volume.acImageB
- byte[] Array of byte blue values for volume.acImageA
- byte[] Array of byte alpha values for volume.
-
setInputMap
public void setInputMap(RendererMapColor kMap)
Specify the lookup table to use for mapping input RGB colors to intensity.- Specified by:
setInputMap
in interfaceRendererInterfaceColor
- Parameters:
kMap
- Look up table for mapping the color values to intensity.
-
finalize
protected void finalize() throws java.lang.Throwable
Calls dispose.- Overrides:
finalize
in classShearWarpRenderer
- Throws:
java.lang.Throwable
- DOCUMENT ME!
-
mapIntermediateToFinal
protected void mapIntermediateToFinal()
Map the intermediate images to the final color image.- Specified by:
mapIntermediateToFinal
in classShearWarpRenderer
-
resampleAll
protected void resampleAll(int iDS)
Resample all the slices for the current permuted volume data.- Overrides:
resampleAll
in classShearWarpRenderer
- Parameters:
iDS
- The number of slices to increment during the resampling phase. The value should be one or larger. If one, all slices of the volume data are resampled. If two, only every other slice is resampled. An input larger than one is used to allow fast rendering during rotation of the volume data. Once the rotation terminates, a composite with input of one should be called.
-
-