Class PathPrefs
Most of these are 'persistent', and stored in a platform-dependent way using Java's Preferences API.
- Author:
- Pete Bankhead
-
Property Summary
PropertiesTypePropertyDescriptionstatic DoublePropertyThe minimum positive percentage of cells for Allred proportion score to be non-zero.static BooleanPropertyAlways paint selected objects in the viewer, even if the opacity setting is 0.static DoublePropertyPreferred stroke thickness to use when drawing annotation ROIs.static DoublePropertyControls 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 BooleanPropertyCreate new objects by default when drawing with the Brush tool.static IntegerPropertyDefault brush tool diameter, in pixels.static BooleanPropertyOptionally scale the default brush tool diameter by the viewer magnification (downsample value).static BooleanPropertyRequest ROIs to be clipped and inserted as the right place in the hierarchy when drawing (to prevent overlapping ROIs being created accidentally).static IntegerPropertyThe default color used to display objects of any type, where a default has not otherwise been specified.static IntegerPropertyThe default color used to display selected objects.static IntegerPropertyThe default color used to display tile objects.static IntegerPropertyThe default color used to display missing TMA core objects.static IntegerPropertyThe default color used to display TMA core objects.static ObjectProperty<Locale>Get a property for setting the defaultLocaleforLocale.Category.DISPLAY.static ObjectProperty<Locale>Get a property for setting the defaultLocaleforLocale.Category.FORMAT.static ObjectProperty<Locale>Get a property for setting the defaultLocale.static DoublePropertyPreferred stroke thickness to use when drawing detections ROIs.Define how detections should be displayed in lists and tree views.static BooleanPropertyRequest a log file to be generated.static BooleanPropertyRequest that double-clicking the viewer can be used to zoom in.static BooleanPropertyEnable 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 BooleanPropertyDefine counting grid optionally displayed on any viewer using microns rather than pixel coordinates.static DoublePropertyHorizontal spacing between lines for any counting grid.static DoublePropertyVertical spacing between lines for any counting grid.static DoublePropertyStarting x coordinate for any counting grid (usually 0).static DoublePropertyStarting 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 BooleanPropertyInvert the scrolling direction of the mouse applied to the viewer.static BooleanPropertyInvert the z-slider for the viewer.static BooleanPropertyRetain 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 BooleanPropertyRequest that image names are hidden within the user interface.static IntegerPropertyGet property representing the maximum memory for the Java Virtual Machine, applied after restarting the application.static IntegerPropertyThe maximum number of objects that can be copied to the system clipboard.static IntegerPropertyThe requested maximum number of objects in a hierarchy for which QuPath should support undo/redo.static IntegerPropertyThe requested maximum number of undo levels that QuPath should support.static IntegerPropertyMinimum image width or height before pyramidalizing (if required).static BooleanPropertyCreate multiple points within the same annotation when using the counting tool.static BooleanPropertyApply acceleration/deceleration effects when holding and releasing navigation key.static IntegerPropertyPercentage to scale navigation speed.static IntegerPropertyProperty specifying the preferred number of threads QuPath should use for multithreaded commands.static BooleanPropertySpecify whether the bounding box of selected objects should be painted.static IntegerPropertyRadius of the circle used to draw individual points in a point annotation (in pixels).static BooleanPropertyRequest 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 DoublePropertyPreferred line width for the scalebar.static StringPropertyPath to a directory containing scripts for quick-access through the user interface.static IntegerPropertyPercentage to scale scroll speed for zooming etc.static BooleanPropertyConvert drawing tools to select objects, rather than creating new objects.static BooleanPropertyFlag to indicate that menu items marked 'experimental' should be shown to the user.static BooleanPropertyProperty specifying if QuPath should show the image title in the main window title.static BooleanPropertyFlag to indicate that the legacy options should be shown to the user - normally not desirable.static BooleanPropertySpecify whether measurement tables should show object IDs by default or not.static BooleanPropertySpecify whether measurement tables should show thumbnail images by default or not.static BooleanPropertyShow the convex hull for point annotations within the viewer.static BooleanPropertyShow a startup message when QuPath is launched.static BooleanPropertyFlag to indicate that the TMA menu should be shown to the user - only relevant when working with Tissue Microarrays.static BooleanPropertyShow badges on the toolbar, e.g.static BooleanPropertySkip ('jump over') missing cores when navigating through TMA grids.static StringPropertyPath to a startup script that should be run immediately after QuPath's launch.static StringPropertyDelimiter to use when exporting tables.static DoublePropertyRequested percentage of available memory to use for tile caching.static DoublePropertyDefault downsample factor to use when exporting TMA cores.static BooleanPropertyShow the cursor location on a viewer in calibrated units, rather than pixels.static BooleanPropertyIf true, pixels should be snapped to integer coordinates when using the drawing tools.static BooleanPropertySupport rotate gestures for touchscreens and trackpads.static ObjectProperty<String>A path where additional files may be stored, such as extensions and log files.static BooleanPropertySupport scroll gestures for touchscreens and trackpads.static BooleanPropertyUse a specified color for highlighting selected objects in the viewer.static BooleanPropertyDeprecated.static BooleanPropertyRequest that the brush tool automatically uses any available tiles, rather than creating 'circles' as normal.static BooleanPropertySupport zoom gestures for touchscreens and trackpads.static IntegerPropertyColor to paint behind any image.static DoublePropertyRequested gamma value applied to the image in each viewer (for display only).static BooleanPropertyRequest that images are displayed in viewers using bilinear interpolation. -
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumOptions for automatic updating checking of QuPath and/or extensions.static enumEnum for different ways that detections can be displayed in lists and trees.static enumEnum to control font size.static enumEnum defining how setting the image type should be handled for new images. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DoublePropertyThe minimum positive percentage of cells for Allred proportion score to be non-zero.static BooleanPropertyAlways paint selected objects in the viewer, even if the opacity setting is 0.static DoublePropertyPreferred stroke thickness to use when drawing annotation ROIs.static DoublePropertyControls 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 BooleanPropertyCreate new objects by default when drawing with the Brush tool.static IntegerPropertyDefault brush tool diameter, in pixels.static BooleanPropertyOptionally scale the default brush tool diameter by the viewer magnification (downsample value).static BooleanPropertyRequest ROIs to be clipped and inserted as the right place in the hierarchy when drawing (to prevent overlapping ROIs being created accidentally).static IntegerPropertyThe default color used to display objects of any type, where a default has not otherwise been specified.static IntegerPropertyThe default color used to display selected objects.static IntegerPropertyThe default color used to display tile objects.static IntegerPropertyThe default color used to display missing TMA core objects.static IntegerPropertyThe default color used to display TMA core objects.static BooleanPropertycreatePersistentPreference(String name, boolean defaultValue) Create a persistent property, which is one that will be saved to/reloaded from the user preferences.static DoublePropertycreatePersistentPreference(String name, double defaultValue) Create a persistent property, which is one that will be saved to/reloaded from the user preferences.static IntegerPropertycreatePersistentPreference(String name, int defaultValue) Create a persistent property, which is one that will be saved to/reloaded from the user preferences.static LongPropertycreatePersistentPreference(String name, long defaultValue) Create a persistent property, which is one that will be saved to/reloaded from the user preferences.static StringPropertycreatePersistentPreference(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 defaultLocaleforLocale.Category.DISPLAY.static ObjectProperty<Locale>Get a property for setting the defaultLocaleforLocale.Category.FORMAT.static ObjectProperty<Locale>Get a property for setting the defaultLocale.static DoublePropertyPreferred stroke thickness to use when drawing detections ROIs.Define how detections should be displayed in lists and tree views.static BooleanPropertyRequest a log file to be generated.static BooleanPropertyRequest that double-clicking the viewer can be used to zoom in.static BooleanPropertyEnable 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 voidexportPreferences(OutputStream stream) Export preferences to a stream.static PathTry to get the path to the config file.static PathGet the default location for extensions.static booleanGet 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 doubleGet navigation speed scaled as a proportion and forced to be in the range 0-1.static doubleGet scroll speed scaled as a proportion and forced to be in the range 0-1.static StringFile extension used for serialization of ImageData (without the dot)static booleanRequest that all available color transforms are shown for RGB images.static booleanReturn whether the viewer skips missing TMA cores when navigating TMA grids with arrow keys.static PreferencesDeprecated.static BooleanPropertyDefine counting grid optionally displayed on any viewer using microns rather than pixel coordinates.static DoublePropertyHorizontal spacing between lines for any counting grid.static DoublePropertyVertical spacing between lines for any counting grid.static DoublePropertyStarting x coordinate for any counting grid (usually 0).static DoublePropertyStarting y coordinate for any counting grid (usually 0).static booleanAttempt 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 voidimportPreferences(InputStream stream) Import preferences from a stream.static BooleanPropertyInvert the scrolling direction of the mouse applied to the viewer.static BooleanPropertyInvert the z-slider for the viewer.static BooleanPropertyRetain 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 BooleanPropertyRequest that image names are hidden within the user interface.static IntegerPropertyGet property representing the maximum memory for the Java Virtual Machine, applied after restarting the application.static IntegerPropertyThe maximum number of objects that can be copied to the system clipboard.static IntegerPropertyThe requested maximum number of objects in a hierarchy for which QuPath should support undo/redo.static IntegerPropertyThe requested maximum number of undo levels that QuPath should support.static IntegerPropertyMinimum image width or height before pyramidalizing (if required).static BooleanPropertyCreate multiple points within the same annotation when using the counting tool.static BooleanPropertyApply acceleration/deceleration effects when holding and releasing navigation key.static IntegerPropertyPercentage to scale navigation speed.static IntegerPropertyProperty specifying the preferred number of threads QuPath should use for multithreaded commands.static BooleanPropertySpecify whether the bounding box of selected objects should be painted.static IntegerPropertyRadius of the circle used to draw individual points in a point annotation (in pixels).static voidReset the preferences to their defaults.static BooleanPropertyRequest that the GUI returns to using the PAN tool after a ROI is drawn.static booleanSave 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 DoublePropertyPreferred line width for the scalebar.static StringPropertyPath to a directory containing scripts for quick-access through the user interface.static IntegerPropertyPercentage to scale scroll speed for zooming etc.static BooleanPropertyConvert drawing tools to select objects, rather than creating new objects.static BooleanPropertyFlag to indicate that menu items marked 'experimental' should be shown to the user.static BooleanPropertyProperty specifying if QuPath should show the image title in the main window title.static BooleanPropertyFlag to indicate that the legacy options should be shown to the user - normally not desirable.static BooleanPropertySpecify whether measurement tables should show object IDs by default or not.static BooleanPropertySpecify whether measurement tables should show thumbnail images by default or not.static BooleanPropertyShow the convex hull for point annotations within the viewer.static BooleanPropertyShow a startup message when QuPath is launched.static BooleanPropertyFlag to indicate that the TMA menu should be shown to the user - only relevant when working with Tissue Microarrays.static BooleanPropertyShow badges on the toolbar, e.g.static BooleanPropertySkip ('jump over') missing cores when navigating through TMA grids.static StringPropertyPath to a startup script that should be run immediately after QuPath's launch.static StringPropertyDelimiter to use when exporting tables.static DoublePropertyRequested percentage of available memory to use for tile caching.static DoublePropertyDefault downsample factor to use when exporting TMA cores.static BooleanPropertyShow the cursor location on a viewer in calibrated units, rather than pixels.static BooleanPropertyIf true, pixels should be snapped to integer coordinates when using the drawing tools.static BooleanPropertySupport rotate gestures for touchscreens and trackpads.static ObjectProperty<String>A path where additional files may be stored, such as extensions and log files.static BooleanPropertySupport scroll gestures for touchscreens and trackpads.static BooleanPropertyUse a specified color for highlighting selected objects in the viewer.static BooleanPropertyDeprecated.static BooleanPropertyRequest that the brush tool automatically uses any available tiles, rather than creating 'circles' as normal.static BooleanPropertySupport zoom gestures for touchscreens and trackpads.static IntegerPropertyColor to paint behind any image.static DoublePropertyRequested gamma value applied to the image in each viewer (for display only).static BooleanPropertyRequest 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. -
numCommandThreads
Property specifying the preferred number of threads QuPath should use for multithreaded commands. -
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. -
autoUpdateCheck
Check for updates when launching QuPath, if possible. -
maskImageNames
Request that image names are hidden within the user interface. -
defaultLocale
Get a property for setting the defaultLocale. Setting this locale impacts bothLocale.Category.FORMATandLocale.Category.DISPLAY, and may trigger an update todefaultLocaleDisplayProperty()anddefaultLocaleFormatProperty()if these have been changed.- Since:
- v0.4.0
-
defaultLocaleFormat
Get a property for setting the defaultLocaleforLocale.Category.FORMAT. Setting this property also results in the Locale being changed to match. -
defaultLocaleDisplay
Get a property for setting the defaultLocaleforLocale.Category.DISPLAY. Setting this property also results in the Locale being changed to match. -
showStartupMessage
Show a startup message when QuPath is launched. -
startupScript
Path to a startup script that should be run immediately after QuPath's launch. -
showToolBarBadges
Show badges on the toolbar, e.g. to provide messages or warnings. -
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.
-
scrollSpeed
Percentage to scale scroll speed for zooming etc. Helps customize the viewer according to more/less enthusiastic input devices. -
skipMissingCores
Skip ('jump over') missing cores when navigating through TMA grids. -
scriptsPath
Path to a directory containing scripts for quick-access through the user interface. -
useTileBrush
Request that the brush tool automatically uses any available tiles, rather than creating 'circles' as normal. -
selectionMode
Convert drawing tools to select objects, rather than creating new objects. -
clipROIsForHierarchy
Request ROIs to be clipped and inserted as the right place in the hierarchy when drawing (to prevent overlapping ROIs being created accidentally). -
showExperimentalOptions
Flag to indicate that menu items marked 'experimental' should be shown to the user. -
showTMAOptions
Flag to indicate that the TMA menu should be shown to the user - only relevant when working with Tissue Microarrays. -
showLegacyOptions
Flag to indicate that the legacy options should be shown to the user - normally not desirable. -
doCreateLogFiles
Request a log file to be generated. Requires theuserPathProperty()to be set to a directory. -
userPath
A path where additional files may be stored, such as extensions and log files. -
maxUndoLevels
The requested maximum number of undo levels that QuPath should support. -
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. -
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. -
invertZSlider
Invert the z-slider for the viewer. This can help if the location of the zero position seems counterintuitive. -
gridStartX
Starting x coordinate for any counting grid (usually 0). This depends upongridScaleMicronsProperty(). -
gridStartY
Starting y coordinate for any counting grid (usually 0). This depends upongridScaleMicronsProperty(). -
gridSpacingX
Horizontal spacing between lines for any counting grid. This depends upongridScaleMicronsProperty(). -
gridSpacingY
Vertical spacing between lines for any counting grid. This depends upongridScaleMicronsProperty(). -
gridScaleMicrons
Define counting grid optionally displayed on any viewer using microns rather than pixel coordinates. -
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.
-
keepDisplaySettings
Retain display settings (channel colors, brightness/contrast) when opening new images that have the same properties (channels, channel names, bit-depths). -
doubleClickToZoom
Request that double-clicking the viewer can be used to zoom in. -
imageTypeSetting
Specify how setting the image type should be handled for images when they are opened for the first time. -
paintSelectedBounds
Specify whether the bounding box of selected objects should be painted. This offers an alternative to showing selected objects based on color. -
tableDelimiter
Delimiter to use when exporting tables. Default is"\t". Commas should be used with caution because of potential localization trouble. -
showMeasurementTableThumbnails
Specify whether measurement tables should show thumbnail images by default or not. -
showMeasurementTableObjectIDs
Specify whether measurement tables should show object IDs by default or not. -
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). -
useZoomGestures
Support zoom gestures for touchscreens and trackpads. -
useRotateGestures
Support rotate gestures for touchscreens and trackpads. -
useScrollGestures
Support scroll gestures for touchscreens and trackpads. -
brushCreateNewObjects
Create new objects by default when drawing with the Brush tool. The alternative is to append (discontinuous) regions to existing annotations. -
brushScaleByMag
Optionally scale the default brush tool diameter by the viewer magnification (downsample value). -
brushDiameter
Default brush tool diameter, in pixels. -
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 -
tileCachePercentage
Requested percentage of available memory to use for tile caching. -
useCalibratedLocationString
Show the cursor location on a viewer in calibrated units, rather than pixels. -
useSelectedColor
Use a specified color for highlighting selected objects in the viewer. -
showPointHulls
Show the convex hull for point annotations within the viewer. -
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. -
tmaExportDownsample
Default downsample factor to use when exporting TMA cores. -
viewerGamma
Requested gamma value applied to the image in each viewer (for display only). -
viewerBackgroundColor
Color to paint behind any image. -
colorDefaultObjects
The default color used to display objects of any type, where a default has not otherwise been specified. -
colorSelectedObject
The default color used to display selected objects. -
colorTMA
The default color used to display TMA core objects. -
colorTMAMissing
The default color used to display missing TMA core objects. -
colorTile
The default color used to display tile objects. -
autoSetAnnotationClass
Classification that should automatically be applied to all new annotations. May be null. -
alwaysPaintSelectedObjects
Always paint selected objects in the viewer, even if the opacity setting is 0. -
viewerInterpolateBilinear
Request that images are displayed in viewers using bilinear interpolation. -
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).
-
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. -
scalebarFontSize
Preferred font size for the scalebar in the viewer. -
locationFontSize
Preferred font size for the location text in the viewer. -
scalebarFontWeight
Preferred font weight in the viewer. -
scalebarLineWidth
Preferred line width for the scalebar. -
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. -
minPyramidDimension
Minimum image width or height before pyramidalizing (if required). -
pointRadius
Radius of the circle used to draw individual points in a point annotation (in pixels). -
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. -
annotationStrokeThickness
Preferred stroke thickness to use when drawing annotation ROIs. This is defined in pixels, scaled according to the current viewer magnification. -
usePixelSnapping
If true, pixels should be snapped to integer coordinates when using the drawing tools.
-
-
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. -
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:
IOExceptionBackingStoreException- 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:
IOExceptionInvalidPreferencesFormatException- See Also:
-
numCommandThreadsProperty
Property specifying the preferred number of threads QuPath should use for multithreaded commands. -
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. -
autoUpdateCheckProperty
Check for updates when launching QuPath, if possible. -
maskImageNamesProperty
Request that image names are hidden within the user interface. -
defaultLocaleProperty
Get a property for setting the defaultLocale. Setting this locale impacts bothLocale.Category.FORMATandLocale.Category.DISPLAY, and may trigger an update todefaultLocaleDisplayProperty()anddefaultLocaleFormatProperty()if these have been changed.- Since:
- v0.4.0
-
defaultLocaleFormatProperty
Get a property for setting the defaultLocaleforLocale.Category.FORMAT. Setting this property also results in the Locale being changed to match. -
defaultLocaleDisplayProperty
Get a property for setting the defaultLocaleforLocale.Category.DISPLAY. Setting this property also results in the Locale being changed to match. -
showStartupMessageProperty
Show a startup message when QuPath is launched. -
startupScriptProperty
Path to a startup script that should be run immediately after QuPath's launch. -
showToolBarBadgesProperty
Show badges on the toolbar, e.g. to provide messages or warnings. -
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:
IOExceptionURISyntaxException
-
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.
-
getUserPreferences
Deprecated.since v0.5.0 - avoid direct use of thePreferencesobject, since this may be invalidated by a call toresetPreferences()Get thePreferencesobject 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 thePreferencesdirectly.- 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. -
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. -
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. -
useTileBrushProperty
Request that the brush tool automatically uses any available tiles, rather than creating 'circles' as normal. -
selectionModeProperty
Convert drawing tools to select objects, rather than creating new objects. -
clipROIsForHierarchyProperty
Request ROIs to be clipped and inserted as the right place in the hierarchy when drawing (to prevent overlapping ROIs being created accidentally). -
showExperimentalOptionsProperty
Flag to indicate that menu items marked 'experimental' should be shown to the user. -
showTMAOptionsProperty
Flag to indicate that the TMA menu should be shown to the user - only relevant when working with Tissue Microarrays. -
showLegacyOptionsProperty
Flag to indicate that the legacy options should be shown to the user - normally not desirable. -
doCreateLogFilesProperty
Request a log file to be generated. Requires theuserPathProperty()to be set to a directory. -
userPathProperty
A path where additional files may be stored, such as extensions and log files. -
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. -
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. -
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. -
invertZSliderProperty
Invert the z-slider for the viewer. This can help if the location of the zero position seems counterintuitive. -
gridStartXProperty
Starting x coordinate for any counting grid (usually 0). This depends upongridScaleMicronsProperty(). -
gridStartYProperty
Starting y coordinate for any counting grid (usually 0). This depends upongridScaleMicronsProperty(). -
gridSpacingXProperty
Horizontal spacing between lines for any counting grid. This depends upongridScaleMicronsProperty(). -
gridSpacingYProperty
Vertical spacing between lines for any counting grid. This depends upongridScaleMicronsProperty(). -
gridScaleMicronsProperty
Define counting grid optionally displayed on any viewer using microns rather than pixel coordinates. -
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.
-
keepDisplaySettingsProperty
Retain display settings (channel colors, brightness/contrast) when opening new images that have the same properties (channels, channel names, bit-depths). -
doubleClickToZoomProperty
Request that double-clicking the viewer can be used to zoom in. -
imageTypeSettingProperty
Specify how setting the image type should be handled for images when they are opened for the first time. -
paintSelectedBoundsProperty
Specify whether the bounding box of selected objects should be painted. This offers an alternative to showing selected objects based on color. -
tableDelimiterProperty
Delimiter to use when exporting tables. Default is"\t". Commas should be used with caution because of potential localization trouble. -
showMeasurementTableThumbnailsProperty
Specify whether measurement tables should show thumbnail images by default or not. -
showMeasurementTableObjectIDsProperty
Specify whether measurement tables should show object IDs by default or not. -
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). -
getSerializationExtension
File extension used for serialization of ImageData (without the dot)- Returns:
-
useZoomGesturesProperty
Support zoom gestures for touchscreens and trackpads. -
useRotateGesturesProperty
Support rotate gestures for touchscreens and trackpads. -
useScrollGesturesProperty
Support scroll gestures for touchscreens and trackpads. -
brushCreateNewObjectsProperty
Create new objects by default when drawing with the Brush tool. The alternative is to append (discontinuous) regions to existing annotations. -
brushScaleByMagProperty
Optionally scale the default brush tool diameter by the viewer magnification (downsample value). -
brushDiameterProperty
Default brush tool diameter, in pixels. -
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 -
tileCachePercentageProperty
Requested percentage of available memory to use for tile caching. -
useCalibratedLocationStringProperty
Show the cursor location on a viewer in calibrated units, rather than pixels. -
useSelectedColorProperty
Use a specified color for highlighting selected objects in the viewer. -
showPointHullsProperty
Show the convex hull for point annotations within the viewer. -
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. -
tmaExportDownsampleProperty
Default downsample factor to use when exporting TMA cores. -
viewerGammaProperty
Requested gamma value applied to the image in each viewer (for display only). -
viewerBackgroundColorProperty
Color to paint behind any image. -
colorDefaultObjectsProperty
The default color used to display objects of any type, where a default has not otherwise been specified. -
colorSelectedObjectProperty
The default color used to display selected objects. -
colorTMAProperty
The default color used to display TMA core objects. -
colorTMAMissingProperty
The default color used to display missing TMA core objects. -
colorTileProperty
The default color used to display tile objects. -
autoSetAnnotationClassProperty
Classification that should automatically be applied to all new annotations. May be null. -
alwaysPaintSelectedObjectsProperty
Always paint selected objects in the viewer, even if the opacity setting is 0. -
viewerInterpolateBilinearProperty
Request that images are displayed in viewers using bilinear interpolation. -
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).
-
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. -
scalebarFontSizeProperty
Preferred font size for the scalebar in the viewer. -
locationFontSizeProperty
Preferred font size for the location text in the viewer. -
scalebarFontWeightProperty
Preferred font weight in the viewer. -
scalebarLineWidthProperty
Preferred line width for the scalebar. -
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. -
minPyramidDimensionProperty
Minimum image width or height before pyramidalizing (if required). -
pointRadiusProperty
Radius of the circle used to draw individual points in a point annotation (in pixels). -
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_LENGTHcharacters.- 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. -
annotationStrokeThicknessProperty
Preferred stroke thickness to use when drawing annotation ROIs. This is defined in pixels, scaled according to the current viewer magnification. -
usePixelSnappingProperty
If true, pixels should be snapped to integer coordinates when using the drawing tools. -
getDefaultQuPathUserDirectory
Get the default location for extensions. This is platform and user-specific. It isn't necessarily used (and doesn't necessarily exist).- Returns:
-
Preferencesobject, since this may be invalidated by a call toresetPreferences()