Page MenuHomePhabricator

Deleting a data node causes global reset
Open, NormalPublic


Whenever a data node is deleted from the data manager, a global reset is triggered. This can be quite annoying when working with multiple images or an image with a rotated geometry (e.g. brain.nrrd). It would be good to look if this can be avoided.

Event Timeline

Stephen Schaumann created this task.
kislinsk renamed this task from [Image Cropper] Deleting a bounding box causes global reset to Deleting a data node causes global reset.Apr 4 2022, 11:02 AM
kislinsk updated the task description. (Show Details)

I edited the task description since it is a general issue regarding data node removal, not restricted to image cropper bounding boxes. The rational for that is that (1) the scene adapts/focusses on the left overs so that the scene is always as tight as possible in its extents and (2) the global geometry is in sync with the remaining geometries which is for example important for segmentation which may require you to do manual reinits on images to sync with their geometry.

It's one of these topics that you can discuss endlessly and find a lot pros and cons for all approaches but there cannot be a general consensus. Since it greatly depends on the use case, the most straight-forward thing to do would be to make it optional with a preference.

But I think we can still put a little "smartness" in it. For example, do the removed data nodes contain data nodes with image geometries or only non-image geometries, where I think, we would not need to be so strict.

We have to check how non-image geometries are handled in combination with image geometries, though. I think if there's only non-image geometries a spacing of 1 is assumed (for slice navigation purposes) but as soon as an image geometry is preset, that adapts automatically to that one instead. Multiple image geometries are then the ever lasting battle of geometries and the reason why we have "reinit" and "global reinit".

See T16165: Reinit after deletion for a reasoning. Both tasks are justified but maybe we should highlight / utilize the general preference "Call global reinit if node is deleted" more.