ij
public class Prefs extends java.lang.Object
ImageJ
Modifier and Type | Field and Description |
---|---|
static boolean |
antialiasedText
No longer used
|
static boolean |
antialiasedTools
Draw tool icons using antialiasing.
|
static boolean |
autoContrast
Adjust contrast when scrolling stacks (or hold shift key down)
|
static boolean |
autoRunExamples
Automatically run examples in Help/Examples menu.
|
static boolean |
avoidResliceInterpolation
Avoid interpolation when re-slicing
|
static java.lang.String |
BCOLOR |
static boolean |
blackBackground
Backgound is black in binary images
|
static boolean |
blackCanvas
Use black image border.
|
static boolean |
copyColumnHeaders
Include column headers when copying tables to clipboard.
|
static java.lang.String |
DIR_IMAGE |
static boolean |
disableUndo
Disable Edit/Undo command.
|
static java.lang.String |
DIV_BY_ZERO_VALUE |
static boolean |
dontSaveHeaders
Don't save Results table column headers
|
static boolean |
dontSaveRowNumbers
Don't save Results table row numbers
|
static boolean |
doubleBuffer
Double buffer display of selections and overlays.
|
static boolean |
enhancedLineTool
Allow lines to be created with one click at start and another at the end
|
static java.lang.String |
FCOLOR |
static boolean |
flipXZ
Rotate XZ orthogonal views 180 degrees
|
static java.lang.String |
FPS |
static boolean |
intelByteOrder
Export TIFF and Raw using little-endian byte order.
|
static boolean |
interpolateScaledImages
Display images scaled <100% using bilinear interpolation
|
static java.lang.String |
JPEG |
static boolean |
keepArrowSelections
Keep arrow selection after adding to overlay
|
static boolean |
keepUndoBuffers
Preserve undo (snapshot) buffers when switching images
|
static java.lang.String |
KEY_PREFIX |
static java.lang.String |
MENU_SIZE |
static boolean |
moveToMisc
Move isolated plugins to Miscellaneous submenu.
|
static boolean |
multiPointMode
Use MultiPoint tool.
|
static boolean |
noBorder
Do not draw black border around image.
|
static boolean |
noClickToGC
Don't run garbage collector when user clicks in status bar
|
static java.lang.String |
NOISE_SD |
static boolean |
noPointLabels
Do not label multiple points created using point tool.
|
static boolean |
noRowNumbers
Do not include row numbers when copying tables to clipboard.
|
static boolean |
open100Percent
Open images at 100% magnification
|
static boolean |
openDicomsAsFloat
Open DICOMs as 32-bit float images
|
static java.lang.String |
OPTIONS |
static java.lang.String |
OPTIONS2 |
static boolean |
padEdges
Extend the borders to foreground for binary erosions and closings.
|
static boolean |
paintDoubleBuffered
Aways paint using double buffering, except on OS X
|
static boolean |
pointAddToManager
Add points to ROI Manager.
|
static boolean |
pointAddToOverlay
Add points to overlay.
|
static boolean |
pointAutoMeasure
Point tool auto-measure mode.
|
static boolean |
pointAutoNextSlice
Point tool auto-next slice mode (not saved in IJ_Prefs).
|
static java.lang.String |
PREFS_NAME |
static java.lang.String |
PROPS_NAME |
static boolean |
reflexAngle
Angle tool measures reflex angle
|
static boolean |
requireControlKey
Require control or command key for keybaord shortcuts.
|
static boolean |
reverseNextPreviousOrder
Reverse channel-slice-frame priority used by Next Slice and Previous Slice commands.
|
static java.lang.String |
ROICOLOR |
static boolean |
rotateYZ
Rotate YZ orthogonal views 90 degrees
|
static boolean |
runSocketListener
Run the SocketListener.
|
static java.lang.String |
separator
file.separator system property
|
static java.lang.String |
SHOW_ALL_COLOR |
static boolean |
showAllSliceOnly
Only show ROIs associated with current slice in Roi Manager "Show All" mode.
|
static boolean |
skipRawDialog
Do not display dialog when opening .raw files
|
static boolean |
subPixelResolution
Use sub-pixel resolution with line selections
|
static java.lang.String |
THREADS |
static boolean |
useFileChooser
Use the file chooser to import and export image sequences on Windows and Linux
|
static boolean |
useInvertingLut
Open 8-bit images with inverting LUT so 0 is white and 255 is black.
|
static boolean |
useJFileChooser
Use JFileChooser instead of FileDialog to open and save files.
|
static boolean |
useNamesAsLabels
Use ROI names as "show all" labels in the ROI Manager
|
static boolean |
usePointerCursor
Use pointer cursor instead of cross
|
static boolean |
useSystemProxies
Set the "java.net.useSystemProxies" property
|
static boolean |
verticalProfile
Plot rectangular selectons vertically
|
static java.lang.String |
vistaHint |
static boolean |
weightedColor
Color to grayscale conversion is weighted (0.299, 0.587, 0.114) if the variable is true.
|
Constructor and Description |
---|
Prefs() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
defaultResultsExtension() |
static boolean |
get(java.lang.String key,
boolean defaultValue)
Uses the keyword
key to retrieve a boolean from
the preferences file. |
static double |
get(java.lang.String key,
double defaultValue)
Uses the keyword
key to retrieve a number from the
preferences file. |
static java.lang.String |
get(java.lang.String key,
java.lang.String defaultValue)
Uses the keyword
key to retrieve a string from the
preferences file. |
static boolean |
getBoolean(java.lang.String key,
boolean defaultValue)
Finds a boolean in IJ_Props or IJ_Prefs.txt.
|
static java.awt.Color |
getColor(java.lang.String key,
java.awt.Color defaultColor)
Finds a color in IJ_Props or IJ_Prefs.txt.
|
static java.util.Properties |
getControlPanelProperties() |
static java.lang.String |
getDefaultDirectory()
Returns the default directory, if any, or null.
|
static double |
getDouble(java.lang.String key,
double defaultValue)
Looks up a real number in IJ_Props or IJ_Prefs.txt.
|
static java.lang.String |
getFileSeparator()
Returns the file.separator system property.
|
static java.lang.String |
getHomeDir()
Obsolete, replaced by getImageJDir(), which, unlike this method,
returns a path that ends with File.separator.
|
static java.lang.String |
getImageJDir()
Returns the path, ending in File.separator, to the ImageJ directory.
|
static java.lang.String |
getImagesURL()
Returns the URL of the directory that contains the ImageJ sample images.
|
static int |
getInt(java.lang.String key,
int defaultValue)
Finds an int in IJ_Props or IJ_Prefs.txt.
|
static java.awt.Point |
getLocation(java.lang.String key)
Uses the keyword
key to retrieve a location
from the preferences file. |
static java.lang.String |
getPrefsDir()
Gets the path to the directory where the
preferences file (IJPrefs.txt) is saved.
|
static java.lang.String |
getString(java.lang.String key)
Finds an string in IJ_Props or IJ_Prefs.txt.
|
static java.lang.String |
getString(java.lang.String key,
java.lang.String defaultString)
Finds an string in IJ_Props or IJ_Prefs.txt.
|
static int |
getThreads()
Returns the number of threads used by PlugInFilters to process images and stacks.
|
static int |
getTransparentIndex()
Returns the transparent index (0-255), or -1 if transparency is disabled.
|
static java.lang.String |
load(java.lang.Object ij,
java.applet.Applet applet)
Finds and loads the ImageJ configuration file, "IJ_Props.txt".
|
static void |
resetPreferences()
Delete the preferences file when ImageJ quits.
|
static void |
saveLocation(java.lang.String key,
java.awt.Point loc)
Saves the Point
loc in the preferences
file as a string using the keyword key . |
static void |
savePreferences()
Saves user preferences in the IJ_Prefs.txt properties file.
|
static void |
savePrefs(java.util.Properties prefs,
java.lang.String path) |
static void |
set(java.lang.String key,
boolean value)
Saves the boolean variable
value in the preferences
file using the keyword key . |
static void |
set(java.lang.String key,
double value)
Saves
value in the preferences file using
the keyword key . |
static void |
set(java.lang.String key,
int value)
Saves
value in the preferences file using
the keyword key . |
static void |
set(java.lang.String key,
java.lang.String text)
Saves the value of the string
text in the preferences
file using the keyword key . |
static void |
setImagesURL(java.lang.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.
|
public static final java.lang.String PROPS_NAME
public static final java.lang.String PREFS_NAME
public static final java.lang.String DIR_IMAGE
public static final java.lang.String FCOLOR
public static final java.lang.String BCOLOR
public static final java.lang.String ROICOLOR
public static final java.lang.String SHOW_ALL_COLOR
public static final java.lang.String JPEG
public static final java.lang.String FPS
public static final java.lang.String DIV_BY_ZERO_VALUE
public static final java.lang.String NOISE_SD
public static final java.lang.String MENU_SIZE
public static final java.lang.String THREADS
public static final java.lang.String KEY_PREFIX
public static final java.lang.String OPTIONS
public static final java.lang.String vistaHint
public static final java.lang.String OPTIONS2
public static java.lang.String separator
public static boolean usePointerCursor
public static boolean antialiasedText
public static boolean interpolateScaledImages
public static boolean open100Percent
public static boolean blackBackground
public static boolean useJFileChooser
public static boolean weightedColor
public static boolean blackCanvas
public static boolean pointAutoMeasure
public static boolean pointAutoNextSlice
public static boolean requireControlKey
public static boolean useInvertingLut
public static boolean antialiasedTools
public static boolean intelByteOrder
public static boolean doubleBuffer
public static boolean noPointLabels
public static boolean disableUndo
public static boolean noBorder
public static boolean showAllSliceOnly
public static boolean copyColumnHeaders
public static boolean noRowNumbers
public static boolean moveToMisc
public static boolean pointAddToManager
public static boolean pointAddToOverlay
public static boolean padEdges
public static boolean runSocketListener
public static boolean multiPointMode
public static boolean openDicomsAsFloat
public static boolean verticalProfile
public static boolean rotateYZ
public static boolean flipXZ
public static boolean dontSaveHeaders
public static boolean dontSaveRowNumbers
public static boolean noClickToGC
public static boolean reflexAngle
public static boolean avoidResliceInterpolation
public static boolean keepUndoBuffers
public static boolean useNamesAsLabels
public static boolean useSystemProxies
public static boolean useFileChooser
public static boolean subPixelResolution
public static boolean autoContrast
public static boolean enhancedLineTool
public static boolean keepArrowSelections
public static boolean paintDoubleBuffered
public static boolean skipRawDialog
public static boolean reverseNextPreviousOrder
public static boolean autoRunExamples
public static java.lang.String load(java.lang.Object ij, java.applet.Applet applet)
public static java.lang.String getImagesURL()
public static void setImagesURL(java.lang.String url)
public static java.lang.String getHomeDir()
public static java.lang.String getImageJDir()
public static java.lang.String getPrefsDir()
public static java.lang.String getDefaultDirectory()
public static java.lang.String getString(java.lang.String key)
public static java.lang.String getString(java.lang.String key, java.lang.String defaultString)
public static boolean getBoolean(java.lang.String key, boolean defaultValue)
public static int getInt(java.lang.String key, int defaultValue)
public static double getDouble(java.lang.String key, double defaultValue)
public static java.awt.Color getColor(java.lang.String key, java.awt.Color defaultColor)
public static java.lang.String getFileSeparator()
public static void savePreferences()
public static void resetPreferences()
public static void set(java.lang.String key, java.lang.String text)
text
in the preferences
file using the keyword key
. This string can be
retrieved using the appropriate get()
method.public static void set(java.lang.String key, int value)
value
in the preferences file using
the keyword key
. This value can be retrieved
using the appropriate getPref()
method.public static void set(java.lang.String key, double value)
value
in the preferences file using
the keyword key
. This value can be retrieved
using the appropriate getPref()
method.public static void set(java.lang.String key, boolean value)
value
in the preferences
file using the keyword key
. This value can be retrieved
using the appropriate getPref()
method.public static java.lang.String get(java.lang.String key, java.lang.String defaultValue)
key
to retrieve a string from the
preferences file. Returns defaultValue
if the key
is not found.public static double get(java.lang.String key, double defaultValue)
key
to retrieve a number from the
preferences file. Returns defaultValue
if the key
is not found.public static boolean get(java.lang.String key, boolean defaultValue)
key
to retrieve a boolean from
the preferences file. Returns defaultValue
if
the key is not found.public static void saveLocation(java.lang.String key, java.awt.Point loc)
loc
in the preferences
file as a string using the keyword key
.public static java.awt.Point getLocation(java.lang.String key)
key
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).public static void savePrefs(java.util.Properties prefs, java.lang.String path) throws java.io.IOException
java.io.IOException
public static int getThreads()
public static void setThreads(int n)
public static void setTransparentIndex(int index)
public static int getTransparentIndex()
public static java.util.Properties getControlPanelProperties()
public static java.lang.String defaultResultsExtension()