Repository navigation
Open
Milestone
Description
In conjunction with imagej/imagej-common#12, we want to rework how SciJava Displays are structured.
The status quo:
- You have an
Object, which gets wrapped in a (UI-agnostic)Display. EachDisplayis a list of suchObjects, rather than only a singleObject. To visualize thatDisplay, you then need a UI-specificDisplayViewer, which actually shows theDisplay's contents to the user somehow. - In ImageJ, the type hierarchies are more complex: you have a
Data, which is wrapped in aDataView(e.g.,Datasetwrapped inDatasetView, orOverlaywrapped inOverlayView). Then anImageDisplay, which is a type ofDisplayforDataViews.
We can streamline this. Let's have instead:
View, which wraps anObject, and contains visualization settings. Subtypes of view (e.g.,ImageView) implemented as needed to encapsulate the appropriate viz settings.- A
ViewServicehandles wrapping ofObjects to the most appropriateView. - In the case of images, there would be an
ImageViewwhich has a position (while its wrappedDatasetdoes not).
- A
Display, which becomes a UI-specific thing used by theUIService.- In other words:
DisplayViewergets renamed toDisplay. - The old
Displayno longer exists—we only support a singleViewperDisplay. - We have a
DefaultViewthat is used forObjects with no particular need for visualization settings.
- In other words:
- To cover the need for multiple N-dimensional image objects (i.e.,
Datasets andOverlays) bagged together, we provideCompositeView, which composes a list ofViews in a single composite space.- See also
CombinedIntervalet. al inimagej-common, which will facilitate this. - This
CompositeViewwould be the closest thing to the currentDisplay, but would support recursive nesting ofViews, so that a proper object hierarchy can exist (see also Improve Display-DisplayView-Data hierarchy imagej/imagej-common#12).
- See also
These changes would reduce the amount of names floating around—we would no longer need "viewers" but would only have Views and Displays. It would also help simplify the implementation of new UIs, at least from the perspective of understanding the execution flow.
Metadata
Metadata
Assignees
Labels
No labels
Activity
ctrueden commentedon Aug 21, 2015
There is also the possibility of getting rid of
Viewaltogether.Displayis UI-specific and operates on a particular typeT. All viz settings (e.g., dimensional position of aDataset) would need to then wrap intoDatasetitself. While this would be a slightly worse separation of concerns, it would greatly simplify the architecture, to the point where I'm thinking it's worth it.So if you want to show the same image with same visualizations settings and position, great—add the same
Datasetto two differentImageDisplays or whatever.And if you want to show the same image with different viz settings, we can have a by-reference
Datasetwrapper that exposes different settings, but for the same backing data object.Further thought needed of course, but my current thinking is "the fewer class hierarchies, the better".