Hi All,
I have been wanting to use the Imagej library to write an independent application that demarcates cancerous regions in a tissue. But the thing is that I was not able to setup the environment properly to use Imagej as a library. So instead I decided to write the whole thing as a plugin so that I could use the in-built Imagej environment for compiling the program. Now my concern is, if I set up the environment correctly, will I be able to turn the plugin into an independent java program that uses the Imagej library and does not require the Imagej software. Is that possible? Regards, Vishnu |
Hi,
On Mon, 26 Jul 2010, Vishnu_Bhai wrote: > I have been wanting to use the Imagej library to write an independent > application that demarcates cancerous regions in a tissue. But the thing > is that I was not able to setup the environment properly to use Imagej > as a library. So instead I decided to write the whole thing as a plugin > so that I could use the in-built Imagej environment for compiling the > program. Now my concern is, if I set up the environment correctly, will > I be able to turn the plugin into an independent java program that uses > the Imagej library and does not require the Imagej software. Is that > possible? It depends how you wrote your plugin. We have some guidelines in Fiji how to write plugins so that they can be reused by other plugins (i.e. in a library-like manner): http://pacific.mpi-cbg.de/wiki/index.php/PlugIn_Design_Guidelines Basically, you must never show() images or result tables, except in the run() method. There is a further complication if you used constructions imitating interactive usage of ImageJ, such as calling something like IJ.run("Duplicate", "title=another-one"); -- in this case, using the current image (there is no current image in a library) and relying on the WindowManager to get the resulting image (there must not be any window manager in a library). Hth, Johannes |
Dear experts,
very much I should like to receive some advice concerning calling a UNIX-binary from an ImageJ (1.44) macro by use of "exec( )" on MacOS 10.4. The UNIX-binary has been installed with MacPorts and resides at /opt/local/bin/ From the OSX-Terminal I can call, e.g. its help text, as usual by MyMac:~ me$ theBinary -h or by MyMac:~ me$ /opt/local/bin/theBinary -h From an ImageJ macro I can open (start) the UNIX-binary by exec( "open", "/opt/local/bin/theBinary" ); but I can't call, e.g. its help text, neither by exec( "theBinary", "-h" ); nor by exec( "/opt/local/bin/theBinary", "-h" ); What am I doing wrong? Any help is highly appreciated! Best -- Herbie ------------------------ <http://www.gluender.de> |
Try perhaps
exec( "/opt/local/bin/theBinary -h" ); Regards Am 27.07.2010 um 15:18 schrieb Gluender: > exec( "/opt/local/bin/theBinary", "-h" ); Karsten [hidden email] |
Thanks Karsten,
but that doesn't the trick. I think I tried the obvious "permutations" but without success yet. >Try perhaps >exec( "/opt/local/bin/theBinary -h" ); > >Regards > >Am 27.07.2010 um 15:18 schrieb Gluender: > >> exec( "/opt/local/bin/theBinary", "-h" ); > >Karsten >[hidden email] Best greetings by this "local call" -- Herbie ------------------------ <http://www.gluender.de> |
Hmm, the "perhaps" was only an exaggeration!
On my Macosx 10.6.4 ImageJ 1.44e4 it does the trick! Although it does not with the comma separation! Possibly a thing how the options are read into the executable. By the way, I am using gmic(.sourceforge.net) as executable. Thanks for the "local", typically Neuherberg or Garching are never local for Munich! Karsten Am 27.07.2010 um 15:59 schrieb Gluender: > Thanks Karsten, > > but that doesn't the trick. > I think I tried the obvious "permutations" but without success yet. > >> Try perhaps >> exec( "/opt/local/bin/theBinary -h" ); >> >> Regards >> >> Am 27.07.2010 um 15:18 schrieb Gluender: >> >>> exec( "/opt/local/bin/theBinary", "-h" ); >> >> Karsten >> [hidden email] > > Best greetings by this "local call" > -- > > Herbie > > ------------------------ > <http://www.gluender.de> Karsten [hidden email] |
In reply to this post by dscho
Hi Johannes,
Well, I have not used the run method or any other Imagej functionality anywhere in the plugin. Does this mean I am fine a far as writing an independent application goes? |
In reply to this post by Gluender-4
The problem is solved, at least what concerns the UNIX-binary's main
function. It is only the help page that isn't shown by use of "-h". Strange. >Dear experts, > >very much I should like to receive some advice concerning calling a >UNIX-binary from an ImageJ (1.44) macro by use of "exec( )" on MacOS >10.4. > >The UNIX-binary has been installed with MacPorts and resides at > > /opt/local/bin/ > >From the OSX-Terminal I can call, e.g. its help text, as usual by > > MyMac:~ me$ theBinary -h > >or by > > MyMac:~ me$ /opt/local/bin/theBinary -h > > > >From an ImageJ macro I can open (start) the UNIX-binary by > > exec( "open", "/opt/local/bin/theBinary" ); > >but I can't call, e.g. its help text, neither by > > exec( "theBinary", "-h" ); > >nor by > > exec( "/opt/local/bin/theBinary", "-h" ); > > >What am I doing wrong? > >Any help is highly appreciated! Best -- Herbie ------------------------ <http://www.gluender.de> |
Free forum by Nabble | Edit this page |