Class StackDisplayer
- Direct Known Subclasses:
IntensityQuantiles
Converts from a
Channel or Stack to a DisplayStack so that it can be
displayed.
Only images in two forms may be displayed:
- a single-channeled image (grayscale) with unsigned 8-bit voxel data type
- a RGB image with three channels, each with unsigned 8-bit voxel data type.
Any other form of image, will be converted into one of the above (the former only if there is a single-channel).
If there are more than three channels, the first three channels are taken.
If there are only two channels, they occupy respectively the red and blue channels (green is left blank).
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ChannelConverterAttached<Channel, UnsignedByteBuffer> createConverterFor(VoxelDataType dataType) Determines what kind of converter to use for a particular channel, to map it to an unsigned 8-bit channel.deriveFrom(Channel channel) Creates from aChannel.deriveFrom(RGBStack rgbStack) Derives aDisplayStackfrom aRGBStack.deriveFrom(Stack stack) Derives aDisplayStackfrom aRGBStack.Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
StackDisplayer
public StackDisplayer()
-
-
Method Details
-
deriveFrom
Creates from aChannel.- Parameters:
channel- the stack to create from.- Returns:
- a newly created
DisplayStack, after applying any applicable conversion. - Throws:
CreateException- if a converter cannot be associated with a particular channel.
-
deriveFrom
Derives aDisplayStackfrom aRGBStack.- Parameters:
stack- the stack to create from, which should have either 1 or 3 channels (corresponding to RGB).- Returns:
- a newly created
DisplayStack, after applying any applicable conversion. - Throws:
CreateException- with an incorrect number of channels, or if a converter cannot be associated with a particular channel.
-
deriveFrom
Derives aDisplayStackfrom aRGBStack.- Parameters:
rgbStack- the stack to create from.- Returns:
- a newly created
DisplayStack, after applying any applicable conversion. - Throws:
CreateException- if a converter cannot be associated with a particular channel.
-
createConverterFor
protected abstract ChannelConverterAttached<Channel,UnsignedByteBuffer> createConverterFor(VoxelDataType dataType) Determines what kind of converter to use for a particular channel, to map it to an unsigned 8-bit channel.- Parameters:
dataType- the voxel-data type that must be converted to unsigned 8-bit.- Returns:
- a newly created
ChannelConverterAttachedthat can convert from channels with voxel-typedataTypeto unsigned 8-bit.
-