Interface ComponentIntensityRange
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, green, blue).
This interface is a simple min/max pair. It is used as a data-transfer object
when building display settings via
ComponentDisplaySettings.Builder.scalingRange(ComponentIntensityRange),
ChannelIntensityRanges.Builder.componentRange(int, ComponentIntensityRange), and
related methods. It does not carry gamma; for that, use ComponentDisplaySettings
directly.
Instances are immutable. Use builder() or copyBuilder() to
construct one.
Default values: a freshly built instance (no setters called) has
minimum = 0 and maximum = Long.MAX_VALUE.
Long.MAX_VALUE is a sentinel meaning "use the full camera bit-depth range."
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Returns a new builder with default values (min=0,max=Long.MAX_VALUE).Returns a builder pre-populated with this instance's values.default doubleReturns the maximum as an actual pixel value, for floating point images.default doubleReturns the minimum as an actual pixel value, for floating point images.longReturns the maximum intensity (white point).longReturns the minimum intensity (black point).default booleanReturns whether a floating point range has been set.
-
Method Details
-
builder
Returns a new builder with default values (min=0,max=Long.MAX_VALUE).- Returns:
- new builder
-
copyBuilder
ComponentIntensityRange.Builder copyBuilder()Returns a builder pre-populated with this instance's values.- Returns:
- copy builder
-
getMinimum
long getMinimum()Returns the minimum intensity (black point).- Returns:
- minimum intensity; 0 when not explicitly set
-
getMaximum
long getMaximum()Returns the maximum intensity (white point).- Returns:
- maximum intensity;
Long.MAX_VALUEwhen not explicitly set, which means "use the full camera bit-depth range"
-
getFloatMinimum
default double getFloatMinimum()Returns the minimum as an actual pixel value, for floating point images.The default implementation reports no float range, so that implementations written before the float range existed keep compiling.
- Returns:
- pixel value, or
Double.NaNif no float range has been set - See Also:
-
getFloatMaximum
default double getFloatMaximum()Returns the maximum as an actual pixel value, for floating point images.- Returns:
- pixel value, or
Double.NaNif no float range has been set - See Also:
-
hasFloatRange
default boolean hasFloatRange()Returns whether a floating point range has been set.- Returns:
- true if both bounds are set and the maximum is strictly above the minimum; an empty or inverted range counts as unset, since it cannot be displayed
-