Hi Curtis

That would be perfect.  It would be great to have all the thresholding
methods available in IJ1 accessible from Ops.

Brian

On Tue, Sep 9, 2014 at 12:03 PM, Curtis Rueden <[email protected]> wrote:

> Hi Brian,
>
> > I was using the threshold ops and I have a couple of questions about
> > the manualthreshold op.
>
> Let's go over these issues during next week's hackathon, if that works for
> you. Looking very briefly at the OPS thresholding code, I see a few
> problems we'll need to fix.
>
> In general, I think all of the thresholding code would benefit from
> unification under ImageJ OPS. Right now, ImageJ Common has its own
> threshold package (
> https://github.com/imagej/imagej-common/tree/master/src/main/java/net/imagej/threshold)
> with its own ThresholdMethod plugin. It would be better to provide that
> functionality in OPS. A potential hackathon project for next week?
>
> Regards,
> Curtis
>
> On Thu, Aug 28, 2014 at 4:33 PM, Brian Northan <[email protected]> wrote:
>
>>
>> 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
>>
>> _______________________________________________
>> ImageJ-devel mailing list
>> [email protected]
>> http://imagej.net/mailman/listinfo/imagej-devel
>>
>>
>
_______________________________________________
ImageJ-devel mailing list
[email protected]
http://imagej.net/mailman/listinfo/imagej-devel

Reply via email to