In order to use/make widgets that soundly represent/interact with the labelsets of a LabelSetImage. We should implement a model based on QAbstractModel to represent the labels of a LabelSetImage. That would allow us to use a clean implementation for different representations/views (e.g. tree view or specific list views).
In the rows and sub rows we should represent:
- Layer/spatial group
- Label (the label name)
- instances (tracking uid, see T29204)
- Label (the label name)
- If we only have one instance in a label, we should drop the instance level and only show label level (compare the behavior of our QmitkImageStatisticsTreeModel, that only shows time steps if there are multiple)
- sensible additional columns for label and instances should be like in the current widget: color, visibility, lock state
- we could think of allow/represent group state for visibility and lock state on the layer/group and label level. Then we would need there a tristate (on, off, mixed)