Interface DisplayIntensityRanges
This interface aggregates ChannelIntensityRanges objects, one per channel,
into a single value object. It is used as a bulk convenience argument to
DisplaySettings.Builder.intensityScaling(DisplayIntensityRanges), which applies
all channel ranges in one call instead of setting each channel individually.
Each channel in turn holds per-component ranges (see ChannelIntensityRanges).
For a grayscale display with multiple channels each channel has one component;
for an RGB image each channel has three components (red=0, green=1, blue=2).
Note: this interface is write-only in the sense that
DisplaySettings does not expose a corresponding getIntensityScaling()
getter; ranges are stored inside the per-channel / per-component
ComponentDisplaySettings accessible via
DisplaySettings.getChannelSettings(int) →
ChannelDisplaySettings.getComponentSettings(int).
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 channels or components set (all defaults).Returns a builder pre-populated with all channel ranges from this instance.Returns all channel ranges as a list.getAllComponentRanges(int channel) Returns all explicitly-set component ranges for the given channel as a list.intgetChannelNumberOfComponents(int channel) Returns the number of components for which ranges have been explicitly set in the given channel.getChannelRanges(int channel) Returns theChannelIntensityRangesfor the given channel.getComponentMaxima(int channel) Returns the maximum values for all explicitly-set components of the given channel.longgetComponentMaximum(int channel, int component) Returns the maximum intensity (white point) for the given channel and component.getComponentMinima(int channel) Returns the minimum values for all explicitly-set components of the given channel.longgetComponentMinimum(int channel, int component) Returns the minimum intensity (black point) for the given channel and component.getComponentRange(int channel, int component) Returns the range for the given channel and component as aComponentIntensityRange.intReturns the number of channels for which ranges have been set.
-
Method Details
-
builder
Returns a new builder with no channels or components set (all defaults).- Returns:
- new builder
-
copyBuilder
DisplayIntensityRanges.Builder copyBuilder()Returns a builder pre-populated with all channel ranges from this instance.- Returns:
- copy builder
-
getNumberOfChannels
int getNumberOfChannels()Returns the number of channels for which ranges have been set.- Returns:
- number of channels
-
getChannelNumberOfComponents
int getChannelNumberOfComponents(int channel) Returns the number of components for which ranges have been explicitly set in the given channel.- Parameters:
channel- zero-based channel index- Returns:
- number of explicitly-set components; may be 0
-
getComponentMinimum
long getComponentMinimum(int channel, int component) Returns the minimum intensity (black point) for the given channel and component.- Parameters:
channel- zero-based channel indexcomponent- zero-based component index- Returns:
- minimum intensity; 0 if not explicitly set
-
getComponentMaximum
long getComponentMaximum(int channel, int component) Returns the maximum intensity (white point) for the given channel and component.- Parameters:
channel- zero-based channel indexcomponent- zero-based component index- Returns:
- maximum intensity;
Long.MAX_VALUEif not explicitly set, meaning "use the full camera bit-depth range"
-
getComponentRange
Returns the range for the given channel and component as aComponentIntensityRange.- Parameters:
channel- zero-based channel indexcomponent- zero-based component index- Returns:
- range for that channel/component; returns a default range if out of bounds
-
getChannelRanges
Returns theChannelIntensityRangesfor the given channel.- Parameters:
channel- zero-based channel index- Returns:
- channel ranges; returns a default (empty) instance if out of bounds
-
getAllComponentRanges
Returns all explicitly-set component ranges for the given channel as a list.- Parameters:
channel- zero-based channel index- Returns:
- list of size
getChannelNumberOfComponents(int)
-
getComponentMinima
-
getComponentMaxima
-
getAllChannelRanges
List<ChannelIntensityRanges> getAllChannelRanges()Returns all channel ranges as a list.- Returns:
- list of
ChannelIntensityRanges, one per channel
-