Page MenuHomePhabricator

[Segmentation] Live Wire crashes with 4D image and static segmentation
Closed, ResolvedPublic

Description

To reproduce:

  1. load a 4D image (I used MITK-Data\UltrasoundImages\4D_TEE_Data_MV.dcm)
  2. open the segmentation view and create a new static segmentation
  3. select a timestep other than 0 (e.g. 5)
  4. set a starting point and create a contour, click "Confirm"
  5. crash in mitk::BaseGeometry::GetIndexToWorldTransform()

Revisions and Commits

rMITK MITK
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Concern RaisedRestricted Differential Revision
Concern RaisedRestricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision

Event Timeline

kalali triaged this task as High priority.Sep 30 2020, 10:45 AM
kalali created this task.
kalali added a revision: Restricted Differential Revision.Sep 30 2020, 1:29 PM

I found a way to solve this, similar to T27721: [Segmentation] 2D Fast Marching crashes with 4D image and static segmentation: By transforming the time step from the reference image to the working image with

TimePointType referenceImageTimePoint = referenceImage->GetTimeGeometry()->TimeStepToTimePoint(t);
TimeStepType workingImageTimeStep = workingImage->GetTimeGeometry()->TimePointToTimeStep(referenceImageTimePoint);

in mitk::LiveWireTool2D::ConfirmSegmentation().
However, inside mitk::LiveWireTool2D there are a lot of uses of positionEvent->GetSender()->GetTimeStep() which all lead to a wrong timestep (e.g t = 2, although a static segmentation only has 1 timestep = 0).
That means:

  1. I'm not sure about any negative side-effects which I don't see with my manual testing right now
  2. There is a basic flaw in the design which should be discussed instead of just fixing the symptoms with the suggested fix
  1. There is a basic flaw in the design which should be discussed instead of just fixing the symptoms with the suggested fix

You are right. I have looked into the Tool2D code base. And I think the only proper solution is to make an complete overhaul and refactoring like I did for the AutoTools (3D). Meaning to check all implicit or explicite usages of time(points) and also clean up and generalize code, as also several 2D tools do a lot of same stuff but just a little bit different, may be due to different developers. But thats not good for maintenance an so on...

I havent looked at the fix. But I tend to just deactivate all tool for 4D images, if they currently do not work for 4D. And then make a real complete overhaul... Lets discuss that.

I landed the changes of D424. For the next steps, consider T27507#211912.

Reopened this because this error still occurs / occurs again. This should be investigated with the work of T28118: Refactoring of SegTool2D.

Will be fixed (is fixed already) by the rework done in T28118.

floca added a revision: Restricted Differential Revision.Jan 5 2021, 11:01 AM