title: Auto threshold in ImageJ/FIJI with Python
body: <p>I'm trying to write python scripts in ImageJ and I'm having problems with autothresholding. It won't let me use the <code>IJ.setAutoThreshold("Default dark")</code>. An example bit of code is below (with a few things left out for clarity):</p>
  
  <pre><code>from ij import IJ, ImagePlus
  from java.lang import Runtime, Runnable
  
  import os
  
  for i in filepaths:                        #filepaths being the files I'm opening
      IJ.open(i)
      IJ.run("Split Channels")               #this is splitting a two channel image
      imp = IJ.getImage()        
      imp.close()                            #this is closing the channel I don't want
      IJ.setAutoThreshold("Default dark")    #this is trying to set a threshold
  </code></pre>
  
  <p>Setting the auto threshold here gives </p>
  
  <pre><code>AttributeError: type object 'ij.IJ' has no attribute 'setAutoTrheshold'
  </code></pre>
  
  <p>How can I access ImageJ's threshold function?</p>
  
  <p>Cheers!</p>