Interface ChannelIntensityRanges
A "component" is one scalar channel within a pixel: for a grayscale image there is one component; for an RGB image there are three (red=0, green=1, blue=2).
This interface groups per-component ComponentIntensityRange objects for a
single image channel. It is used as a convenience argument to
ChannelDisplaySettings.Builder.intensityScaling(ChannelIntensityRanges), which
applies all component ranges in one call instead of building a separate
ComponentDisplaySettings per component.
Note: this interface is write-only in the sense that
ChannelDisplaySettings does not expose a getIntensityScaling() getter;
the ranges are stored inside the per-component ComponentDisplaySettings accessible
via ChannelDisplaySettings.getComponentSettings(int).
Default values: components that have not been explicitly set return
minimum = 0 and maximum = Long.MAX_VALUE (full camera range).
getNumberOfComponents() returns 0 when no components have been explicitly set.
Instances are immutable. Use builder() or copyBuilder() to
construct one.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Returns a new builder with no components set (all defaults).Returns a builder pre-populated with this instance's component ranges.Returns all explicitly-set component ranges as a list.Returns the maximum values for all explicitly-set components.longgetComponentMaximum(int component) Returns the maximum intensity (white point) for the given component.Returns the minimum values for all explicitly-set components.longgetComponentMinimum(int component) Returns the minimum intensity (black point) for the given component.getComponentRange(int component) Returns the range for the given component as aComponentIntensityRange.intReturns the number of components for which a range has been explicitly set.
-
Method Details
-
builder
Returns a new builder with no components set (all defaults).- Returns:
- new builder
-
copyBuilder
ChannelIntensityRanges.Builder copyBuilder()Returns a builder pre-populated with this instance's component ranges.- Returns:
- copy builder
-
getNumberOfComponents
int getNumberOfComponents()Returns the number of components for which a range has been explicitly set.Components beyond this index return default values (min=0, max=Long.MAX_VALUE). May return 0 if no ranges have been set.
- Returns:
- number of explicitly-set components
-
getComponentMinimum
long getComponentMinimum(int component) Returns the minimum intensity (black point) for the given component.- Parameters:
component- zero-based component index- Returns:
- minimum intensity; 0 if not explicitly set or index out of range
-
getComponentMaximum
long getComponentMaximum(int component) Returns the maximum intensity (white point) for the given component.- Parameters:
component- zero-based component index- Returns:
- maximum intensity;
Long.MAX_VALUEif not explicitly set or index out of range, meaning "use the full camera bit-depth range"
-
getComponentRange
Returns the range for the given component as aComponentIntensityRange.- Parameters:
component- zero-based component index- Returns:
- range for that component; returns a default range if index is out of bounds
-
getAllComponentRanges
List<ComponentIntensityRange> getAllComponentRanges()Returns all explicitly-set component ranges as a list.- Returns:
- list of size
getNumberOfComponents()
-
getComponentMinima
-
getComponentMaxima
-