Join GitHub today
New legacy layer approach #3
The legacy layer relies on pixel harmonizers to synchronize data. Another approach would be to wrap Img's (and CelImg's) as IJ1 data structures (such as a new kind of ImagePlus, etc.). This code already exists in Imglib world. Also we would add imglib layer to wrap IJ1 ImagePluses (with vstacks or not) to sorts of Imgs. The legacy layer would just wrap things and pass them to IJ1. On return we may unwrap. This would simplify the harmonization code.
Note that any ImagePlus we implement would have to support getProcessor() and getStack().getProcessor() such that they return the types of processors already known to IJ1. IJ1 has made the setf()/getf() (and all similar) methods final making them impossible to override.