User Tools

Site Tools


documents:200720ijmacro_headless

Differences

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

Link to this comparison view

documents:200720ijmacro_headless [2020/07/20 18:58] – created kotadocuments:200720ijmacro_headless [2020/07/20 23:39] (current) kota
Line 1: Line 1:
 ====== ImaegJ Macro Headless Limitations ====== ====== ImaegJ Macro Headless Limitations ======
  
-===== Results Table =====+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. 
  
 https://github.com/imagej/imagej-legacy/issues/153 https://github.com/imagej/imagej-legacy/issues/153
Line 20: Line 31:
 </code> </code>
  
-==== ROI Manager ==== +===== 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

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki