documents:120206pyip_cooking:python_imagej_cookbook
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
documents:120206pyip_cooking:python_imagej_cookbook [2018/08/20 01:32] – [Channel Splitter] kota | documents:120206pyip_cooking:python_imagej_cookbook [2018/12/12 23:28] – [Python + ImageJ, Fiji Cookbook] kota | ||
---|---|---|---|
Line 3: | Line 3: | ||
This page was last edited at: ~~LASTMOD~~ | This page was last edited at: ~~LASTMOD~~ | ||
+ | For learning image processing using Fiji and Jython scripting, go to excellent tutorials written by Albert Cardona, such as [[https:// | ||
+ | |||
+ | This page is like a cookbook: there are no details about how to do programming, | ||
+ | |||
+ | Other resources: | ||
+ | |||
+ | [[https:// | ||
===== Jython Interpreter ===== | ===== Jython Interpreter ===== | ||
A way to run jython script from jython interpreter, | A way to run jython script from jython interpreter, | ||
Line 95: | Line 102: | ||
print op.getDirectory()+ op.getFileName() | print op.getDirectory()+ op.getFileName() | ||
</ | </ | ||
+ | |||
+ | ==== Getting the directory where the curently opened image is stored ==== | ||
+ | <code python: | ||
+ | from ij import IJ | ||
+ | |||
+ | imp = IJ.getImage() | ||
+ | print imp.getOriginalFileInfo().directory | ||
+ | </ | ||
+ | |||
+ | ... can also be done by '' | ||
+ | |||
+ | Be careful not to mix with the usage of '' | ||
+ | |||
==== Regular Expression to get meta information from file name ==== | ==== Regular Expression to get meta information from file name ==== | ||
Line 1886: | Line 1906: | ||
print p, resmap.get(p) | print p, resmap.get(p) | ||
</ | </ | ||
+ | |||
+ | ===== Plugin: MiToBo h-dome transformation ===== | ||
+ | |||
+ | h-dome is useful for spot detection in a noisy background. [[https:// | ||
+ | |||
+ | <code python> | ||
+ | from de.unihalle.informatik.MiToBo.core.datatypes.images import MTBImage | ||
+ | from de.unihalle.informatik.MiToBo.morphology import HDomeTransform3D | ||
+ | from ij import IJ | ||
+ | |||
+ | imp = IJ.getImage() | ||
+ | mtb = MTBImage.createMTBImage( imp.duplicate() ) | ||
+ | hdome = HDomeTransform3D(mtb, | ||
+ | hdome.runOp() | ||
+ | mtbdone = hdome.getResultImage() | ||
+ | imp2 = mtbdone.getImagePlus() | ||
+ | imp2.show() | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
===== R: Multi-Peak fitting using R ===== | ===== R: Multi-Peak fitting using R ===== | ||
documents/120206pyip_cooking/python_imagej_cookbook.txt · Last modified: 2022/10/16 07:12 by kota