User Tools

Site Tools


documents:120206pyip_cooking:python_imagej_cookbook

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
documents:120206pyip_cooking:python_imagej_cookbook [2018/08/20 01:32] – [Channel Splitter] kotadocuments:120206pyip_cooking:python_imagej_cookbook [2018/11/23 02:37] – [Getting the directory where the curently opened image is stored] kota
Line 95: Line 95:
 print op.getDirectory()+ op.getFileName() print op.getDirectory()+ op.getFileName()
 </code> </code>
 +
 +==== Getting the directory where the curently opened image is stored ====
 +<code python:1>
 +from ij import IJ
 +
 +imp = IJ.getImage()
 +print imp.getOriginalFileInfo().directory
 +</code>
 +
 +... can also be done by ''%%IJ.getDirectory("image")%%'', but with this IJ method, one cannot specify target ImagePlus object. See also the [[https://github.com/imagej/imagej1/blob/master/ij/IJ.java#L1652-L1663|source code of IJ.getDirectory]]
 +
  
 ==== Regular Expression to get meta information from file name ==== ==== Regular Expression to get meta information from file name ====
documents/120206pyip_cooking/python_imagej_cookbook.txt · Last modified: 2022/10/16 07:12 by kota

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki