[ImageJ-devel] manual threshold op
Brian Northan
bnorthan at gmail.com
Thu Aug 28 16:33:56 CDT 2014
I was using the threshold ops and I have a couple of questions about the
manualthreshold
<https://github.com/imagej/imagej-ops/blob/master/src/main/java/net/imagej/ops/threshold/Manual.java>
op.
1. It has a variable "threshold". The parent class, GlobalThresholdMethod
<https://github.com/imagej/imagej-ops/blob/master/src/main/java/net/imagej/ops/threshold/GlobalThresholdMethod.java>
also has a private variable threshold. The code compiles but would the
OpService get confused when it tries to create the op?? I get a
illegalargument exception when trying to create it. But if I rename the
duplicate 'threshold' variable I can then create the op with the op
service.
2. I can't figure out how to create the manualthreshold op, set the manual
threshold parameter and then pass the manualthreshold op to the
GlobalThreshold
<https://github.com/imagej/imagej-ops/blob/master/src/main/java/net/imagej/ops/threshold/GlobalThreshold.java>
op.
For Otsu I just do it like this
ops.run("threshold", otsu, in, new Otsu());
>
But for manual I need to set the threshold parameter somehow. I tried this.
>
> Op manualOp=ops.op("manualthreshold", in, manualthreshold);
> ops.run("threshold", manual, in, manualOp);
>
But it doesn't totally make sense to me to do it that way and it throws an
exception anyway. Parameters get injected twice (again when
GlobalThreshold attempts to run "manualOp" to get the threshold).
Any suggestions??
Thanks
Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-devel/attachments/20140828/2e76cb28/attachment.html>
More information about the ImageJ-devel
mailing list