Skip to content
Snippets Groups Projects
Select Git revision
  • 74ba924f9ad5cc156f2ae4311c580175ec4aa582
  • master default protected
  • develop protected
  • cmake_boost_refactor
  • ubuntu_ci
  • mmtf
  • non-orthogonal-maps
  • no_boost_filesystem
  • data_viewer
  • 2.11.1
  • 2.11.0
  • 2.10.0
  • 2.9.3
  • 2.9.2
  • 2.9.1
  • 2.9.0
  • 2.8.0
  • 2.7.0
  • 2.6.1
  • 2.6.0
  • 2.6.0-rc4
  • 2.6.0-rc3
  • 2.6.0-rc2
  • 2.6.0-rc
  • 2.5.0
  • 2.5.0-rc2
  • 2.5.0-rc
  • 2.4.0
  • 2.4.0-rc2
29 results

test_star_parser.cc

Blame
  • prefs.py 802 B
    """Functions to work with ImageJ preferences."""
    
    from ij import Prefs
    
    def debug_mode():
        """Wrapper to check if 'imcf.debugging' is enabled.
    
        This is a workaround for a Jython issue in ImageJ with values that are
        stored in the "IJ_Prefs.txt" file being cast to the wrong types and / or
        values in Python. Callling Prefs.get() using a (Python) boolean as the
        second parameter always leads to the return value '0.0' (Python type float),
        no matter what is actually stored in the preferences. Doing the same in e.g.
        Groovy behaves correctly.
    
        Calling Prefs.get() as below with the second parameter being a string and
        subsequently checking the string value leads to the expected result.
        """
        debug = Prefs.get("imcf.debugging", "false")
        return debug == "true"