public abstract class StackDisplayer extends AnchorBean<StackDisplayer>
Channel
or Stack
to a DisplayStack
so that it can be
displayed.
Only images in two forms may be displayed:
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).
Constructor and Description |
---|
StackDisplayer() |
Modifier and Type | Method and Description |
---|---|
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.
|
DisplayStack |
deriveFrom(Channel channel)
Creates from a
Channel . |
DisplayStack |
deriveFrom(RGBStack rgbStack)
Derives a
DisplayStack from a RGBStack . |
DisplayStack |
deriveFrom(Stack stack)
Derives a
DisplayStack from a RGBStack . |
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
public DisplayStack deriveFrom(Channel channel) throws CreateException
Channel
.channel
- the stack to create from.DisplayStack
, after applying any applicable conversion.CreateException
- if a converter cannot be associated with a particular channel.public DisplayStack deriveFrom(Stack stack) throws CreateException
DisplayStack
from a RGBStack
.stack
- the stack to create from, which should have either 1 or 3 channels
(corresponding to RGB).DisplayStack
, after applying any applicable conversion.CreateException
- with an incorrect number of channels, or if a converter cannot be
associated with a particular channel.public DisplayStack deriveFrom(RGBStack rgbStack) throws CreateException
DisplayStack
from a RGBStack
.rgbStack
- the stack to create from.DisplayStack
, after applying any applicable conversion.CreateException
- if a converter cannot be associated with a particular channel.protected abstract ChannelConverterAttached<Channel,UnsignedByteBuffer> createConverterFor(VoxelDataType dataType)
dataType
- the voxel-data type that must be converted to unsigned 8-bit.ChannelConverterAttached
that can convert from channels with
voxel-type dataType
to unsigned 8-bit.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.