Package ij
Class Prefs
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
No longer usedstatic boolean
Draw tool icons using antialiasing.static boolean
Adjust contrast when scrolling stacks (or hold shift key down)static 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
Include column headers when copying tables to clipboard.static final String
static boolean
Disable Edit/Undo command.static final String
static boolean
Don't save Results table column headersstatic boolean
Don't save Results table row numbersstatic boolean
Double buffer display of selections and overlays.static boolean
Allow lines to be created with one click at start and another at the endstatic final String
static boolean
Rotate XZ orthogonal views 180 degreesstatic final String
static boolean
Export TIFF and Raw using little-endian byte order.static boolean
Display images scaled <100% using bilinear interpolationstatic 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
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 using double buffering, except on OS Xstatic 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 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
Use sub-pixel resolution with line selectionsstatic 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 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) Finds a boolean in IJ_Props or IJ_Prefs.txt.static Color
Finds a color in IJ_Props or IJ_Prefs.txt.static Properties
static String
Returns the default directory, if any, or null.static double
Looks up a real number in IJ_Props or IJ_Prefs.txt.static String
Returns the file.separator system property.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
Finds an int in IJ_Props or IJ_Prefs.txt.static Point
getLocation
(String key) Uses the keywordkey
to retrieve a location from the preferences file.static String
Gets the path to the directory where the preferences file (IJPrefs.txt) is saved.static String
Finds an string in IJ_Props or IJ_Prefs.txt.static String
Finds an string in 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 ImageJ configuration file, "IJ_Props.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 boolean variablevalue
in the preferences file using the keywordkey
.static void
Savesvalue
in the preferences file using the keywordkey
.static void
Savesvalue
in the preferences file using the keywordkey
.static void
Saves the value of the stringtext
in the preferences file using the keywordkey
.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:
-
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. -
intelByteOrder
public static boolean intelByteOrderExport TIFF and Raw using little-endian byte order. -
doubleBuffer
public static boolean doubleBufferDouble buffer display of selections and overlays. -
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 -
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 (or hold shift key down) -
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 using double buffering, except on OS X -
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.
-
-
Constructor Details
-
Prefs
public Prefs()
-
-
Method Details
-
load
Finds and loads the ImageJ configuration file, "IJ_Props.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. -
getPrefsDir
Gets the path to the directory where the preferences file (IJPrefs.txt) is saved. -
getDefaultDirectory
Returns the default directory, if any, or null. -
getString
Finds an string in IJ_Props or IJ_Prefs.txt. -
getString
Finds an string in IJ_Props or IJ_Prefs.txt. -
getBoolean
Finds a boolean in IJ_Props or IJ_Prefs.txt. -
getInt
Finds an int in IJ_Props or IJ_Prefs.txt. -
getDouble
Looks up a real number in IJ_Props or IJ_Prefs.txt. -
getColor
Finds a color in IJ_Props or IJ_Prefs.txt. -
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. -
set
Saves the value of the stringtext
in the preferences file using the keywordkey
. This string can be retrieved using the appropriateget()
method. -
set
Savesvalue
in the preferences file using the keywordkey
. This value can be retrieved using the appropriategetPref()
method. -
set
Savesvalue
in the preferences file using the keywordkey
. This value can be retrieved using the appropriategetPref()
method. -
set
Saves the boolean variablevalue
in the preferences file using the keywordkey
. This value can be retrieved using the appropriategetPref()
method. -
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. -
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
-