Re: Importing ImageJ classes into Matlab
- From: vonschwartzwalder <vonschwartzwalder@xxxxxxx>
- Date: 29 May 2007 03:27:52 -0700
On May 29, 3:32 am, greg <jsg...@xxxxxxxxxxx> wrote:
On 27 May, 12:11, vonschwartzwalder <vonschwartzwal...@xxxxxxx> wrote:
On May 26, 12:26 pm, ezkcdude <zamir.e...@xxxxxxxxx> wrote:
Has anyone done this?
Yes.
How? Please tell.
If you are using a recent version of MatLab, just put the ImageJ jar
file (ij.jar) in the Java path. MatLab uses Java for it's front end,
so you just need to make sure it can find the classes you want to
use. Once that is done you can instantiate classes at will. MatLab
provides data type translation almost transparently.
I did this, and I also wrote my own classes that call ImageJ classes.
For example:
----------
function result = doSomething(arg1, arg2)
% function that returns a result that comes from doing something in
Java
% make sure you import the class you are going to use
import com.company.library.*;
% call the Java class
result = MyClass.doSomething(arg1, arg2);
----------
The only tricky part of this whole thing is getting the path right,
but once you get it, the Java is very simple.
duane
.
- References:
- Importing ImageJ classes into Matlab
- From: ezkcdude
- Re: Importing ImageJ classes into Matlab
- From: vonschwartzwalder
- Re: Importing ImageJ classes into Matlab
- From: greg
- Importing ImageJ classes into Matlab
- Prev by Date: Re: Importing ImageJ classes into Matlab
- Next by Date: Who's the Coward Who Anonymously Rates These Posts?
- Previous by thread: Re: Importing ImageJ classes into Matlab
- Next by thread: to piece together a mosaic picture from 12 pictures with a little overlap on sides .
- Index(es):
Relevant Pages
|