Hi, i’ve been using this code to grab a segment, but i found no way to check if it’s empty or not.
segmentation_node = getNode("Segmentation") seg = segmentation_node.GetSegmentation() seg0 = seg.GetNthSegment(0)
i tried using
polydata = seg0.GetRepresentation("Closed surface") then
polydata.GetNumberOfCells() but it only works if there is a closed surface representation of the segment, i’m looking for some approach that is independent of the existence of a closed surface if available, thanks for any inputs.