Class ProjectableBufferAggregator<T>
- Type Parameters:
T- buffer type used for aggregationUnsignedByteBufferetc.
- Direct Known Subclasses:
MaxProjection,MeanProjection,MinProjection,StandardDeviationProjection
An aggregator that calculates the aggregation of every voxel across successive channels
via a
ProjectableBuffer.
This is achieved by maintaining a running sum for each voxel, and a total count of how many images were added.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddChannelAfterCheck(Channel channel) Adds aChannelto the aggregation - after checkingchannelhas acceptable dimensions.protected abstract ProjectableBuffer<T> create(VoxelDataType dataType, Extent extent) Creates theProjectableBufferused for aggregation.protected Optional<Dimensions> TheDimensionsto use for the aggregation.protected ChannelRetrieve or create an aggregated-channel of typeoutputType.Methods inherited from class org.anchoranalysis.image.bean.channel.ChannelAggregator
addChannel, aggregatedChannel, maybeDropResolutionMethods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
ProjectableBufferAggregator
public ProjectableBufferAggregator()
-
-
Method Details
-
existingDimensions
Description copied from class:ChannelAggregatorTheDimensionsto use for the aggregation.- Specified by:
existingDimensionsin classChannelAggregator- Returns:
- the dimensions, if at least one call to
ChannelAggregator.addChannel(Channel, Logger)has occurred, otherwiseOptional.empty().
-
addChannelAfterCheck
Description copied from class:ChannelAggregatorAdds aChannelto the aggregation - after checkingchannelhas acceptable dimensions.- Specified by:
addChannelAfterCheckin classChannelAggregator- Parameters:
channel- the channel to add, guaranteed to have identical dimensions to any previous call toChannelAggregator.addChannel(Channel, Logger).- Throws:
OperationFailedException- if the dimensions do not match existing channels that were previously added.
-
retrieveCreateAggregatedChannel
Description copied from class:ChannelAggregatorRetrieve or create an aggregated-channel of typeoutputType.This channel is the result of the aggregation operation.
- Specified by:
retrieveCreateAggregatedChannelin classChannelAggregator- Returns:
- a
Channel, either as already exists internally, or newly created.
-
create
protected abstract ProjectableBuffer<T> create(VoxelDataType dataType, Extent extent) throws OperationFailedException Creates theProjectableBufferused for aggregation.- Parameters:
dataType- the data-type to use for the aggregated channel.extent- the size of the aggregated channel.- Returns:
- a newly created
ProjectableBufferof specified type and size. - Throws:
OperationFailedException- if a buffer-type is unsupported.
-