User Tools

Site Tools


Courses -2016
Courses 2018-
Downloads (-2016)
Downloads (2016-)
RSS aggregates

EMBL BioImage Data Analysis



—- Contact
CMCI Alumni
EMBL Heidelberg
EMBL Intranet

Popularity Ranking

Timeline of @cmci_

cmci_ avatar

RT @teofilo_breno: @TheCrick Biolmage Analysis Symposium. @infabic. #CBIAS2020 #BioImageAnalysis #Microscopy
About 14 hours, 2 mins ago by: Kota Miura (@cmci_)

cmci_ avatar

RT @dgaboriau: Fascinating talk by Peter Horvath @hpke1980 on AI based segmentation, especially good for overlapping objects like nuclei.…
About 22 hours, 3 mins ago by: Kota Miura (@cmci_)

cmci_ avatar

A new data set of mouse embryo head published, #Neubias community @ zenodo
About 1 day, 9 hours ago by: Kota Miura (@cmci_)

cmci_ avatar

@digitalsreeni @sebisabs @Apeer_micro Yes, and It would be great if APEER workflow allows minting with DOI - so a…
About 1 day, 21 hours ago by: Kota Miura (@cmci_)

cmci_ avatar

RT @LarryMattYork: If you'd like to learn more about RhizoVision Explorer and its capabilities, you can view and download the manual from t…
About 1 day, 22 hours ago by: Kota Miura (@cmci_)

cmci_ avatar

RT @DD_Wen_: Image Processing with Keras in Python: Learn powerful techniques for image analysis in Python using deep learning and convolut…
About 1 day, 22 hours ago by: Kota Miura (@cmci_)

ImaegJ Macro Headless Limitations

There are two ways to run ImageJ “Headless”ly.

1. Real-Headless: running ImageJ without any display. 2. Pseudo-Headless: running ImageJ without physical display, but with a virtual display that is hidden - virtual frame buffer. xvfb-run command is often used for this purpose.

With the second method, you can run ImageJ macro just like you do with GUI. The speed of processing is similar to that you experience with normal GUI. With the first method, as there is no GUI drawing involved, the processing becomes much faster - but there are some problems. As some of the windows often used in ImageJ macro, such as ROI Manager and Results table cause “headlessexception” error and you will fail in the successful execution of that macro. (If you use xvfb-run, this does not happen).

There is some workaround as shown below.

ROI Manager

Don't use ROI Manager in a pure-headless environment. Instead, use Overlay function like the example below.

run("Blobs (25K)");
run("Analyze Particles...", "  show=Overlay");
newImage("Untitled", "8-bit ramp", 256, 254, 1);
for (i=0; i<Overlay.size; i++) {
  mean = List.getValue("Mean");
  print(i+"  "+mean);

Results Table

You can see the results table by saveAs(“Results”, path) command, but the renaming of the results table becomes impossible in the pure-headless environment. Avoid renaming, and instead, try to save the results table as soon as the results are filled in the table with a specific file name.

documents/200720ijmacro_headless.txt · Last modified: 2020/07/20 23:39 by kota