Wrong output of convert.clip ops
- Dominant language
- Java
- Stars
- 94
- Forks
- 44
- PR merge metrics
- No merged PRs in 30d
Description
As discussed [on gitter](https://gitter.im/imagej/imagej-ops?at=5aa671c0e4ff28713a21aa01), the `convert.clip` op returns wrong results when used like e.g. in this Groovy script:
```groovy
#@ OpService ops
import net.imglib2.type.numeric.integer.UnsignedByteType
import net.imglib2.type.numeric.real.FloatType
clipOp = ops.op("convert.clip",new UnsignedByteType(), new FloatType())
println new FloatType(257) // 257.0
println new UnsignedByteType(257) // 1
println ops.run(clipOp, new UnsignedByteType(), new FloatType(257)) // 0 !
```
---
@ctrueden has started work on fixing the API of the convert ops here:
https://github.com/imagej/imagej-ops/compare/convert-api
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Groovy reproduction in the issue and compare the expected values with the result from ops.run(clipOp, ...). Review the convert API changes in the linked convert-api comparison; done means convert.clip returns the expected clipped value for the shown UnsignedByteType and FloatType inputs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- computer-vision
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100