public abstract class ChannelAggregator extends AnchorBean<ChannelAggregator>
Channel
s into one.
The Channel
s must also all share the same voxel-data-type, which also forms the
aggregated type.
Constructor and Description |
---|
ChannelAggregator() |
Modifier and Type | Method and Description |
---|---|
void |
addChannel(Channel channel,
Logger logger)
Adds a
Channel to the aggregation. |
protected abstract void |
addChannelAfterCheck(Channel channel)
Adds a
Channel to the aggregation - after checking channel has acceptable
dimensions. |
Channel |
aggregatedChannel()
Retrieve or create a
Channel with containing the aggregated values. |
protected abstract Optional<Dimensions> |
existingDimensions()
The
Dimensions to use for the aggregation. |
protected Dimensions |
maybeDropResolution(Dimensions dimensions)
Removes the
Resolution component in Dimensions . |
protected abstract Channel |
retrieveCreateAggregatedChannel()
Retrieve or create an aggregated-channel of type
outputType . |
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
public void addChannel(Channel channel, Logger logger) throws OperationFailedException
Channel
to the aggregation.channel
- the channel to add.logger
- the logger to output warning messages to.OperationFailedException
- if the dimensions do not match existing channels that were
previously added.public Channel aggregatedChannel() throws OperationFailedException
Channel
with containing the aggregated values.OperationFailedException
- if not channels have been addded, so no mean exists.protected abstract Optional<Dimensions> existingDimensions()
Dimensions
to use for the aggregation.addChannel(Channel, Logger)
has
occurred, otherwise Optional.empty()
.protected abstract void addChannelAfterCheck(Channel channel) throws OperationFailedException
Channel
to the aggregation - after checking channel
has acceptable
dimensions.channel
- the channel to add, guaranteed to have identical dimensions to any previous
call to addChannel(Channel, Logger)
.OperationFailedException
- if the dimensions do not match existing channels that were
previously added.protected abstract Channel retrieveCreateAggregatedChannel()
outputType
.
This channel is the result of the aggregation operation.
Channel
, either as already exists internally, or newly created.protected Dimensions maybeDropResolution(Dimensions dimensions)
Resolution
component in Dimensions
.dimensions
- to maybe remove resolution from.dimensions
unchanged when ignoreResolution==false
, otherwise dimensions
without any resolution specified.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.