Re: EDM without showing...

Posted by Jan Eglinger on
URL: http://imagej.273.s1.nabble.com/EDM-without-showing-tp5020274p5020275.html

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