Any ideas how we can make this smarter? Can the OpService help us here?
Christian
PS: In the particular case of ApplyConstantThreshold we could introduce a MapIIandConstantToII and all others RAI. Then we can use a BinaryMap in the ApplyConstantThreshold which also seems to be more correct in comparison to updating a parameter manually. What do you think @LeonYang5114 @ctrueden?
From https://github.com/imagej/imagej-ops/blob/master/src/main/java/net/imagej/ops/special/hybrid/BinaryHybridCFI.java#L81 we see that
Op
s usually are thread-safe. However, https://github.com/imagej/imagej-ops/blob/master/src/main/java/net/imagej/ops/threshold/apply/ApplyConstantThreshold.java#L73 isn't. We can now overridegetIndependentInstance
but this implies that allOp
s which are using thisOp
have to overridegetIndependentInstance
(and call it on their children,...).Any ideas how we can make this smarter? Can the
OpService
help us here?Christian
PS: In the particular case of
ApplyConstantThreshold
we could introduce aMapIIandConstantToII
and all othersRAI
. Then we can use aBinaryMap
in theApplyConstantThreshold
which also seems to be more correct in comparison to updating a parameter manually. What do you think @LeonYang5114 @ctrueden?