Login  Register

Re: How to test algorithms

Posted by ctrueden on Apr 10, 2017; 6:00pm
URL: http://imagej.273.s1.nabble.com/How-to-test-algorithms-tp5018479p5018492.html

Hi Adrián,

> if i want to test which algorithm of threshold adjusting fits better
> in my pic i have to do that manually one by one. Is it possible to
> test all at the same time?

For thresholding specifically, the Fiji distribution of ImageJ includes the
Image > Adjust > Auto Threshold command, which lets you "Try All",
producing a mosaic.

For image filtering algorithms in general, one option is to use ImageJ2's
notebook.mosaic method. Here is an example Groovy script which performs
N-dimensional Gaussian blur with various settings, and displays the results
side-by-side in a 2x2 grid:

  // @ImageJ ij
  // @Dataset image
  // @OUTPUT Object mosaic

  // Smudge it up horizontally.
  double[] horizSigmas = [8, 0, 0]
  horizGauss = ij.op().filter().gauss(image, horizSigmas)

  // And now vertically.
  double[] vertSigmas = [0, 8, 0]
  vertGauss = ij.op().filter().gauss(image, vertSigmas)

  // We can also blur the channels.
  double[] channelSigmas = [0, 0, 1]
  channelGauss = ij.op().filter().gauss(image, channelSigmas)

  int[] grid = [2, 2]
  mosaic = ij.notebook().mosaic(grid, image, horizGauss, vertGauss,
channelGauss)

And here is sample output from a downsampled Fluorescent Cells sample:

Of course, you can also just show the resulting images in separate windows.

Regards,
Curtis

--
Curtis Rueden
LOCI software architect - https://loci.wisc.edu/software
ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden
Did you know ImageJ has a forum? http://forum.imagej.net/


On Sun, Apr 9, 2017 at 3:48 PM, Adrián Villalba <[hidden email]> wrote:

> Dear colleagues,
>
> How can i test different algorithms simoultaneously in one step?
>
> For example, if i want to test which algorithm of threshold adjusting fits
> better in my pic i have to do that manually one by one. Is it possible to
> test all at the same time?
>
> Thanks
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

fluorescent-cells-mosaic.png (1M) Download Attachment