http://imagej.273.s1.nabble.com/Fiji-ImageJ-Headless-if-not-in-path-tp5012586p5012589.html
Thanks. Is there a version of fiji on MAC that would install itself to the
> Hi Adam,
>
> > Does anyone know how to configure a Mac and/or Ubuntu system path so
> > that we could just run fiji from any terminal?
>
> The issue is complicated by the fact that the launcher executable is named
> differently for every platform.
>
> Personally, I work around it via the following shell script:
> *
>
>
https://github.com/imagej/imagej-omero/blob/imagej-omero-0.2.1/bin/run-class>
> Alternately, the ImageJ.sh script (
>
https://github.com/imagej/imagej/blob/imagej-2.0.0-rc-29/bin/ImageJ.sh)
> tries very hard to launch ImageJ without using any launcher executable. In
> that way, you can run ImageJ on platforms for which no launcher has been
> compiled, such as the Raspberry Pi.
>
> HTH,
> Curtis
>
> On Thu, Apr 23, 2015 at 3:32 PM, Adam Hughes <
[hidden email]>
> wrote:
>
> > Hi,
> >
> > I'm trying to run a fiji macro in headless mode through python. I'm on
> > ubuntu, but also need to do this on a Mac. I've downloaded fiji from
> > source, and can doubleclick the icon to launch the application fine. The
> > icon refers to the file:
> >
> > ~/Fiji.app/ImageJ2.desktop
> >
> > However, to use Fiji in headless mode, the guides imply that I want to do
> > this:
> >
> > ImageJ --headless -macro path-to-Macro.ijm
> >
> > Or
> >
> > fiji --headless -macro path-to-Macro.ijm
> >
> > However, fiji and ImageJ are not in python. So this command doesn't
> work.
> > Does anyone know how to configure a Mac and/or Ubuntu system path so that
> > we could just run fiji from any terminal? At the end of the day, my
> python
> > function looks like this (currently not working):
> >
> > def IJwatershed(bw_image):
> > imsave('fooing', bw_image)
> > macro_file = 'Watershed.imj'
> > * path_to_fiji* = '/home/glue/Desktop/Fiji.app/ImageJ2.desktop'
> > command = "%s --headless %s" % (path_to_fiji, macro_file)
> > with open('foo', 'w') as dnull:
> > p = subprocess.call(command, shell=False)#
> stderr=subprocess.PIPE)
> >
> > And it seems to not work because of my *path_to_fiji *not being
> understood.
> >
> > --
> > ImageJ mailing list:
http://imagej.nih.gov/ij/list.html> >
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>