User Tools

Site Tools


Sidebar

Top
Profile
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 @KuglerElisabeth: One question I often get is "How do I assess my segmentation?" Together with Andrik Bin Rampun, .@Timchico, and Paul…
About 3 hours, 8 mins ago by: Kota Miura (@cmci_)

cmci_ avatar

RT @clairebrown514: @cmci_ We use https://t.co/J9y0625zRl . People still need to be convinced and reminded to put the #RRID in the acknowled…
About 4 hours, 7 mins ago by: Kota Miura (@cmci_)

cmci_ avatar

RT @Coronin: Wonderful historical perspective from Tom Pollard: Landmarks in the discovery of a role for actin in cell locomotion https://t…
About 12 hours, 44 mins ago by: Kota Miura (@cmci_)

cmci_ avatar

RT @IAMichaelNelson: @cmci_ @CCI_liv I recommended to my old core https://t.co/mOai5Zez5b . A "how to use our core facility" protocol and ma…
About 18 hours, 7 mins ago by: Kota Miura (@cmci_)

cmci_ avatar

RT @cmci_: @CCI_liv It’s an idea. What would you say? There are journals that allows versioning, so it can be updated every time when there…
About 18 hours, 25 mins ago by: Kota Miura (@cmci_)

cmci_ avatar

@CCI_liv It’s an idea. What would you say? There are journals that allows versioning, so it can be updated every ti… https://t.co/xz3xKR243j
About 18 hours, 34 mins 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 12:46 by kota