Page MenuHomePhabricator

Unclear error message by PV analysis when segmentation is empty
Closed, ResolvedPublic

Description

Open a dti image, use the segmentation view to create a segmentation, but do not segment, so the segmentation remains empty. Then, switch to PV analysis. An error message will appear: "itk::ERROR::Image: invalid dimension[0]: 0

Related Objects

Event Timeline

New remote branch pushed: bug-15512-RemovedErrorMessage

The error occured since the computed bounding box was empty,
resulting in an empty mask image.
correction of the bounding box to a minimal size,
leading to the expected behaviour that nothing is computed.
so the warning can be omitted.

To be clearer:
A bounding box is calculated from the passed mask image, containing only the volume which has a segmentation in it. A new mask image is then generated by copying the voxel from the origin mask to the new one if they are within the bounding box. So the new image has the same extensions as the bounding box.

If a mask contains no masked voxels the bounding box is equal to zero. And this will lead to an image with dimensions 0:0:0.

To avoid an confusing error message, the minimum bounding box is now 1:1:1 to ensure there is always an valid image generated. No error is introduced by this, because the new mask image will only contain not masked voxels.

[583f7d]: Merge branch 'bug-15512-RemovedErrorMessage'

Merged commits:

2013-09-18 16:13:11 Nico Riecker [64778a]
corrected to bounding box, to minimal values != 0