Skip to content

Getting Children Datasets

JulianThijssen edited this page Jan 24, 2024 · 2 revisions

(for ManiVault Version 1.0)

// Obtain the data hierarchy item from the source dataset
auto* parentItem = dataHierarchy().getItem(_positionSourceDataset->getId());

// Ask for the data hierarchy children of the given dataset
DataHierarchyItems childrenItems = dataHierarchy().getChildren(*parentItem);

// Iterate over the children and find the ones of type cluster
for (DataHierarchyItem* item : childrenItems)
{
    DataType type = item->getDataType();
    if (type == ClusterType)
    {
         Dataset<Clusters> clusterDataset = item->getDataset<Clusters>();
    }
}

Clone this wiki locally