Skip to content

Instantly share code, notes, and snippets.

@miura
Created February 1, 2023 17:46
Show Gist options
  • Save miura/9080feb52eb74079ae393dd9320cb6ed to your computer and use it in GitHub Desktop.
Save miura/9080feb52eb74079ae393dd9320cb6ed to your computer and use it in GitHub Desktop.
from ij import ImagePlus, IJ
from emblcmci import BleachCorrection
url = "/home/miura/yeastNucleus2DT.tif"
imp = ImagePlus(url)
print imp.getStackSize()
bc = BleachCorrection()
### simple rtio method
#bc.setHeadlessProcessing(True)
#bc.setCorrectionMethod(BleachCorrection.SIMPLE_RATIO)
#bc.setSimpleRatioBaseline(5)
### exponential fit method
bc.setCorrectionMethod(BleachCorrection.EXPONENTIAL_FIT)
bc.setHeadlessProcessing(True)
### Histogram Matching Method
#bc.setCorrectionMethod(BleachCorrection.HISTOGRAM_MATCHING)
impcorrected = bc.doCorrection(imp)
#imp.show()
#impcorrected.show()
print "...done"
IJ.log("... ...done")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment