Interface ComponentDisplaySettings
public interface ComponentDisplaySettings
Certain cameras (such as RGB cameras) can produce images where each pixel has multiple
components. This interface determines how these components should be displayed.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceInterface for ComponentDisplaySettings Builder. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default doubleScaling maximum as a pixel value, whichever range is in effect.default doubleScaling minimum as a pixel value, whichever range is in effect.default doubleReturns the scaling maximum as an actual pixel value, for floating point images.default doubleReturns the scaling minimum as an actual pixel value, for floating point images.doublelonglongdefault booleanReturns whether a floating point scaling range has been set.
-
Method Details
-
getScalingMinimum
long getScalingMinimum() -
getScalingMaximum
long getScalingMaximum() -
getFloatScalingMinimum
default double getFloatScalingMinimum()Returns the scaling minimum as an actual pixel value, for floating point images.The default implementation reports no float scaling, so that implementations written before float scaling existed keep compiling.
- Returns:
- pixel value, or
Double.NaNif no float scaling has been set - See Also:
-
getFloatScalingMaximum
default double getFloatScalingMaximum()Returns the scaling maximum as an actual pixel value, for floating point images.- Returns:
- pixel value, or
Double.NaNif no float scaling has been set - See Also:
-
hasFloatScaling
default boolean hasFloatScaling()Returns whether a floating point scaling range has been set.When false, callers displaying float images should fall back to deriving a range from the image statistics.
- 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
-
getEffectiveScalingMinimum
default double getEffectiveScalingMinimum()Scaling minimum as a pixel value, whichever range is in effect.Returns the float range when one is set, and otherwise the long-valued range widened to a double. Use this rather than
getScalingMinimum()anywhere the value feeds a renderer or a file, so that float images are handled correctly without every caller having to branch onhasFloatScaling().- Returns:
- the scaling minimum
-
getEffectiveScalingMaximum
default double getEffectiveScalingMaximum()Scaling maximum as a pixel value, whichever range is in effect.- Returns:
- the scaling maximum
- See Also:
-
getScalingGamma
double getScalingGamma() -
copyBuilder
ComponentDisplaySettings.Builder copyBuilder() -
builder
-