@@ -20,22 +20,28 @@ def debug_mode():
2020 return debug == "true"
2121
2222
23- def fix_ij_options ():
24- """Set up ImageJ default options.
25-
26- FIXME: Explain the rationale / idea!
23+ def set_default_ij_options ():
24+ """Configure ImageJ default options for consistency.
25+
26+ Set the following options:
27+ - Ensure ImageJ appearance settings are default values.
28+ - Set foreground color to white and background to black.
29+ - Set black background for binary images.
30+ - Set default file saving format to .txt files.
31+ - Ensure images are scaled appropriately when converting between different bit depths.
2732 """
2833
29- # disable inverting LUT
30- IJ .run ("Appearance..." , " menu=0 16-bit=Automatic" )
31- # set foreground color to be white, background black
34+ # Set all appearance settings to default values (untick all options)
35+ IJ .run ("Appearance..." , " " )
36+
37+ # Set foreground color to be white and background black
3238 IJ .run ("Colors..." , "foreground=white background=black selection=red" )
33- # black BG for binary images and pad edges when eroding
34- IJ .run ("Options..." , "black pad" )
35- # set saving format to .txt files
39+
40+ # Set black background for binary images and set pad edges to false to prevent eroding from image edge
41+ IJ .run ("Options..." , "black " )
42+
43+ # Set default saving format to .txt files
3644 IJ .run ("Input/Output..." , "file=.txt save_column save_row" )
37- # ============= DON'T MOVE UPWARDS =============
38- # set "Black Background" in "Binary Options"
39- IJ .run ("Options..." , "black" )
40- # scale when converting = checked
45+
46+ # Scale when converting = checked
4147 IJ .run ("Conversions..." , "scale" )
0 commit comments