Class ShearWarpIntensity
- 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.ShearWarpIntensity
-
- All Implemented Interfaces:
RendererInterfaceIntensity
- Direct Known Subclasses:
ShearWarpIntensityDRR
,ShearWarpIntensityMIP
public abstract class ShearWarpIntensity extends ShearWarpRenderer implements RendererInterfaceIntensity
The base class renderer to support shear-warp rendering of intensity images (gray scale). The intensity is stored in the blue channel of the base class renderer. 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
byte and alpha channels for the image.protected float[]
m_afInterB
intermediate 2D image.protected float
m_fNormalize
Factor used to scale the intermediate values during the mapping to the final image.protected RendererMapIntensity
m_kMap
Map to convert intensity values to colors.-
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 ShearWarpIntensity(ModelImage kImage, int iFinalBound, int[] aiFinal)
Create an intensity renderer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
disposeLocal()
Clean memory.protected void
finalize()
Calls disposeLocal to clean up memory, and then call super.finalize();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 LUT to use for mapping input intensity values to colors has been specified.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[] acImageB, byte[] acImageA)
Specify the input volume to use for rendering.void
setInputMap(RendererMapIntensity kMap)
Specify the lookup table to use for mapping input intensity values to colors.-
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
byte and alpha channels for the image.
-
m_afInterB
protected float[] m_afInterB
intermediate 2D image.
-
m_fNormalize
protected float m_fNormalize
Factor used to scale the intermediate values during the mapping to the final image.
-
m_kMap
protected RendererMapIntensity m_kMap
Map to convert intensity values to colors.
-
-
Constructor Detail
-
ShearWarpIntensity
public ShearWarpIntensity(ModelImage kImage, int iFinalBound, int[] aiFinal)
Create an intensity renderer.- 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()
Clean memory.- 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 interfaceRendererInterfaceIntensity
- 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 LUT to use for mapping input intensity values to colors has been specified.- Specified by:
hasInputMap
in interfaceRendererInterfaceIntensity
- Returns:
- boolean True if such a LUT has been defined.
-
setInput
public void setInput(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 interfaceRendererInterfaceIntensity
- Parameters:
acImageB
- byte[] Array of byte intensity values for volume.acImageA
- byte[] Array of byte alpha values for volume.
-
setInputMap
public void setInputMap(RendererMapIntensity kMap)
Specify the lookup table to use for mapping input intensity values to colors.- Specified by:
setInputMap
in interfaceRendererInterfaceIntensity
- Parameters:
kMap
- Look up table for mapping the intensity values to colors.
-
finalize
protected void finalize() throws java.lang.Throwable
Calls disposeLocal to clean up memory, and then call super.finalize();- 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.
-
-