public class IfVoxelZero extends ChannelProviderUnary
channel
is non-zero, then the corresponding output is channel
.
channel
is zero, then the corresponding output is channelIfVoxelZero
.
The two channels must be the same size.
Neither channel's input is changed. The operation is immutable.
Constructor and Description |
---|
IfVoxelZero() |
Modifier and Type | Method and Description |
---|---|
Channel |
createFromChannel(Channel channel)
Creates a
Channel given the entity provided by the delegate. |
ChannelProvider |
getChannelIfVoxelZero()
If a pixel is zero in the input-channel, the output is formed from the corresponding pixel in
this channel instead
|
static Channel |
mergeViaZeroCheck(Channel channel,
Channel channelIfPixelZero,
VoxelDataType combinedType,
double multiplierIfNonZero)
Creates a new channel which is a merged version of two input channels according to rules.
|
void |
setChannelIfVoxelZero(ChannelProvider channelIfVoxelZero)
If a pixel is zero in the input-channel, the output is formed from the corresponding pixel in
this channel instead
|
get, getChannel, setChannel
getAsStack
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized, onInitialization
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
public Channel createFromChannel(Channel channel) throws ProvisionFailedException
ChannelProviderUnary
Channel
given the entity provided by the delegate.createFromChannel
in class ChannelProviderUnary
channel
- the entity provided by the delegate.Channel
that is returned by the provider.ProvisionFailedException
- if the provider cannot complete successfully.public static Channel mergeViaZeroCheck(Channel channel, Channel channelIfPixelZero, VoxelDataType combinedType, double multiplierIfNonZero)
channel
is non-zero, then the corresponding output is channel * multFactorIfNonZero
channel
is zero, then the corresponding output is channelIfPixelZero
Assumes the two channels are of the same size, but does not check.
Neither channel's input is changed. The operation is immutable.
channel
- the channel that is checked to be zero/non-zero, and whose pixels form the
output (maybe multipled) if non-zero.channelIfPixelZero
- the channel that forms the output if channel
is zero.combinedType
- the type to use for the newly created channel.multiplierIfNonZero
- the multiplier to apply on non-zero pixels.public ChannelProvider getChannelIfVoxelZero()
public void setChannelIfVoxelZero(ChannelProvider channelIfVoxelZero)
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.