public class ChannelFactory extends VoxelDataTypeFactoryMultiplexer<ChannelFactorySingleType>
Channel
corresponding to one of several data-types.Modifier and Type | Method and Description |
---|---|
Channel |
create(Dimensions dimensions,
VoxelDataType channelDataType)
Creates an empty initialized channel for a particular data-type.
|
Channel |
create(Voxels<?> voxels)
Create a
Channel from particular voxels. |
Channel |
create(Voxels<?> voxels,
Optional<Resolution> resolution)
Create a
Channel from particular voxels. |
Channel |
createEmptyInitialisedToSupportMaxValue(Dimensions dimensions,
long maxIntensityValueNeeded)
Creates an empty initialized channel with discrete type with as minimal as needed data-type
to support a maximum value.
|
Channel |
createUninitialised(Dimensions dimensions,
VoxelDataType channelDataType)
Create a
Channel without initialization with voxel-buffers. |
static ChannelFactory |
instance()
Singleton instance of
ChannelFactory . |
get
public static ChannelFactory instance()
ChannelFactory
.public Channel create(Dimensions dimensions, VoxelDataType channelDataType)
dimensions
- channel dimensions.channelDataType
- data-type.public Channel createUninitialised(Dimensions dimensions, VoxelDataType channelDataType)
Channel
without initialization with voxel-buffers.dimensions
- the size of the channel.channelDataType
- the data-type of the voxels in the channel.public Channel create(Voxels<?> voxels)
Channel
from particular voxels.voxels
- the voxels to create the channel from.Channel
.public Channel create(Voxels<?> voxels, Optional<Resolution> resolution)
Channel
from particular voxels.voxels
- the voxels to create the channel from.resolution
- the resolution to assign.Channel
.public Channel createEmptyInitialisedToSupportMaxValue(Dimensions dimensions, long maxIntensityValueNeeded) throws CreateException
byte
, short
and int
are tried in that order.
dimensions
- dimensions.maxIntensityValueNeeded
- the maximum value that the channel's data-type needs to
support.CreateException
- if the max value exceeds all supported data types.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.