<div dir="ltr"><div><div><div><br>I was using the threshold ops and I have a couple of questions about the <a href="https://github.com/imagej/imagej-ops/blob/master/src/main/java/net/imagej/ops/threshold/Manual.java">manualthreshold</a> op.<br>
<br></div>1. It has a variable "threshold". The parent class, <a href="https://github.com/imagej/imagej-ops/blob/master/src/main/java/net/imagej/ops/threshold/GlobalThresholdMethod.java">GlobalThresholdMethod</a> 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. <br>
<br></div>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 <a href="https://github.com/imagej/imagej-ops/blob/master/src/main/java/net/imagej/ops/threshold/GlobalThreshold.java">GlobalThreshold</a> op. <br>
<br></div>For Otsu I just do it like this<br><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">ops.run("threshold", otsu, in, new Otsu());<br>
</blockquote><div><div><div><br></div><div>But for manual I need to set the threshold parameter somehow. I tried this.<br> <blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">
Op manualOp=ops.op("manualthreshold", in, manualthreshold);<br>ops.run("threshold", manual, in, manualOp);<br></blockquote><div><br></div><div>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). <br>
<br>Any suggestions?? <br><br>Thanks<br><br>Brian <br></div></div></div></div></div>