Login  Register

Use Rank() - rankFloat() (RankFilters) in a plugin.

Posted by Joris FA Meys on Feb 05, 2009; 11:48am
URL: http://imagej.273.s1.nabble.com/Use-Rank-rankFloat-RankFilters-in-a-plugin-tp3693843.html

Dear all,

I'm writing (yet another) plugin for edge detection, and i want to apply the
median filter, but not with a 3x3 kernel but with a circular mask. I know I
can run the command with IJ.doCommand("Median"), but when I try that (or
IJ.run), I get the message "image locked". with IJ.RunPlugIn("Median",null),
I get simply nothing.

Plus, I don't want the image filter to open, I just want to apply the method
rankFloat to my imageprocessor with a fixed radius. I tried accessing the
method, but got (off course) the static/nonstatic error. Tried to instantize
RankFilters and do it that way, but that didn't want to work either. Right
now, I copied the code of rankFloat() and adjusted it for my own use. It
works, but it's not really elegant to say at least.

Anybody who knows to do this right?
Kind regards
Joris