Interface DisplayIntensityRanges


public interface DisplayIntensityRanges
The intensity (brightness/contrast) scaling ranges for all channels and components of a display.

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:
  • Method Details

    • builder

      Returns a new builder with no channels or components set (all defaults).
      Returns:
      new 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 index
      component - 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 index
      component - zero-based component index
      Returns:
      maximum intensity; Long.MAX_VALUE if not explicitly set, meaning "use the full camera bit-depth range"
    • getComponentRange

      ComponentIntensityRange getComponentRange(int channel, int component)
      Returns the range for the given channel and component as a ComponentIntensityRange.
      Parameters:
      channel - zero-based channel index
      component - zero-based component index
      Returns:
      range for that channel/component; returns a default range if out of bounds
    • getChannelRanges

      ChannelIntensityRanges getChannelRanges(int channel)
      Returns the ChannelIntensityRanges for the given channel.
      Parameters:
      channel - zero-based channel index
      Returns:
      channel ranges; returns a default (empty) instance if out of bounds
    • getAllComponentRanges

      List<ComponentIntensityRange> getAllComponentRanges(int channel)
      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

      List<Long> getComponentMinima(int channel)
      Returns the minimum values for all explicitly-set components of the given channel.
      Parameters:
      channel - zero-based channel index
      Returns:
      list of minimum values, one per component
    • getComponentMaxima

      List<Long> getComponentMaxima(int channel)
      Returns the maximum values for all explicitly-set components of the given channel.
      Parameters:
      channel - zero-based channel index
      Returns:
      list of maximum values, one per component
    • getAllChannelRanges

      List<ChannelIntensityRanges> getAllChannelRanges()
      Returns all channel ranges as a list.
      Returns:
      list of ChannelIntensityRanges, one per channel