Currently our code base is inconsistent regarding the way a set of DataNodes are returned. We have at least 3 prominent styles.
- itk::VectorContainer<unsigned int, DataNode::Pointer> (e.g. DataStorage::SetOfObjectes)
- std::vector<DataNode::ConstPointer>
- QList<DataNode::Pointer>
Variant 1 is used in the context of the data storage.
Variant 2 was used e.g. heavily when the statistics where reworked in 2018/2019 and in code parts without Qt.
Variant 3 is used everywhere near Blueberry and plugins and BlueBerry selections. (This is the reason e.g. while all the new selection widgets use this type).
Question: Should we keep it as is? Should be change something or at least define a default for the future?
All variants can be more (1 to 2) or less (2 to 3) easily converted. It is sometimes anoying when writing code and interfaces do not snap directly together (e.g. when combining selection widgets with statistic widgets). But I am not sure if it is worth the effort. Currently I have mitigated the situation by introducing additional convinience setter/getter, that can provide the other type.