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

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

cmci_ avatar

@notjustmoore @haesleinhuepf @LaineBioImaging @alicepyne @RSE_Sheffield @sebastianmunck How about reverse coding -… https://t.co/8MhZOclxyn
About 5 days, 12 hours ago by: Kota Miura (@cmci_)

cmci_ avatar

does this have to be deep-learning? https://t.co/hMrdeCfFO5
About 1 week, 1 day ago by: Kota Miura (@cmci_)

cmci_ avatar

RT @BioImagingUK: Lots of people were asking if this was recorded, so thank you @EuroBioImaging for uploading Anna Kreshuk's great talk to…
About 1 week, 1 day ago by: Kota Miura (@cmci_)

cmci_ avatar

RT @NEUBIAS_COST: Job offer for #BIOIMAGE_ANALYST at Core Facility for Integrated Microscopy (CFIM), the Faculty of Health Sciences, Univer…
About 1 week, 2 days ago by: Kota Miura (@cmci_)

cmci_ avatar

RT @NEUBIAS_COST: Job offer for #BIOIMAGEANALYST at @GuckLab Apply until 30.11.2020 https://t.co/Rk6F5cN4Hp https://t.co/4z5Y52Caig
About 1 week, 2 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 12:46 by kota