Refactor multi-channel image support
- Dominant language
- Java
- Stars
- 3
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
The [ImgToMatVector](https://github.com/imagej/imagej-opencv/blob/5dea3b042a7807a578d8e9632cf70313bbcfd4c5/src/main/java/net/imagej/opencv/ImgToMatVectorConverter.java#L72) and [MatVectorToImg](https://github.com/imagej/imagej-opencv/blob/5dea3b042a7807a578d8e9632cf70313bbcfd4c5/src/main/java/net/imagej/opencv/MatVectorToImgConverter.java#L72) convertors do not follow the `Mat <--> Img` converter format of having static methods we can call into for conversion. This limits them in being exposed e.g. via SciJava Ops.
We should:
- [ ] extract the conversion logic to static utility functions
- [ ] Reassess the conversion logic. [This](https://github.com/imagej/imagej-opencv/blob/5dea3b042a7807a578d8e9632cf70313bbcfd4c5/src/main/java/net/imagej/opencv/ImgToMatVectorConverter.java#L77-L83) looks extremely easy to break, e.g. interleaved data. Also may break down with 4+ dimensions.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with src/main/java/net/imagej/opencv/ImgToMatVectorConverter.java and MatVectorToImgConverter.java at the linked conversion methods, then compare them with the existing Mat ↔ Img converter format. Reassess the conversion behavior for interleaved data and four-or-more dimensions, and finish when static utility entry points exist and those cases are handled safely.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, opencv
- Domain
- computer-vision
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100