T28794-statistics_crash_when_dynamic_segmentation_has_empty_timesteps
Summary:
Checked if time step exists before accessing statistics container
Fixed T28794
Added alternative behavior if statistics doesn not exist for time step.
Used imageStatisticsFilter->GetCount() to query number of voxels instead of computing it by hand via sum/mean.
Test Plan: Cannot reproduce problem doucmented in T28794
Reviewers: O1 MITK Reviewer Group I, kislinsk
Reviewed By: O1 MITK Reviewer Group I, kislinsk
Subscribers: kislinsk
Maniphest Tasks: T28794
Differential Revision: https://phabricator.mitk.org/D563