User Tools

Site Tools


Sidebar

Top
Seminar
Courses -2016
Courses 2018-
Textbooks
Documents
Downloads (-2016)
Downloads (2016-)
Weblog
RSS aggregates
Discussions
Archives


EMBL BioImage Data Analysis

EuBIAS

NEUBIAS

—- Contact
CMCI Alumni
ALMF
EMBL Heidelberg
EMBL Intranet


Popularity Ranking


Timeline of @cmci_

cmci_ avatar

RT @COST_INDEPTH: Superb online training event provided by the @NEUBIAS_COST Academy, beginning on April 14th with a course on ImageJ/Fiji…
About 1 hour, 41 mins ago by: Kota Miura (@cmci_)

cmci_ avatar

RT @NEUBIAS_COST: Attention to the Bioimaging community: The NEUBIAS Academy starts with online training events https://t.co/OHpCYsNYwy h…
About 21 hours, 9 mins ago by: Kota Miura (@cmci_)

cmci_ avatar

RT @PavelTomancak: Whoa!
About 3 days, 4 hours ago by: Kota Miura (@cmci_)

cmci_ avatar

wow... https://t.co/cxgvLCIXeB
About 5 days, 2 hours ago by: Kota Miura (@cmci_)

cmci_ avatar

@e_petsalaki @GallegoLab @marko_kaksonen @Biosdfp @taraskalab @AndrewPlested @giraldezT @PeyingFong @ScottKFergusonhttps://t.co/ePwUQfWOIg
About 1 week, 3 days ago by: Kota Miura (@cmci_)

cmci_ avatar

.. I think that was a wrong link, here we go: COvid19 RESPirator OpeN SourcE https://t.co/NRILmhK0V6 #COVID19
About 1 week, 3 days ago by: Kota Miura (@cmci_)
documents:20190416ijmacro_passingarguments

Passing stdout to ImageJ / Fiji

In case you want to pass stdout to ImageJ macro headlessly, use getArgument.

For example, create a test macro like this and save it as test.ijm:

tt = getArgument();
print(tt);

Then the bash command for passing stdout to this macro headlessly is:

echo "hello" | (read arg; fiji --headless -macro test.ijm "$arg")

There could be more sophisticated ways, but the command above does work. For the command “fiji” to work, it should be set in your .profile or .bash_profile

alias fiji='/Applications/Fiji.app/Contents/MacOS/ImageJ-macosx'
… you need to change the path above according to the place where your Fiji resides.

The command could also be

echo "hello" | (read arg; fiji -batch test.ijm "$arg")

but it's slower somehow.

documents/20190416ijmacro_passingarguments.txt · Last modified: 2019/04/16 05:46 by kota