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
FieldsModifier and TypeFieldDescriptionprotected byte[]DOCUMENT ME!protected byte[]byte and alpha channels for the image.protected float[]intermediate 2D image.protected floatFactor used to scale the intermediate values during the mapping to the final image.protected RendererMapIntensityMap 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_kPositionFields 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
ConstructorsConstructorDescriptionShearWarpIntensity(ModelImage kImage, int iFinalBound, int[] aiFinal) Create an intensity renderer. -
Method Summary
Modifier and TypeMethodDescriptionvoidClean memory.protected voidfinalize()Calls disposeLocal to clean up memory, and then call super.finalize();booleanReturn indication as to whether or not the input image data has been specified yet.booleanReturn indication as to whether or not a LUT to use for mapping input intensity values to colors has been specified.protected voidMap the intermediate images to the final color image.protected voidresampleAll(int iDS) Resample all the slices for the current permuted volume data.voidsetInput(byte[] acImageB, byte[] acImageA) Specify the input volume to use for rendering.voidSpecify 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, updateSkipMethods 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 Details
-
m_acImageA
protected byte[] m_acImageADOCUMENT ME! -
m_acImageB
protected byte[] m_acImageBbyte and alpha channels for the image. -
m_afInterB
protected float[] m_afInterBintermediate 2D image. -
m_fNormalize
protected float m_fNormalizeFactor used to scale the intermediate values during the mapping to the final image. -
m_kMap
Map to convert intensity values to colors.
-
-
Constructor Details
-
ShearWarpIntensity
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 Details
-
disposeLocal
public void disposeLocal()Clean memory.- Overrides:
disposeLocalin classShearWarpRenderer
-
hasInputData
public boolean hasInputData()Return indication as to whether or not the input image data has been specified yet.- Specified by:
hasInputDatain interfaceRendererInterfaceIntensity- Specified by:
hasInputDatain 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:
hasInputMapin 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:
setInputin interfaceRendererInterfaceIntensity- Parameters:
acImageB- byte[] Array of byte intensity values for volume.acImageA- byte[] Array of byte alpha values for volume.
-
setInputMap
Specify the lookup table to use for mapping input intensity values to colors.- Specified by:
setInputMapin interfaceRendererInterfaceIntensity- Parameters:
kMap- Look up table for mapping the intensity values to colors.
-
finalize
Calls disposeLocal to clean up memory, and then call super.finalize();- Overrides:
finalizein classShearWarpRenderer- Throws:
Throwable- DOCUMENT ME!
-
mapIntermediateToFinal
protected void mapIntermediateToFinal()Map the intermediate images to the final color image.- Specified by:
mapIntermediateToFinalin classShearWarpRenderer
-
resampleAll
protected void resampleAll(int iDS) Resample all the slices for the current permuted volume data.- Overrides:
resampleAllin 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.
-