java.lang.Object
ij.Prefs
This class contains the ImageJ preferences, which are
loaded from the "IJ_Props.txt" and "IJ_Prefs.txt" files.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic boolean
"ImageJ" window is always on top.static boolean
No longer usedstatic boolean
Draw tool icons using antialiasing (always true).static boolean
Adjust contrast when scrolling stacksstatic boolean
Turn live display on plots automaticallystatic boolean
Automatically run examples in Help/Examples menu.static boolean
Avoid interpolation when re-slicingstatic final String
static boolean
Backgound is black in binary imagesstatic boolean
Use black image border.static boolean
Calibrate image type conversionsstatic boolean
"Close All" command runningstatic boolean
Convert tiff units to microns if pixel width is less than 0.0001 cm.static boolean
Include column headers when copying tables to clipboard.static boolean
Dialog "Cancel" button is on right on Linuxstatic final String
static boolean
Disable Edit/Undo command.static final String
static boolean
Enable this option to workaround a bug with some Linux window managers that causes windows to wander down the screen.static boolean
Don't save Results table column headersstatic boolean
Don't save Results table row numbersstatic boolean
No longer usedstatic boolean
Allow lines to be created with one click at start and another at the endstatic final String
static boolean
Assume DICOM volumes use identical RescaleSlope and RescaleIntercept across all slicesstatic boolean
Rotate XZ orthogonal views 180 degreesstatic final String
static boolean
Use full range for 16-bit inversionsstatic final String
static boolean
Ignore Rescale Slope when opening DICOMsstatic boolean
Export TIFF and Raw using little-endian byte order.static boolean
Display images scaled <100% using bilinear interpolationstatic boolean
Use JFileChooser setting changed/static final String
static boolean
Keep arrow selection after adding to overlaystatic boolean
Preserve undo (snapshot) buffers when switching imagesstatic final String
static final String
static boolean
Move isolated plugins to Miscellaneous submenu.static boolean
Use MultiPoint tool.static boolean
Do not draw black border around image.static boolean
Don't run garbage collector when user clicks in status barstatic final String
static boolean
Use NonBlockingGenericDialogs in filtersstatic boolean
Do not label multiple points created using point tool.static boolean
Do not include row numbers when copying tables to clipboard.static boolean
Open images at 100% magnificationstatic boolean
Open DICOMs as 32-bit float imagesstatic final String
static final String
static boolean
Extend the borders to foreground for binary erosions and closings.static boolean
Aways paint images using double bufferingstatic boolean
Add points to ROI Manager.static boolean
Add points to overlay.static boolean
Point tool auto-measure mode.static boolean
Point tool auto-next slice mode (not saved in IJ_Prefs).static final String
static final String
static boolean
Angle tool measures reflex anglestatic boolean
Require control or command key for keybaord shortcuts.static boolean
Reverse channel-slice-frame priority used by Next Slice and Previous Slice commands.static final String
static boolean
Rotate YZ orthogonal views 90 degreesstatic boolean
Run the SocketListener.static String
file.separator system propertystatic boolean
Set MenuBar on Macs running Java 8.static final String
static boolean
Ignore stack positions when displaying points.static boolean
Only show ROIs associated with current slice in Roi Manager "Show All" mode.static boolean
Do not display dialog when opening .raw filesstatic boolean
Wand tool "Smooth if thresholded" optionstatic boolean
Automatically spline fit line selectionsstatic boolean
Use sub-pixel resolution with line selectionsstatic boolean
Support TRANSFORM Undo in macrosstatic final String
static boolean
Use the file chooser to import and export image sequences on Windows and Linuxstatic boolean
Open 8-bit images with inverting LUT so 0 is white and 255 is black.static boolean
Use JFileChooser instead of FileDialog to open and save files.static boolean
Use ROI names as "show all" labels in the ROI Managerstatic boolean
Use pointer cursor instead of crossstatic boolean
Set the "java.net.useSystemProxies" propertystatic boolean
Plot rectangular selectons verticallystatic final String
static boolean
Color to grayscale conversion is weighted (0.299, 0.587, 0.114) if the variable is true. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
static String
static boolean
Uses the keywordkey
to retrieve a boolean from the preferences file.static double
Uses the keywordkey
to retrieve a number from the preferences file.static String
Uses the keywordkey
to retrieve a string from the preferences file.static boolean
getBoolean
(String key, boolean defaultValue) Retrieves a boolean from IJ_Props or IJ_Prefs.txt.static Color
Finds a color in IJ_Props or IJ_Prefs.txt.static Properties
static String
Returns the custom preferences (IJ_Prefs.txt) file path.static String
Returns the custom properties (IJ_Props.txt) file path.static String
Returns the default directory, if any, or null.static double
Retrieves a number from IJ_Props or IJ_Prefs.txt.static String
Returns the file.separator system property.static double
Returns the GenericDialog and Command Finder text scale.static String
Obsolete, replaced by getImageJDir(), which, unlike this method, returns a path that ends with File.separator.static String
Returns the path, ending in File.separator, to the ImageJ directory.static String
Returns the URL of the directory that contains the ImageJ sample images.static int
Retrieves a number from IJ_Props or IJ_Prefs.txt.static Point
getLocation
(String key) Uses the keywordkey
to retrieve a location from the preferences file.static String
static String
Returns the path to the directory where the preferences file (IJPrefs.txt) is saved.static String
Retrieves a string from string in IJ_Props or IJ_Prefs.txt.static String
Retrieves a string from IJ_Props or IJ_Prefs.txt.static int
Returns the number of threads used by PlugInFilters to process images and stacks.static int
Returns the transparent index (0-255), or -1 if transparency is disabled.static String
Finds and loads the configuration file ("IJ_Props.txt") and the preferences file ("IJ_Prefs.txt").static void
Delete the preferences file when ImageJ quits.static void
saveLocation
(String key, Point loc) Saves the Pointloc
in the preferences file as a string using the keywordkey
.static void
Saves user preferences in the IJ_Prefs.txt properties file.static void
savePrefs
(Properties prefs, String path) static void
Saves the value of the booleanvalue
in the preferences file using the keywordkey
.static void
Saves the value of the doublevalue
in the preferences file using the keywordkey
.static void
Saves the value of the integervalue
in the preferences file using the keywordkey
.static void
Saves the value of the stringtext
in the preferences file using the keywordkey
.static void
setGuiScale
(double scale) Sets the GenericDialog and Command Finder text scale (0.5 to 3.0).static void
setImagesURL
(String url) Sets the URL of the directory that contains the ImageJ sample images.static void
setThreads
(int n) Sets the number of threads (1-32) used by PlugInFilters to process stacks.static void
setTransparentIndex
(int index) Sets the transparent index (0-255), or set to -1 to disable transparency.
-
Field Details
-
PROPS_NAME
- See Also:
-
PREFS_NAME
- See Also:
-
DIR_IMAGE
- See Also:
-
FCOLOR
- See Also:
-
BCOLOR
- See Also:
-
ROICOLOR
- See Also:
-
SHOW_ALL_COLOR
- See Also:
-
JPEG
- See Also:
-
FPS
- See Also:
-
DIV_BY_ZERO_VALUE
- See Also:
-
NOISE_SD
- See Also:
-
MENU_SIZE
- See Also:
-
GUI_SCALE
- See Also:
-
THREADS
- See Also:
-
KEY_PREFIX
- See Also:
-
OPTIONS
- See Also:
-
vistaHint
- See Also:
-
OPTIONS2
- See Also:
-
separator
file.separator system property -
usePointerCursor
public static boolean usePointerCursorUse pointer cursor instead of cross -
antialiasedText
public static boolean antialiasedTextNo longer used -
interpolateScaledImages
public static boolean interpolateScaledImagesDisplay images scaled <100% using bilinear interpolation -
open100Percent
public static boolean open100PercentOpen images at 100% magnification -
blackBackground
public static boolean blackBackgroundBackgound is black in binary images -
useJFileChooser
public static boolean useJFileChooserUse JFileChooser instead of FileDialog to open and save files. -
weightedColor
public static boolean weightedColorColor to grayscale conversion is weighted (0.299, 0.587, 0.114) if the variable is true. -
blackCanvas
public static boolean blackCanvasUse black image border. -
pointAutoMeasure
public static boolean pointAutoMeasurePoint tool auto-measure mode. -
pointAutoNextSlice
public static boolean pointAutoNextSlicePoint tool auto-next slice mode (not saved in IJ_Prefs). -
requireControlKey
public static boolean requireControlKeyRequire control or command key for keybaord shortcuts. -
useInvertingLut
public static boolean useInvertingLutOpen 8-bit images with inverting LUT so 0 is white and 255 is black. -
antialiasedTools
public static boolean antialiasedToolsDraw tool icons using antialiasing (always true). -
intelByteOrder
public static boolean intelByteOrderExport TIFF and Raw using little-endian byte order. -
doubleBuffer
public static boolean doubleBufferNo longer used -
noPointLabels
public static boolean noPointLabelsDo not label multiple points created using point tool. -
disableUndo
public static boolean disableUndoDisable Edit/Undo command. -
noBorder
public static boolean noBorderDo not draw black border around image. -
showAllSliceOnly
public static boolean showAllSliceOnlyOnly show ROIs associated with current slice in Roi Manager "Show All" mode. -
copyColumnHeaders
public static boolean copyColumnHeadersInclude column headers when copying tables to clipboard. -
noRowNumbers
public static boolean noRowNumbersDo not include row numbers when copying tables to clipboard. -
moveToMisc
public static boolean moveToMiscMove isolated plugins to Miscellaneous submenu. -
pointAddToManager
public static boolean pointAddToManagerAdd points to ROI Manager. -
pointAddToOverlay
public static boolean pointAddToOverlayAdd points to overlay. -
padEdges
public static boolean padEdgesExtend the borders to foreground for binary erosions and closings. -
runSocketListener
public static boolean runSocketListenerRun the SocketListener. -
multiPointMode
public static boolean multiPointModeUse MultiPoint tool. -
openDicomsAsFloat
public static boolean openDicomsAsFloatOpen DICOMs as 32-bit float images -
ignoreRescaleSlope
public static boolean ignoreRescaleSlopeIgnore Rescale Slope when opening DICOMs -
fixedDicomScaling
public static boolean fixedDicomScalingAssume DICOM volumes use identical RescaleSlope and RescaleIntercept across all slices -
verticalProfile
public static boolean verticalProfilePlot rectangular selectons vertically -
rotateYZ
public static boolean rotateYZRotate YZ orthogonal views 90 degrees -
flipXZ
public static boolean flipXZRotate XZ orthogonal views 180 degrees -
dontSaveHeaders
public static boolean dontSaveHeadersDon't save Results table column headers -
dontSaveRowNumbers
public static boolean dontSaveRowNumbersDon't save Results table row numbers -
noClickToGC
public static boolean noClickToGCDon't run garbage collector when user clicks in status bar -
reflexAngle
public static boolean reflexAngleAngle tool measures reflex angle -
avoidResliceInterpolation
public static boolean avoidResliceInterpolationAvoid interpolation when re-slicing -
keepUndoBuffers
public static boolean keepUndoBuffersPreserve undo (snapshot) buffers when switching images -
useNamesAsLabels
public static boolean useNamesAsLabelsUse ROI names as "show all" labels in the ROI Manager -
useSystemProxies
public static boolean useSystemProxiesSet the "java.net.useSystemProxies" property -
useFileChooser
public static boolean useFileChooserUse the file chooser to import and export image sequences on Windows and Linux -
subPixelResolution
public static boolean subPixelResolutionUse sub-pixel resolution with line selections -
autoContrast
public static boolean autoContrastAdjust contrast when scrolling stacks -
enhancedLineTool
public static boolean enhancedLineToolAllow lines to be created with one click at start and another at the end -
keepArrowSelections
public static boolean keepArrowSelectionsKeep arrow selection after adding to overlay -
paintDoubleBuffered
public static boolean paintDoubleBufferedAways paint images using double buffering -
skipRawDialog
public static boolean skipRawDialogDo not display dialog when opening .raw files -
reverseNextPreviousOrder
public static boolean reverseNextPreviousOrderReverse channel-slice-frame priority used by Next Slice and Previous Slice commands. -
autoRunExamples
public static boolean autoRunExamplesAutomatically run examples in Help/Examples menu. -
showAllPoints
public static boolean showAllPointsIgnore stack positions when displaying points. -
setIJMenuBar
public static boolean setIJMenuBarSet MenuBar on Macs running Java 8. -
alwaysOnTop
public static boolean alwaysOnTop"ImageJ" window is always on top. -
splineFitLines
public static boolean splineFitLinesAutomatically spline fit line selections -
doNotSaveWindowLocations
public static boolean doNotSaveWindowLocationsEnable this option to workaround a bug with some Linux window managers that causes windows to wander down the screen. -
jFileChooserSettingChanged
public static boolean jFileChooserSettingChangedUse JFileChooser setting changed/ -
convertToMicrons
public static boolean convertToMicronsConvert tiff units to microns if pixel width is less than 0.0001 cm. -
smoothWand
public static boolean smoothWandWand tool "Smooth if thresholded" option -
closingAll
public static boolean closingAll"Close All" command running -
dialogCancelButtonOnRight
public static boolean dialogCancelButtonOnRightDialog "Cancel" button is on right on Linux -
supportMacroUndo
public static boolean supportMacroUndoSupport TRANSFORM Undo in macros -
nonBlockingFilterDialogs
public static boolean nonBlockingFilterDialogsUse NonBlockingGenericDialogs in filters -
autoLivePlots
public static boolean autoLivePlotsTurn live display on plots automatically -
fullRange16bitInversions
public static boolean fullRange16bitInversionsUse full range for 16-bit inversions -
calibrateConversions
public static boolean calibrateConversionsCalibrate image type conversions
-
-
Constructor Details
-
Prefs
public Prefs()
-
-
Method Details
-
set
Saves the value of the stringtext
in the preferences file using the keywordkey
. The string can be retrieved using the appropriateget()
method.- See Also:
-
set
Saves the value of the integervalue
in the preferences file using the keywordkey
. The value can be retrieved using the appropriateget()
method.- See Also:
-
set
Saves the value of the doublevalue
in the preferences file using the keywordkey
. The value can be retrieved using the appropriateget()
method.- See Also:
-
set
Saves the value of the booleanvalue
in the preferences file using the keywordkey
. The value can be retrieved using the appropriateget()
method.- See Also:
-
get
Uses the keywordkey
to retrieve a string from the preferences file. ReturnsdefaultValue
if the key is not found. -
get
Uses the keywordkey
to retrieve a number from the preferences file. ReturnsdefaultValue
if the key is not found. -
get
Uses the keywordkey
to retrieve a boolean from the preferences file. ReturnsdefaultValue
if the key is not found. -
load
Finds and loads the configuration file ("IJ_Props.txt") and the preferences file ("IJ_Prefs.txt").- Returns:
- an error message if "IJ_Props.txt" not found.
-
getImagesURL
Returns the URL of the directory that contains the ImageJ sample images. -
setImagesURL
Sets the URL of the directory that contains the ImageJ sample images. -
getHomeDir
Obsolete, replaced by getImageJDir(), which, unlike this method, returns a path that ends with File.separator. -
getImageJDir
Returns the path, ending in File.separator, to the ImageJ directory. -
getPluginsDirProperty
-
getPrefsDir
Returns the path to the directory where the preferences file (IJPrefs.txt) is saved. -
getDefaultDirectory
Returns the default directory, if any, or null. -
getFileSeparator
Returns the file.separator system property. -
savePreferences
public static void savePreferences()Saves user preferences in the IJ_Prefs.txt properties file. -
resetPreferences
public static void resetPreferences()Delete the preferences file when ImageJ quits. -
saveLocation
Saves the Pointloc
in the preferences file as a string using the keywordkey
. -
getLocation
Uses the keywordkey
to retrieve a location from the preferences file. Returns null if the key is not found or the location is not valid (e.g., offscreen). -
savePrefs
- Throws:
IOException
-
getThreads
public static int getThreads()Returns the number of threads used by PlugInFilters to process images and stacks. -
setThreads
public static void setThreads(int n) Sets the number of threads (1-32) used by PlugInFilters to process stacks. -
setTransparentIndex
public static void setTransparentIndex(int index) Sets the transparent index (0-255), or set to -1 to disable transparency. -
getTransparentIndex
public static int getTransparentIndex()Returns the transparent index (0-255), or -1 if transparency is disabled. -
getControlPanelProperties
-
defaultResultsExtension
-
setGuiScale
public static void setGuiScale(double scale) Sets the GenericDialog and Command Finder text scale (0.5 to 3.0). -
getGuiScale
public static double getGuiScale()Returns the GenericDialog and Command Finder text scale. -
getCustomPropsPath
Returns the custom properties (IJ_Props.txt) file path. -
getCustomPrefsPath
Returns the custom preferences (IJ_Prefs.txt) file path. -
getString
Retrieves a string from IJ_Props or IJ_Prefs.txt. Does not retrieve strings set using Prefs.set(). -
getString
Retrieves a string from string in IJ_Props or IJ_Prefs.txt. -
getInt
Retrieves a number from IJ_Props or IJ_Prefs.txt. Does not retrieve numbers set using Prefs.set(). -
getDouble
Retrieves a number from IJ_Props or IJ_Prefs.txt. Does not retrieve numbers set using Prefs.set(). -
getBoolean
Retrieves a boolean from IJ_Props or IJ_Prefs.txt. Does not retrieve boolean set using Prefs.set(). -
getColor
Finds a color in IJ_Props or IJ_Prefs.txt. -
commandLineMacro
public static boolean commandLineMacro()
-