Hello,
I seem to get background layer volume but everything else is nullptr.
I can visually see segmentations and there is a labellayer present
This is my setup
vtkSlicerApplicationLogic* appLogic = vtkSlicerApplicationLogic::SafeDownCast(
qSlicerApplication::application()->applicationLogic()
);
if (!appLogic) return theList;
d->sliceLogic = vtkMRMLSliceLogic::SafeDownCast(
appLogic->GetSliceLogic(sliceNode)
);
if (!d->sliceLogic) return theList;
layerLogic["B"] = vtkMRMLSliceLayerLogic::SafeDownCast(d->sliceLogic->GetBackgroundLayer());
layerLogic["F"] = vtkMRMLSliceLayerLogic::SafeDownCast(d->sliceLogic->GetForegroundLayer());
layerLogic["L"] = vtkMRMLSliceLayerLogic::SafeDownCast(d->sliceLogic->GetLabelLayer());
// Some loop
volumeNode = vtkMRMLVolumeNode::SafeDownCast(
d->sliceLogic->GetLayerVolumeNode(i)
);