EDM without showing...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

EDM without showing...

Gabriel Landini
Hi, I wonder if it is possible (in Java) to do a 32 bit distance map, without
being shown and instead return it as an ImagePlus.
I know that one can do, for example the following on image "i" which is imp2
and get the result in imp3:

IJ.run(imp2, "Distance Map", "");
imp3 = WindowManager.getImage("EDM of i");

However there must be a better way of doing this.
Thanks for any suggestions.

Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: EDM without showing...

Jan Eglinger
Hi Gabriel,

you should be able to use the public method:

makeFloatEDM(ImageProcessor, int, boolean)

see the EDM class javadoc [1].

Also, you can call ImageJ Ops to get a distance transform. For an
example in Java, see my AnisotropicDistanceMap IJ2 plugin [2] that can
run in both ImageJ and KNIME.

Hope that helps,
Jan

[1]: http://javadoc.scijava.org/ImageJ1/ij/plugin/filter/EDM.html
[2]:
https://github.com/fmi-faim/fmi-ij2-plugins/blob/88a8b74cc5b22927c719aea00d3ae21b704818c4/src/main/java/ch/fmi/AnisotropicDistanceMap.java#L40-L60



On 13.03.2018 17:47, Gabriel Landini wrote:

> Hi, I wonder if it is possible (in Java) to do a 32 bit distance map, without
> being shown and instead return it as an ImagePlus.
> I know that one can do, for example the following on image "i" which is imp2
> and get the result in imp3:
>
> IJ.run(imp2, "Distance Map", "");
> imp3 = WindowManager.getImage("EDM of i");
>
> However there must be a better way of doing this.
> Thanks for any suggestions.
>
> Gabriel
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: EDM without showing...

Gabriel Landini
On Tuesday, 13 March 2018 17:05:36 GMT [hidden email] wrote:
> you should be able to use the public method:
> makeFloatEDM(ImageProcessor, int, boolean)

Ah, thanks Jan, will look into it.

Cheers

Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html