T
- buffer type used for aggregation UnsignedByteBuffer
etc.public abstract class ProjectableBufferAggregator<T> extends ChannelAggregator
ProjectableBuffer
.
This is achieved by maintaining a running sum for each voxel, and a total count of how many images were added.
Constructor and Description |
---|
ProjectableBufferAggregator() |
Modifier and Type | Method and Description |
---|---|
protected void |
addChannelAfterCheck(Channel channel)
Adds a
Channel to the aggregation - after checking channel has acceptable
dimensions. |
protected abstract ProjectableBuffer<T> |
create(VoxelDataType dataType,
Extent extent)
Creates the
ProjectableBuffer used for aggregation. |
protected Optional<Dimensions> |
existingDimensions()
The
Dimensions to use for the aggregation. |
protected Channel |
retrieveCreateAggregatedChannel()
Retrieve or create an aggregated-channel of type
outputType . |
addChannel, aggregatedChannel, maybeDropResolution
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
protected Optional<Dimensions> existingDimensions()
ChannelAggregator
Dimensions
to use for the aggregation.existingDimensions
in class ChannelAggregator
ChannelAggregator.addChannel(Channel, Logger)
has
occurred, otherwise Optional.empty()
.protected void addChannelAfterCheck(Channel channel) throws OperationFailedException
ChannelAggregator
Channel
to the aggregation - after checking channel
has acceptable
dimensions.addChannelAfterCheck
in class ChannelAggregator
channel
- the channel to add, guaranteed to have identical dimensions to any previous
call to ChannelAggregator.addChannel(Channel, Logger)
.OperationFailedException
- if the dimensions do not match existing channels that were
previously added.protected Channel retrieveCreateAggregatedChannel()
ChannelAggregator
outputType
.
This channel is the result of the aggregation operation.
retrieveCreateAggregatedChannel
in class ChannelAggregator
Channel
, either as already exists internally, or newly created.protected abstract ProjectableBuffer<T> create(VoxelDataType dataType, Extent extent) throws OperationFailedException
ProjectableBuffer
used for aggregation.dataType
- the data-type to use for the aggregated channel.extent
- the size of the aggregated channel.ProjectableBuffer
of specified type and size.OperationFailedException
- if a buffer-type is unsupported.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.