Class PathPrefs
Most of these are 'persistent', and stored in a platform-dependent way using Java's Preferences API.
- Author:
- Pete Bankhead
-
Property Summary
TypePropertyDescriptionstatic DoubleProperty
The minimum positive percentage of cells for Allred proportion score to be non-zero.static BooleanProperty
Always paint selected objects in the viewer, even if the opacity setting is 0.static DoubleProperty
Preferred stroke thickness to use when drawing annotation ROIs.static DoubleProperty
Controls percentage of saturated pixels to apply when automatically setting brightness/contrast.static ObjectProperty
<PathClass> Classification that should automatically be applied to all new annotations.Check for updates when launching QuPath, if possible.static BooleanProperty
Create new objects by default when drawing with the Brush tool.static IntegerProperty
Default brush tool diameter, in pixels.static BooleanProperty
Optionally scale the default brush tool diameter by the viewer magnification (downsample value).static BooleanProperty
Request ROIs to be clipped and inserted as the right place in the hierarchy when drawing (to prevent overlapping ROIs being created accidentally).static IntegerProperty
The default color used to display objects of any type, where a default has not otherwise been specified.static IntegerProperty
The default color used to display selected objects.static IntegerProperty
The default color used to display tile objects.static IntegerProperty
The default color used to display missing TMA core objects.static IntegerProperty
The default color used to display TMA core objects.static ObjectProperty
<Locale> Get a property for setting the defaultLocale
forLocale.Category.DISPLAY
.static ObjectProperty
<Locale> Get a property for setting the defaultLocale
forLocale.Category.FORMAT
.static ObjectProperty
<Locale> Get a property for setting the defaultLocale
.static DoubleProperty
Preferred stroke thickness to use when drawing detections ROIs.Define how detections should be displayed in lists and tree views.static BooleanProperty
Request a log file to be generated.static BooleanProperty
Request that double-clicking the viewer can be used to zoom in.static BooleanProperty
Enable polygon/polyline tools to support 'freehand' mode; this means that if the ROI is started by dragging, then it will end by lifting the mouse (rather than requiring a double-click).static BooleanProperty
Define counting grid optionally displayed on any viewer using microns rather than pixel coordinates.static DoubleProperty
Horizontal spacing between lines for any counting grid.static DoubleProperty
Vertical spacing between lines for any counting grid.static DoubleProperty
Starting x coordinate for any counting grid (usually 0).static DoubleProperty
Starting y coordinate for any counting grid (usually 0).Specify how setting the image type should be handled for images when they are opened for the first time.static BooleanProperty
Invert the scrolling direction of the mouse applied to the viewer.static BooleanProperty
Invert the z-slider for the viewer.static BooleanProperty
Retain display settings (channel colors, brightness/contrast) when opening new images that have the same properties (channels, channel names, bit-depths).static ObjectProperty
<PathPrefs.FontSize> Preferred font size for the location text in the viewer.static BooleanProperty
Request that image names are hidden within the user interface.static IntegerProperty
Get property representing the maximum memory for the Java Virtual Machine, applied after restarting the application.static IntegerProperty
The maximum number of objects that can be copied to the system clipboard.static IntegerProperty
The requested maximum number of objects in a hierarchy for which QuPath should support undo/redo.static IntegerProperty
The requested maximum number of undo levels that QuPath should support.static IntegerProperty
Minimum image width or height before pyramidalizing (if required).static BooleanProperty
Create multiple points within the same annotation when using the counting tool.static BooleanProperty
Apply acceleration/deceleration effects when holding and releasing navigation key.static IntegerProperty
Percentage to scale navigation speed.static IntegerProperty
Property specifying the preferred number of threads QuPath should use for multithreaded commands.static BooleanProperty
Specify whether the bounding box of selected objects should be painted.static IntegerProperty
Radius of the circle used to draw individual points in a point annotation (in pixels).static BooleanProperty
Request that the GUI returns to using the PAN tool after a ROI is drawn.static ObjectProperty
<PathPrefs.FontSize> Preferred font size for the scalebar in the viewer.static ObjectProperty
<FontWeight> Preferred font weight in the viewer.static DoubleProperty
Preferred line width for the scalebar.static StringProperty
Path to a directory containing scripts for quick-access through the user interface.static IntegerProperty
Percentage to scale scroll speed for zooming etc.static BooleanProperty
Convert drawing tools to select objects, rather than creating new objects.static BooleanProperty
Flag to indicate that menu items marked 'experimental' should be shown to the user.static BooleanProperty
Property specifying if QuPath should show the image title in the main window title.static BooleanProperty
Flag to indicate that the legacy options should be shown to the user - normally not desirable.static BooleanProperty
Specify whether measurement tables should show object IDs by default or not.static BooleanProperty
Specify whether measurement tables should show thumbnail images by default or not.static BooleanProperty
Show the convex hull for point annotations within the viewer.static BooleanProperty
Show a startup message when QuPath is launched.static BooleanProperty
Flag to indicate that the TMA menu should be shown to the user - only relevant when working with Tissue Microarrays.static BooleanProperty
Show badges on the toolbar, e.g.static BooleanProperty
Skip ('jump over') missing cores when navigating through TMA grids.static StringProperty
Path to a startup script that should be run immediately after QuPath's launch.static StringProperty
Delimiter to use when exporting tables.static DoubleProperty
Requested percentage of available memory to use for tile caching.static DoubleProperty
Default downsample factor to use when exporting TMA cores.static BooleanProperty
Show the cursor location on a viewer in calibrated units, rather than pixels.static BooleanProperty
If true, pixels should be snapped to integer coordinates when using the drawing tools.static BooleanProperty
Support rotate gestures for touchscreens and trackpads.static ObjectProperty
<String> A path where additional files may be stored, such as extensions and log files.static BooleanProperty
Support scroll gestures for touchscreens and trackpads.static BooleanProperty
Use a specified color for highlighting selected objects in the viewer.static BooleanProperty
Deprecated.static BooleanProperty
Request that the brush tool automatically uses any available tiles, rather than creating 'circles' as normal.static BooleanProperty
Support zoom gestures for touchscreens and trackpads.static IntegerProperty
Color to paint behind any image.static DoubleProperty
Requested gamma value applied to the image in each viewer (for display only).static BooleanProperty
Request that images are displayed in viewers using bilinear interpolation. -
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Options for automatic updating checking of QuPath and/or extensions.static enum
Enum for different ways that detections can be displayed in lists and trees.static enum
Enum to control font size.static enum
Enum defining how setting the image type should be handled for new images. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic DoubleProperty
The minimum positive percentage of cells for Allred proportion score to be non-zero.static BooleanProperty
Always paint selected objects in the viewer, even if the opacity setting is 0.static DoubleProperty
Preferred stroke thickness to use when drawing annotation ROIs.static DoubleProperty
Controls percentage of saturated pixels to apply when automatically setting brightness/contrast.static ObjectProperty
<PathClass> Classification that should automatically be applied to all new annotations.Check for updates when launching QuPath, if possible.static BooleanProperty
Create new objects by default when drawing with the Brush tool.static IntegerProperty
Default brush tool diameter, in pixels.static BooleanProperty
Optionally scale the default brush tool diameter by the viewer magnification (downsample value).static BooleanProperty
Request ROIs to be clipped and inserted as the right place in the hierarchy when drawing (to prevent overlapping ROIs being created accidentally).static IntegerProperty
The default color used to display objects of any type, where a default has not otherwise been specified.static IntegerProperty
The default color used to display selected objects.static IntegerProperty
The default color used to display tile objects.static IntegerProperty
The default color used to display missing TMA core objects.static IntegerProperty
The default color used to display TMA core objects.static BooleanProperty
createPersistentPreference
(String name, boolean defaultValue) Create a persistent property, which is one that will be saved to/reloaded from the user preferences.static DoubleProperty
createPersistentPreference
(String name, double defaultValue) Create a persistent property, which is one that will be saved to/reloaded from the user preferences.static IntegerProperty
createPersistentPreference
(String name, int defaultValue) Create a persistent property, which is one that will be saved to/reloaded from the user preferences.static LongProperty
createPersistentPreference
(String name, long defaultValue) Create a persistent property, which is one that will be saved to/reloaded from the user preferences.static StringProperty
createPersistentPreference
(String name, String defaultValue) Create a persistent property, which is one that will be saved to/reloaded from the user preferences.static <T extends Enum<T>>
ObjectProperty<T> createPersistentPreference
(String name, T defaultValue, Class<T> enumType) Create a persistent property, which is one that will be saved to/reloaded from the user preferences.static <T> ObjectProperty
<T> createPersistentPreference
(String name, T defaultValue, Function<T, String> serializer, Function<String, T> deserializer) Create a persistent property representing any object serializable as a String, which will be saved to/reloaded from the user preferences.static ObjectProperty
<Locale> Get a property for setting the defaultLocale
forLocale.Category.DISPLAY
.static ObjectProperty
<Locale> Get a property for setting the defaultLocale
forLocale.Category.FORMAT
.static ObjectProperty
<Locale> Get a property for setting the defaultLocale
.static DoubleProperty
Preferred stroke thickness to use when drawing detections ROIs.Define how detections should be displayed in lists and tree views.static BooleanProperty
Request a log file to be generated.static BooleanProperty
Request that double-clicking the viewer can be used to zoom in.static BooleanProperty
Enable polygon/polyline tools to support 'freehand' mode; this means that if the ROI is started by dragging, then it will end by lifting the mouse (rather than requiring a double-click).static void
exportPreferences
(OutputStream stream) Export preferences to a stream.static Path
Try to get the path to the config file.static Path
Get the default location for extensions.static boolean
Get whether to apply the navigation acceleration (& deceleration) effects or not.static ObservableList
<URI> Get a list of the most recent projects that were opened.static ObservableList
<URI> Get a list of the most recent scripts that were opened.static double
Get navigation speed scaled as a proportion and forced to be in the range 0-1.static double
Get scroll speed scaled as a proportion and forced to be in the range 0-1.static String
File extension used for serialization of ImageData (without the dot)static boolean
Request that all available color transforms are shown for RGB images.static boolean
Return whether the viewer skips missing TMA cores when navigating TMA grids with arrow keys.static Preferences
Deprecated.static BooleanProperty
Define counting grid optionally displayed on any viewer using microns rather than pixel coordinates.static DoubleProperty
Horizontal spacing between lines for any counting grid.static DoubleProperty
Vertical spacing between lines for any counting grid.static DoubleProperty
Starting x coordinate for any counting grid (usually 0).static DoubleProperty
Starting y coordinate for any counting grid (usually 0).static boolean
Attempt to load user JVM defaults - may fail if packager.jar (and any required native library) isn't found.Specify how setting the image type should be handled for images when they are opened for the first time.static void
importPreferences
(InputStream stream) Import preferences from a stream.static BooleanProperty
Invert the scrolling direction of the mouse applied to the viewer.static BooleanProperty
Invert the z-slider for the viewer.static BooleanProperty
Retain display settings (channel colors, brightness/contrast) when opening new images that have the same properties (channels, channel names, bit-depths).static ObjectProperty
<PathPrefs.FontSize> Preferred font size for the location text in the viewer.static BooleanProperty
Request that image names are hidden within the user interface.static IntegerProperty
Get property representing the maximum memory for the Java Virtual Machine, applied after restarting the application.static IntegerProperty
The maximum number of objects that can be copied to the system clipboard.static IntegerProperty
The requested maximum number of objects in a hierarchy for which QuPath should support undo/redo.static IntegerProperty
The requested maximum number of undo levels that QuPath should support.static IntegerProperty
Minimum image width or height before pyramidalizing (if required).static BooleanProperty
Create multiple points within the same annotation when using the counting tool.static BooleanProperty
Apply acceleration/deceleration effects when holding and releasing navigation key.static IntegerProperty
Percentage to scale navigation speed.static IntegerProperty
Property specifying the preferred number of threads QuPath should use for multithreaded commands.static BooleanProperty
Specify whether the bounding box of selected objects should be painted.static IntegerProperty
Radius of the circle used to draw individual points in a point annotation (in pixels).static void
Reset the preferences to their defaults.static BooleanProperty
Request that the GUI returns to using the PAN tool after a ROI is drawn.static boolean
Save the preferences.static ObjectProperty
<PathPrefs.FontSize> Preferred font size for the scalebar in the viewer.static ObjectProperty
<FontWeight> Preferred font weight in the viewer.static DoubleProperty
Preferred line width for the scalebar.static StringProperty
Path to a directory containing scripts for quick-access through the user interface.static IntegerProperty
Percentage to scale scroll speed for zooming etc.static BooleanProperty
Convert drawing tools to select objects, rather than creating new objects.static BooleanProperty
Flag to indicate that menu items marked 'experimental' should be shown to the user.static BooleanProperty
Property specifying if QuPath should show the image title in the main window title.static BooleanProperty
Flag to indicate that the legacy options should be shown to the user - normally not desirable.static BooleanProperty
Specify whether measurement tables should show object IDs by default or not.static BooleanProperty
Specify whether measurement tables should show thumbnail images by default or not.static BooleanProperty
Show the convex hull for point annotations within the viewer.static BooleanProperty
Show a startup message when QuPath is launched.static BooleanProperty
Flag to indicate that the TMA menu should be shown to the user - only relevant when working with Tissue Microarrays.static BooleanProperty
Show badges on the toolbar, e.g.static BooleanProperty
Skip ('jump over') missing cores when navigating through TMA grids.static StringProperty
Path to a startup script that should be run immediately after QuPath's launch.static StringProperty
Delimiter to use when exporting tables.static DoubleProperty
Requested percentage of available memory to use for tile caching.static DoubleProperty
Default downsample factor to use when exporting TMA cores.static BooleanProperty
Show the cursor location on a viewer in calibrated units, rather than pixels.static BooleanProperty
If true, pixels should be snapped to integer coordinates when using the drawing tools.static BooleanProperty
Support rotate gestures for touchscreens and trackpads.static ObjectProperty
<String> A path where additional files may be stored, such as extensions and log files.static BooleanProperty
Support scroll gestures for touchscreens and trackpads.static BooleanProperty
Use a specified color for highlighting selected objects in the viewer.static BooleanProperty
Deprecated.static BooleanProperty
Request that the brush tool automatically uses any available tiles, rather than creating 'circles' as normal.static BooleanProperty
Support zoom gestures for touchscreens and trackpads.static IntegerProperty
Color to paint behind any image.static DoubleProperty
Requested gamma value applied to the image in each viewer (for display only).static BooleanProperty
Request that images are displayed in viewers using bilinear interpolation.
-
Property Details
-
useSystemMenubar
Legacy property used to specify whether the system menubar should be used for the main QuPath stage. This should be bound bidirectionally to the corresponding property of any menubars created.- See Also:
-
numCommandThreads
Property specifying the preferred number of threads QuPath should use for multithreaded commands.- See Also:
-
showImageNameInTitle
Property specifying if QuPath should show the image title in the main window title. For privacy reasons it may be desirable to turn this off in some cases.- See Also:
-
autoUpdateCheck
Check for updates when launching QuPath, if possible.- See Also:
-
maskImageNames
Request that image names are hidden within the user interface.- See Also:
-
defaultLocale
Get a property for setting the defaultLocale
. Setting this locale impacts bothLocale.Category.FORMAT
andLocale.Category.DISPLAY
, and may trigger an update todefaultLocaleDisplayProperty()
anddefaultLocaleFormatProperty()
if these have been changed.- Since:
- v0.4.0
- See Also:
-
defaultLocaleFormat
Get a property for setting the defaultLocale
forLocale.Category.FORMAT
. Setting this property also results in the Locale being changed to match.- See Also:
-
defaultLocaleDisplay
Get a property for setting the defaultLocale
forLocale.Category.DISPLAY
. Setting this property also results in the Locale being changed to match.- See Also:
-
showStartupMessage
Show a startup message when QuPath is launched.- See Also:
-
startupScript
Path to a startup script that should be run immediately after QuPath's launch.- See Also:
-
showToolBarBadges
Show badges on the toolbar, e.g. to provide messages or warnings.- See Also:
-
maxMemoryMB
Get property representing the maximum memory for the Java Virtual Machine, applied after restarting the application.Setting this will attempt to set -Xmx by writing to a .cfg file in the home launch directory.
If successful, -Xmx will be set to the value that is specified or 512M, whichever is larger.
- See Also:
-
scrollSpeed
Percentage to scale scroll speed for zooming etc. Helps customize the viewer according to more/less enthusiastic input devices.- See Also:
-
skipMissingCores
Skip ('jump over') missing cores when navigating through TMA grids.- See Also:
-
scriptsPath
Path to a directory containing scripts for quick-access through the user interface.- See Also:
-
useTileBrush
Request that the brush tool automatically uses any available tiles, rather than creating 'circles' as normal.- See Also:
-
selectionMode
Convert drawing tools to select objects, rather than creating new objects.- See Also:
-
clipROIsForHierarchy
Request ROIs to be clipped and inserted as the right place in the hierarchy when drawing (to prevent overlapping ROIs being created accidentally).- See Also:
-
showExperimentalOptions
Flag to indicate that menu items marked 'experimental' should be shown to the user.- See Also:
-
showTMAOptions
Flag to indicate that the TMA menu should be shown to the user - only relevant when working with Tissue Microarrays.- See Also:
-
showLegacyOptions
Flag to indicate that the legacy options should be shown to the user - normally not desirable.- See Also:
-
doCreateLogFiles
Request a log file to be generated. Requires theuserPathProperty()
to be set to a directory.- See Also:
-
userPath
A path where additional files may be stored, such as extensions and log files.- See Also:
-
maxUndoLevels
The requested maximum number of undo levels that QuPath should support.- See Also:
-
maxUndoHierarchySize
The requested maximum number of objects in a hierarchy for which QuPath should support undo/redo. This is to workaround an inconvenient implementation issue, whereby trying to support undo with huge datasets could be a significant performance issue.- See Also:
-
invertScrolling
Invert the scrolling direction of the mouse applied to the viewer. This can be helpful when the scrolling direction feels unnatural... perhaps because of how the 'natural' system preference is set.- See Also:
-
invertZSlider
Invert the z-slider for the viewer. This can help if the location of the zero position seems counterintuitive.- See Also:
-
gridStartX
Starting x coordinate for any counting grid (usually 0). This depends upongridScaleMicronsProperty()
.- See Also:
-
gridStartY
Starting y coordinate for any counting grid (usually 0). This depends upongridScaleMicronsProperty()
.- See Also:
-
gridSpacingX
Horizontal spacing between lines for any counting grid. This depends upongridScaleMicronsProperty()
.- See Also:
-
gridSpacingY
Vertical spacing between lines for any counting grid. This depends upongridScaleMicronsProperty()
.- See Also:
-
gridScaleMicrons
Define counting grid optionally displayed on any viewer using microns rather than pixel coordinates.- See Also:
-
autoBrightnessContrastSaturationPercent
Controls percentage of saturated pixels to apply when automatically setting brightness/contrast.A value of 1 indicates that approximately 1% dark pixels and 1% bright pixels should be saturated.
- See Also:
-
keepDisplaySettings
Retain display settings (channel colors, brightness/contrast) when opening new images that have the same properties (channels, channel names, bit-depths).- See Also:
-
doubleClickToZoom
Request that double-clicking the viewer can be used to zoom in.- See Also:
-
imageTypeSetting
Specify how setting the image type should be handled for images when they are opened for the first time.- See Also:
-
paintSelectedBounds
Specify whether the bounding box of selected objects should be painted. This offers an alternative to showing selected objects based on color.- See Also:
-
tableDelimiter
Delimiter to use when exporting tables. Default is"\t"
. Commas should be used with caution because of potential localization trouble.- See Also:
-
showMeasurementTableThumbnails
Specify whether measurement tables should show thumbnail images by default or not.- See Also:
-
showMeasurementTableObjectIDs
Specify whether measurement tables should show object IDs by default or not.- See Also:
-
enableFreehandTools
Enable polygon/polyline tools to support 'freehand' mode; this means that if the ROI is started by dragging, then it will end by lifting the mouse (rather than requiring a double-click).- See Also:
-
useZoomGestures
Support zoom gestures for touchscreens and trackpads.- See Also:
-
useRotateGestures
Support rotate gestures for touchscreens and trackpads.- See Also:
-
useScrollGestures
Support scroll gestures for touchscreens and trackpads.- See Also:
-
brushCreateNewObjects
Create new objects by default when drawing with the Brush tool. The alternative is to append (discontinuous) regions to existing annotations.- See Also:
-
brushScaleByMag
Optionally scale the default brush tool diameter by the viewer magnification (downsample value).- See Also:
-
brushDiameter
Default brush tool diameter, in pixels.- See Also:
-
returnToMoveMode
Request that the GUI returns to using the PAN tool after a ROI is drawn. This helps keep errant clicking under control, but not permitting new ROIs to be made without explicitly activating a ROI too- See Also:
-
tileCachePercentage
Requested percentage of available memory to use for tile caching.- See Also:
-
useCalibratedLocationString
Show the cursor location on a viewer in calibrated units, rather than pixels.- See Also:
-
useSelectedColor
Use a specified color for highlighting selected objects in the viewer.- See Also:
-
showPointHulls
Show the convex hull for point annotations within the viewer.- See Also:
-
multipointTool
Create multiple points within the same annotation when using the counting tool. The alternative is to create a new annotation for each new point.- See Also:
-
tmaExportDownsample
Default downsample factor to use when exporting TMA cores.- See Also:
-
viewerGamma
Requested gamma value applied to the image in each viewer (for display only).- See Also:
-
viewerBackgroundColor
Color to paint behind any image.- See Also:
-
colorDefaultObjects
The default color used to display objects of any type, where a default has not otherwise been specified.- See Also:
-
colorSelectedObject
The default color used to display selected objects.- See Also:
-
colorTMA
The default color used to display TMA core objects.- See Also:
-
colorTMAMissing
The default color used to display missing TMA core objects.- See Also:
-
colorTile
The default color used to display tile objects.- See Also:
-
autoSetAnnotationClass
Classification that should automatically be applied to all new annotations. May be null.- See Also:
-
alwaysPaintSelectedObjects
Always paint selected objects in the viewer, even if the opacity setting is 0.- See Also:
-
viewerInterpolateBilinear
Request that images are displayed in viewers using bilinear interpolation.- See Also:
-
detectionTreeDisplayMode
Define how detections should be displayed in lists and tree views.Showing all detections can be a bad idea, since there may be serious performance issues (especially when selecting/deselecting objects on an expanded tree).
- See Also:
-
maxObjectsToClipboard
The maximum number of objects that can be copied to the system clipboard. This is to avoid accidentally putting very large amounts of data on the clipboard (causing the app to slow down or freeze), or attempting to create strings that are too long.- See Also:
-
scalebarFontSize
Preferred font size for the scalebar in the viewer.- See Also:
-
locationFontSize
Preferred font size for the location text in the viewer.- See Also:
-
scalebarFontWeight
Preferred font weight in the viewer.- See Also:
-
scalebarLineWidth
Preferred line width for the scalebar.- See Also:
-
allredMinPercentagePositive
The minimum positive percentage of cells for Allred proportion score to be non-zero. Using the strict definition, this would be 0... however for image analysis this can be very non-robust, in that it allows a single false detection to have a very high influence on the score.- See Also:
-
minPyramidDimension
Minimum image width or height before pyramidalizing (if required).- See Also:
-
pointRadius
Radius of the circle used to draw individual points in a point annotation (in pixels).- See Also:
-
detectionStrokeThickness
Preferred stroke thickness to use when drawing detections ROIs. This is defined in pixels at the full image resolution, and does not adapt to viewer magnification.- See Also:
-
annotationStrokeThickness
Preferred stroke thickness to use when drawing annotation ROIs. This is defined in pixels, scaled according to the current viewer magnification.- See Also:
-
usePixelSnapping
If true, pixels should be snapped to integer coordinates when using the drawing tools.- See Also:
-
-
Constructor Details
-
PathPrefs
public PathPrefs()
-
-
Method Details
-
useSystemMenubarProperty
Deprecated.Legacy property used to specify whether the system menubar should be used for the main QuPath stage. This should be bound bidirectionally to the corresponding property of any menubars created.- Returns:
- a bound boolean property, which is true whenever systemMenubarProperty() is set to ALL_WINDOWS.
-
exportPreferences
Export preferences to a stream. Note that this will only export preferences that have been set explicitly; some preferences may be 'missing' because their defaults were never changed. This behavior may change in the future.- Parameters:
stream
-- Throws:
IOException
BackingStoreException
- See Also:
-
importPreferences
public static void importPreferences(InputStream stream) throws IOException, InvalidPreferencesFormatException Import preferences from a stream.Note that if the plan is to re-import preferences previously exported by
exportPreferences(OutputStream)
then it may be worthwhile toresetPreferences()
first to handle the fact that preferences may not have been saved because their default values were unchanged.- Parameters:
stream
-- Throws:
IOException
InvalidPreferencesFormatException
- See Also:
-
numCommandThreadsProperty
Property specifying the preferred number of threads QuPath should use for multithreaded commands.- Returns:
-
showImageNameInTitleProperty
Property specifying if QuPath should show the image title in the main window title. For privacy reasons it may be desirable to turn this off in some cases.- Returns:
-
autoUpdateCheckProperty
Check for updates when launching QuPath, if possible.- Returns:
-
maskImageNamesProperty
Request that image names are hidden within the user interface.- Returns:
-
defaultLocaleProperty
Get a property for setting the defaultLocale
. Setting this locale impacts bothLocale.Category.FORMAT
andLocale.Category.DISPLAY
, and may trigger an update todefaultLocaleDisplayProperty()
anddefaultLocaleFormatProperty()
if these have been changed.- Returns:
- an object property to control the locale
- Since:
- v0.4.0
-
defaultLocaleFormatProperty
Get a property for setting the defaultLocale
forLocale.Category.FORMAT
. Setting this property also results in the Locale being changed to match.- Returns:
- an object property to control the display locale
-
defaultLocaleDisplayProperty
Get a property for setting the defaultLocale
forLocale.Category.DISPLAY
. Setting this property also results in the Locale being changed to match.- Returns:
- an object property to control the display locale
-
showStartupMessageProperty
Show a startup message when QuPath is launched.- Returns:
-
startupScriptProperty
Path to a startup script that should be run immediately after QuPath's launch.- Returns:
-
showToolBarBadgesProperty
Show badges on the toolbar, e.g. to provide messages or warnings.- Returns:
-
hasJavaPreferences
public static boolean hasJavaPreferences()Attempt to load user JVM defaults - may fail if packager.jar (and any required native library) isn't found.- Returns:
-
getConfigPath
Try to get the path to the config file. Editing this is sometimes needed for preferences that need to be fixed during starting, such as the java.library.path or max memory settings.- Returns:
- Throws:
IOException
URISyntaxException
-
maxMemoryMBProperty
Get property representing the maximum memory for the Java Virtual Machine, applied after restarting the application.Setting this will attempt to set -Xmx by writing to a .cfg file in the home launch directory.
If successful, -Xmx will be set to the value that is specified or 512M, whichever is larger.
- Returns:
-
getUserPreferences
Deprecated.since v0.5.0 - avoid direct use of thePreferences
object, since this may be invalidated by a call toresetPreferences()
Get thePreferences
object for storing user preferences.Note that the preferences object returned by this method must not be retained and reused, because it may be invalidated by a call to
resetPreferences()
. Rather, as far as possible other methods of this class should be used rather than accessing thePreferences
directly.- Returns:
-
savePreferences
public static boolean savePreferences()Save the preferences.- Returns:
-
resetPreferences
public static void resetPreferences()Reset the preferences to their defaults. This requires QuPath to be restarted. -
scrollSpeedProperty
Percentage to scale scroll speed for zooming etc. Helps customize the viewer according to more/less enthusiastic input devices.- Returns:
-
getScaledScrollSpeed
public static double getScaledScrollSpeed()Get scroll speed scaled as a proportion and forced to be in the range 0-1. For example, 100% becomes 1.- Returns:
-
skipMissingCoresProperty
Skip ('jump over') missing cores when navigating through TMA grids.- Returns:
- skipMissingCoresProperty
-
getSkipMissingCoresProperty
public static boolean getSkipMissingCoresProperty()Return whether the viewer skips missing TMA cores when navigating TMA grids with arrow keys.- Returns:
-
getShowAllRGBTransforms
public static boolean getShowAllRGBTransforms()Request that all available color transforms are shown for RGB images.- Returns:
-
scriptsPathProperty
Path to a directory containing scripts for quick-access through the user interface.- Returns:
-
useTileBrushProperty
Request that the brush tool automatically uses any available tiles, rather than creating 'circles' as normal.- Returns:
-
selectionModeProperty
Convert drawing tools to select objects, rather than creating new objects.- Returns:
-
clipROIsForHierarchyProperty
Request ROIs to be clipped and inserted as the right place in the hierarchy when drawing (to prevent overlapping ROIs being created accidentally).- Returns:
-
showExperimentalOptionsProperty
Flag to indicate that menu items marked 'experimental' should be shown to the user.- Returns:
-
showTMAOptionsProperty
Flag to indicate that the TMA menu should be shown to the user - only relevant when working with Tissue Microarrays.- Returns:
-
showLegacyOptionsProperty
Flag to indicate that the legacy options should be shown to the user - normally not desirable.- Returns:
-
doCreateLogFilesProperty
Request a log file to be generated. Requires theuserPathProperty()
to be set to a directory.- Returns:
-
userPathProperty
A path where additional files may be stored, such as extensions and log files.- Returns:
-
getRecentProjectList
Get a list of the most recent projects that were opened.- Returns:
-
maxUndoLevelsProperty
The requested maximum number of undo levels that QuPath should support.- Returns:
-
maxUndoHierarchySizeProperty
The requested maximum number of objects in a hierarchy for which QuPath should support undo/redo. This is to workaround an inconvenient implementation issue, whereby trying to support undo with huge datasets could be a significant performance issue.- Returns:
-
getRecentScriptsList
Get a list of the most recent scripts that were opened.- Returns:
-
invertScrollingProperty
Invert the scrolling direction of the mouse applied to the viewer. This can be helpful when the scrolling direction feels unnatural... perhaps because of how the 'natural' system preference is set.- Returns:
-
invertZSliderProperty
Invert the z-slider for the viewer. This can help if the location of the zero position seems counterintuitive.- Returns:
-
gridStartXProperty
Starting x coordinate for any counting grid (usually 0). This depends upongridScaleMicronsProperty()
.- Returns:
-
gridStartYProperty
Starting y coordinate for any counting grid (usually 0). This depends upongridScaleMicronsProperty()
.- Returns:
-
gridSpacingXProperty
Horizontal spacing between lines for any counting grid. This depends upongridScaleMicronsProperty()
.- Returns:
-
gridSpacingYProperty
Vertical spacing between lines for any counting grid. This depends upongridScaleMicronsProperty()
.- Returns:
-
gridScaleMicronsProperty
Define counting grid optionally displayed on any viewer using microns rather than pixel coordinates.- Returns:
-
autoBrightnessContrastSaturationPercentProperty
Controls percentage of saturated pixels to apply when automatically setting brightness/contrast.A value of 1 indicates that approximately 1% dark pixels and 1% bright pixels should be saturated.
- Returns:
-
keepDisplaySettingsProperty
Retain display settings (channel colors, brightness/contrast) when opening new images that have the same properties (channels, channel names, bit-depths).- Returns:
-
doubleClickToZoomProperty
Request that double-clicking the viewer can be used to zoom in.- Returns:
-
imageTypeSettingProperty
Specify how setting the image type should be handled for images when they are opened for the first time.- Returns:
-
paintSelectedBoundsProperty
Specify whether the bounding box of selected objects should be painted. This offers an alternative to showing selected objects based on color.- Returns:
-
tableDelimiterProperty
Delimiter to use when exporting tables. Default is"\t"
. Commas should be used with caution because of potential localization trouble.- Returns:
-
showMeasurementTableThumbnailsProperty
Specify whether measurement tables should show thumbnail images by default or not.- Returns:
-
showMeasurementTableObjectIDsProperty
Specify whether measurement tables should show object IDs by default or not.- Returns:
-
enableFreehandToolsProperty
Enable polygon/polyline tools to support 'freehand' mode; this means that if the ROI is started by dragging, then it will end by lifting the mouse (rather than requiring a double-click).- Returns:
-
getSerializationExtension
File extension used for serialization of ImageData (without the dot)- Returns:
-
useZoomGesturesProperty
Support zoom gestures for touchscreens and trackpads.- Returns:
-
useRotateGesturesProperty
Support rotate gestures for touchscreens and trackpads.- Returns:
-
useScrollGesturesProperty
Support scroll gestures for touchscreens and trackpads.- Returns:
-
brushCreateNewObjectsProperty
Create new objects by default when drawing with the Brush tool. The alternative is to append (discontinuous) regions to existing annotations.- Returns:
-
brushScaleByMagProperty
Optionally scale the default brush tool diameter by the viewer magnification (downsample value).- Returns:
-
brushDiameterProperty
Default brush tool diameter, in pixels.- Returns:
-
returnToMoveModeProperty
Request that the GUI returns to using the PAN tool after a ROI is drawn. This helps keep errant clicking under control, but not permitting new ROIs to be made without explicitly activating a ROI too- Returns:
-
tileCachePercentageProperty
Requested percentage of available memory to use for tile caching.- Returns:
-
useCalibratedLocationStringProperty
Show the cursor location on a viewer in calibrated units, rather than pixels.- Returns:
-
useSelectedColorProperty
Use a specified color for highlighting selected objects in the viewer.- Returns:
-
showPointHullsProperty
Show the convex hull for point annotations within the viewer.- Returns:
-
multipointToolProperty
Create multiple points within the same annotation when using the counting tool. The alternative is to create a new annotation for each new point.- Returns:
-
tmaExportDownsampleProperty
Default downsample factor to use when exporting TMA cores.- Returns:
-
viewerGammaProperty
Requested gamma value applied to the image in each viewer (for display only).- Returns:
-
viewerBackgroundColorProperty
Color to paint behind any image.- Returns:
-
colorDefaultObjectsProperty
The default color used to display objects of any type, where a default has not otherwise been specified.- Returns:
-
colorSelectedObjectProperty
The default color used to display selected objects.- Returns:
-
colorTMAProperty
The default color used to display TMA core objects.- Returns:
-
colorTMAMissingProperty
The default color used to display missing TMA core objects.- Returns:
-
colorTileProperty
The default color used to display tile objects.- Returns:
-
autoSetAnnotationClassProperty
Classification that should automatically be applied to all new annotations. May be null.- Returns:
-
alwaysPaintSelectedObjectsProperty
Always paint selected objects in the viewer, even if the opacity setting is 0.- Returns:
-
viewerInterpolateBilinearProperty
Request that images are displayed in viewers using bilinear interpolation.- Returns:
-
detectionTreeDisplayModeProperty
public static ObjectProperty<PathPrefs.DetectionTreeDisplayModes> detectionTreeDisplayModeProperty()Define how detections should be displayed in lists and tree views.Showing all detections can be a bad idea, since there may be serious performance issues (especially when selecting/deselecting objects on an expanded tree).
- Returns:
-
maxObjectsToClipboardProperty
The maximum number of objects that can be copied to the system clipboard. This is to avoid accidentally putting very large amounts of data on the clipboard (causing the app to slow down or freeze), or attempting to create strings that are too long.- Returns:
-
scalebarFontSizeProperty
Preferred font size for the scalebar in the viewer.- Returns:
-
locationFontSizeProperty
Preferred font size for the location text in the viewer.- Returns:
-
scalebarFontWeightProperty
Preferred font weight in the viewer.- Returns:
-
scalebarLineWidthProperty
Preferred line width for the scalebar.- Returns:
-
allredMinPercentagePositiveProperty
The minimum positive percentage of cells for Allred proportion score to be non-zero. Using the strict definition, this would be 0... however for image analysis this can be very non-robust, in that it allows a single false detection to have a very high influence on the score.- Returns:
-
minPyramidDimensionProperty
Minimum image width or height before pyramidalizing (if required).- Returns:
-
pointRadiusProperty
Radius of the circle used to draw individual points in a point annotation (in pixels).- Returns:
-
createPersistentPreference
Create a persistent property, which is one that will be saved to/reloaded from the user preferences.- Parameters:
name
-defaultValue
-- Returns:
-
createPersistentPreference
Create a persistent property, which is one that will be saved to/reloaded from the user preferences.- Parameters:
name
-defaultValue
-- Returns:
-
createPersistentPreference
Create a persistent property, which is one that will be saved to/reloaded from the user preferences.- Parameters:
name
-defaultValue
-- Returns:
-
createPersistentPreference
Create a persistent property, which is one that will be saved to/reloaded from the user preferences.- Parameters:
name
-defaultValue
-- Returns:
-
createPersistentPreference
Create a persistent property, which is one that will be saved to/reloaded from the user preferences.- Parameters:
name
-defaultValue
-- Returns:
-
createPersistentPreference
public static <T extends Enum<T>> ObjectProperty<T> createPersistentPreference(String name, T defaultValue, Class<T> enumType) Create a persistent property, which is one that will be saved to/reloaded from the user preferences.- Parameters:
name
-defaultValue
-enumType
-- Returns:
-
createPersistentPreference
public static <T> ObjectProperty<T> createPersistentPreference(String name, T defaultValue, Function<T, String> serializer, Function<String, T> deserializer) Create a persistent property representing any object serializable as a String, which will be saved to/reloaded from the user preferences. Note that it is important that the serialization is short, i.e. fewer thanPreferences.MAX_VALUE_LENGTH
characters.- Parameters:
name
-defaultValue
-serializer
- function to generate a string representation of the objectdeserializer
- function to get an object from a string representation- Returns:
- Since:
- v0.4.0
-
detectionStrokeThicknessProperty
Preferred stroke thickness to use when drawing detections ROIs. This is defined in pixels at the full image resolution, and does not adapt to viewer magnification.- Returns:
-
annotationStrokeThicknessProperty
Preferred stroke thickness to use when drawing annotation ROIs. This is defined in pixels, scaled according to the current viewer magnification.- Returns:
-
usePixelSnappingProperty
If true, pixels should be snapped to integer coordinates when using the drawing tools.- Returns:
-
getDefaultQuPathUserDirectory
Get the default location for extensions. This is platform and user-specific. It isn't necessarily used (and doesn't necessarily exist).- Returns:
-
Preferences
object, since this may be invalidated by a call toresetPreferences()