public class UpperLowerQuantileIntensityFromHistogram extends Object implements ChannelConverterAttached<Histogram,UnsignedByteBuffer>
Channel
to UnsignedByteBuffer
by scaling against lower and upper
quantiles of the intensity values from a corresponding histogram.
A scaling-factor may also be applied to each limit.
Specifically, the range is from scaleLower * calculate_quantile(intensity,
quantileLower)
to scaleUpper * calculate_quantile(intensity, quantileUpper)
across all
voxels.
Constructor and Description |
---|
UpperLowerQuantileIntensityFromHistogram(double quantileLower,
double quantileUpper)
Scale with quantile values for the lower and upper boundaries - without any scaling factors.
|
UpperLowerQuantileIntensityFromHistogram(double quantileLower,
double quantileUpper,
double scaleLower,
double scaleUpper)
Scale with quantile values for the lower and upper boundaries - with explicit scaling
factors.
|
Modifier and Type | Method and Description |
---|---|
void |
attachObject(Histogram histogram)
Associate the convert with a particular object.
|
Channel |
convert(Channel channel,
ConversionPolicy changeExisting)
Converts the voxel-type in a
Channel . |
VoxelsConverter<UnsignedByteBuffer> |
getVoxelsConverter()
Converts voxels to have type voxel-type
T . |
public UpperLowerQuantileIntensityFromHistogram(double quantileLower, double quantileUpper)
quantileLower
- quantile that defines the lower boundary.quantileUpper
- quantile that defines the upper boundary.public UpperLowerQuantileIntensityFromHistogram(double quantileLower, double quantileUpper, double scaleLower, double scaleUpper)
quantileLower
- quantile that defines the lower boundary.quantileUpper
- quantile that defines the upper boundary.scaleLower
- scaling factor for the lower boundary.scaleUpper
- scaling factor for the upper boundary.public void attachObject(Histogram histogram) throws OperationFailedException
ChannelConverterAttached
attachObject
in interface ChannelConverterAttached<Histogram,UnsignedByteBuffer>
histogram
- the object to associate the converter with.OperationFailedException
- if the association cannot be completed successfully.public Channel convert(Channel channel, ConversionPolicy changeExisting)
ChannelConverterAttached
Channel
.convert
in interface ChannelConverterAttached<Histogram,UnsignedByteBuffer>
channel
- the channel whose voxels will be converted.changeExisting
- if ture, the are voxels in-place, preserving the existing Channel
object. Otherwise a new Channel
is created.Channel
or newly created one, as per above.public VoxelsConverter<UnsignedByteBuffer> getVoxelsConverter()
ChannelConverterAttached
T
.getVoxelsConverter
in interface ChannelConverterAttached<Histogram,UnsignedByteBuffer>
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.