documents:120206pyip_cooking:python_imagej_cookbook
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
documents:120206pyip_cooking:python_imagej_cookbook [2022/10/16 07:12] – [Using Java8 Stream] kota | documents:120206pyip_cooking:python_imagej_cookbook [2024/10/08 17:45] (current) – [Accessing multiple files to load image sequences] kota | ||
---|---|---|---|
Line 410: | Line 410: | ||
</ | </ | ||
==== Accessing multiple files to load image sequences ==== | ==== Accessing multiple files to load image sequences ==== | ||
+ | |||
+ | A simple way is to use glob package (file not loaded in this example). | ||
+ | <code python linenums: | ||
+ | import glob, os | ||
+ | from ij.io import DirectoryChooser | ||
+ | |||
+ | srcDir = DirectoryChooser(" | ||
+ | for filename in glob.glob(os.path.join(srcDir, | ||
+ | print(os.path.basename(filename)) | ||
+ | </ | ||
Here is a cool script written by Christian Tischer for loading image series using file prefix as dictionary keys. | Here is a cool script written by Christian Tischer for loading image series using file prefix as dictionary keys. |
documents/120206pyip_cooking/python_imagej_cookbook.txt · Last modified: 2024/10/08 17:45 by kota