Interface DisplaySettings.Builder
- All Known Subinterfaces:
DisplaySettings.DisplaySettingsBuilder
- Enclosing interface:
DisplaySettings
public static interface DisplaySettings.Builder
Builder for DisplaySettings. Get an instance using the
DisplayManager displaySettingsBuilder()
method or by using one of the copy() methods of an existing DisplaySettings instance.-
Method Summary
Modifier and TypeMethodDescriptionautoscaleIgnoredPercentile(double percentile) autoscaleIgnoredQuantile(double quantile) autoscaleIgnoringZeros(boolean ignoreZeros) autostretch(boolean enable) Whether to continuously apply autoscale.build()channel(int channel) Increases the number of ChannelDisplaySettings in this Builder to the given number.channel(int channel, ChannelDisplaySettings settings) Sets the ChannelDisplaySettings for the given channel.channels(Iterable<ChannelDisplaySettings> channelSettings) Replaces ChannelDisplaySettings with those given.Color mode or lookup table for displaying the image.getChannelSettings(int channel) Returns the ChannelDisplaySettings for the given channel number.intNumber of ChannelDisplaySettings in this builder.histogramLogarithmic(boolean histogramLogarithmic) Whether the histogram should be shown with a logarithmic (true) or linear (false) y-axis.Sets the intensity scaling (min/max) for all channels and components in one call.playbackFPS(double fps) roiAutoscale(boolean enable) uniformChannelScaling(boolean enable) Whether to use the same intensity scaling for every channel.zoomRatio(double ratio)
-
Method Details
-
zoomRatio
-
playbackFPS
-
colorMode
Color mode or lookup table for displaying the image.- Parameters:
mode- ColorMode to appply- Returns:
- Builder
-
colorModeComposite
DisplaySettings.Builder colorModeComposite() -
colorModeGrayscale
DisplaySettings.Builder colorModeGrayscale() -
colorModeSingleColor
DisplaySettings.Builder colorModeSingleColor() -
colorModeHighlightSaturated
DisplaySettings.Builder colorModeHighlightSaturated() -
uniformChannelScaling
Whether to use the same intensity scaling for every channel.- Parameters:
enable- flag- Returns:
- Builder
-
autostretch
Whether to continuously apply autoscale.- Parameters:
enable- flag- Returns:
- Builder
-
roiAutoscale
-
autoscaleIgnoredQuantile
-
autoscaleIgnoredPercentile
-
autoscaleIgnoringZeros
-
histogramLogarithmic
Whether the histogram should be shown with a logarithmic (true) or linear (false) y-axis.- Parameters:
histogramLogarithmic- true when y-axis should be logarithmic.- Returns:
- builder instance
-
channel
Increases the number of ChannelDisplaySettings in this Builder to the given number. DefaultSettings for each channel will be added.- Parameters:
channel- Final number of ChannelDisplaySettings- Returns:
- builder instance to enable chaining commands
-
channel
Sets the ChannelDisplaySettings for the given channel. If the number of ChannelDisplaySettings is smaller than the given channel number, "missing" channels will be added (using Default Display Settings).- Parameters:
channel- Indicates the number of the channel for which to set the DisplaySettings- Returns:
- builder instance to enable chaining commands
-
channels
Replaces ChannelDisplaySettings with those given. If provided with null or an empty list, current ChannelDisplaySettings will be removed.- Parameters:
channelSettings- iterable with ChannelDisplaySettings to replace the current ones. Can be empty or null, in which case ChannelDisplaySettings will be removed from this builder.- Returns:
- builder instance to enable chaining commands
-
intensityScaling
Sets the intensity scaling (min/max) for all channels and components in one call.This is a convenience alternative to calling
channel(int, ChannelDisplaySettings)once per channel. Only min and max are transferred per component; gamma values already set on existing component settings are preserved.- Parameters:
ranges- per-channel, per-component intensity ranges for the whole display- Returns:
- this builder
-
getNumberOfChannels
int getNumberOfChannels()Number of ChannelDisplaySettings in this builder. Not sure why a builder needs this...- Returns:
- Number of ChannelDisplaySettings in this Builder.
-
getChannelSettings
Returns the ChannelDisplaySettings for the given channel number. If this, or any channel with lower number, does not exist, it will be created, and filled with DefaultChannelDisplaySettings.- Parameters:
channel- Number (index) of the requested channel- Returns:
- ChannelDisplaySettings for the requested channel.
-
build
DisplaySettings build()
-