Open hinerm opened 10 years ago
From @ctrueden :
For sure we want to make an AbstractCalibratedInterval, which extends AbstractCalibratedSpace We can model this using AbstractRealInterval & AbstractInterval
Related to or replaced by #230 ?
New hierarchy in ImageJ-common:
CalibratedInterval
extends CalibratdRealInterval
, Interval
AbstractCalibratedInterval
extends AbstractCalibratedRealInterval
implements CalibratedInterval
ImageMetadata has always had overlap with the Interval API from ImgLib2. With the integration of calibration values to ImageMetadata, this coupling has continued to grow stronger.
Thus it makes sense to formally consolidate these classes by having ImageMetadata extend AbstractCalibratedRealInterval and implement Interval.
This is a similar pattern as ImageJ2's DefaultDataset, so it may be beneficial to create an AbstractCalibratedInterval class in ImgLib to inherit from.
With this refactoring, many of the utility methods (e.g. Calibration in formatTools) can be removed as well as simplifying the ImageMetadata API itself.