@@ -23,12 +23,35 @@ def debug_mode():
23
23
def set_default_ij_options ():
24
24
"""Configure ImageJ default options for consistency.
25
25
26
- Set the following options:
27
- - Ensure ImageJ appearance settings are default values.
26
+ Will set the following options to ensure consistent behaviour independent of
27
+ how ImageJ is configured on a specific machine.
28
+
29
+ - Ensure ImageJ appearance settings are the default values.
28
30
- Set foreground color to white and background to black.
29
- - Set black background for binary images.
30
31
- Set default file saving format to .txt files.
31
- - Ensure images are scaled appropriately when converting between different bit depths.
32
+ - Ensure intensities are being scaled when converting between bit depths.
33
+ - Options on binary images:
34
+ - Set background to black.
35
+ - Enable padding to prevent eroding from image edges.
36
+ - Enforce defaults on iterations and count for *erosion*, *dilation*,
37
+ *opening* and *closing* operations.
38
+
39
+ References
40
+ ----------
41
+ The ImageJ User Guide is providing detailed explanations of the options
42
+ configured by this function:
43
+
44
+ - [Edit > Options > Appearance][ijo_app]
45
+ - [Edit > Options > Colors][ijo_col]
46
+ - [Edit > Options > Conversions][ijo_cnv]
47
+ - [Edit > Options > Input/Output][ijo_i_o]
48
+ - [Process > Binary > Options][ijo_bin]
49
+
50
+ [ijo_app]: https://imagej.net/ij/docs/guide/146-27.html#sub:Appearance...
51
+ [ijo_cnv]: https://imagej.net/ij/docs/guide/146-27.html#sub:Conversions...
52
+ [ijo_col]: https://imagej.net/ij/docs/guide/146-27.html#sub:Colors...
53
+ [ijo_i_o]: https://imagej.net/ij/docs/guide/146-27.html#sub:Input/Output...
54
+ [ijo_bin]: https://imagej.net/ij/docs/guide/146-29.html#sub:BinaryOptions...
32
55
"""
33
56
34
57
# Set all appearance settings to default values (untick all options)
@@ -37,11 +60,22 @@ def set_default_ij_options():
37
60
# Set foreground color to be white and background black
38
61
IJ .run ("Colors..." , "foreground=white background=black selection=red" )
39
62
40
- # Set black background for binary images and set pad edges to true to prevent eroding from image edge
63
+ # Options regarding binary images:
64
+ # - `black`: set background for binary images to be black.
65
+ # - `pad`: enable padding of edges to prevent eroding from image edge.
66
+ # - `iterations=1`: number of times erosion (dilation, opening, closing) is
67
+ # performed
68
+ # - `count=1`: number of adjacent background pixels necessary before a pixel
69
+ # is removed from the edge of an object during erosion and the number of
70
+ # adjacent foreground pixels necessary before a pixel is added to the edge
71
+ # of an object during dilation.
72
+ # https://imagej.net/ij/docs/menus/process.html#options
73
+ # https://imagej.net/ij/docs/guide/146-29.html#sub:BinaryOptions...
41
74
IJ .run ("Options..." , "iterations=1 count=1 black pad" )
42
75
43
76
# Set default saving format to .txt files
44
77
IJ .run ("Input/Output..." , "file=.txt save_column save_row" )
45
78
46
- # Scale when converting = checked
79
+ # Enable "scale when converting".
80
+ # https://imagej.net/ij/docs/menus/edit.html#options
47
81
IJ .run ("Conversions..." , "scale" )
0 commit comments