Page MenuHomePhabricator

MITK crashes when selecting different ROIs
Closed, InvalidPublic

Description

I used circle ROIS to determine the signal to noise in T1 weighted dicom data, stored in .nrrd files. I created 5-6 circle ROIS and when i selected for example the first ROI (only the ROI) and then the second, MITK crashed reproducibly.

Related Objects

Mentioned Here
T1: testbug1

Event Timeline

Hi Martin, We are not able to reproduce this bug. So we have some questions:

  • How did you define the ROIs?
  • Did you use the measurement tools?
  • How do you calculate the signal to noise ratio?

Hey Andreas,

I used measurement tools (circle) and statistics which provide the Signal value (mean, stdev etc.) when I place the ROI in a MRI examination.

->

  1. open an existing .nrrd file which was created using the drag&drop import of MRI data with MITK, exemplarily a T1-weighted image.
  2. open measurements & statistics in MITK
  3. place 5 circle ROIs at different positions (and also different slices).
  4. Click on the first ROI, then on the second ROI. Then maybe back on the first ROI or fourth ROI to read out different positions.

MITK crashes sometimes, not always, when clicking on different ROIs after another.

When reproducing this bug it seems like many fast changed of planer figures within the data manager lead to a crash. Internal a runtime exception is thrown on each change and maybe QT or the operating system handles fast frequency exceptions by killing the corresponding thread.
The runtime exception is thrown by mitkImageStatisticsCalculator.cpp due to a if-statement using the "bool ImageStatisticsCalculator::GetPrincipalAxis(const Geometry3D *geometry, Vector3D vector, unsigned int &axis )" method, located in the same class.
Here the equal check should correctly return true but returned false because of the epsilon is too small. Seriously the usage of mitk::Equal instead of the given calculation leads to further issues, because values of the normalized image's axis vector are distorted (maybe due to an earlier miscalculation).

In detail the calculation looks like in the following output.

Calculation: fabs( fabs( normalizedAxisVectorOfImage * normalizedPlanarFigureVector ) - 1.0 ) < mitk::eps

[18.523] =======================================================================
[18.523] Calculation: [0, 1, -5.55112e-17] * [0, 0, -1] = 5.55112e-17
[18.523] fabs(5.55112e-17) = 5.55112e-17
[18.523] fabs( 5.55112e-17 - 1.0) = fabs(-1) = 1
[18.523] Is Grenze mit 1 kleiner als 1.19209e-05 ?
[18.523] =======================================================================
[18.523] Calculation: [0.00698133, 0, -0.999976] * [0, 0, -1] = 0.999976
[18.523] fabs(0.999976) = 0.999976
[18.524] fabs( 0.999976 - 1.0) = fabs(-2.43783e-05) = 2.43783e-05
[18.524] Is Grenze mit 2.43783e-05 kleiner als 1.19209e-05 ?
[18.524] =======================================================================
[18.524] Calculation: [-0.999976, -3.87542e-19, -0.00698133] * [0, 0, -1] = 0.00698133
[18.524] fabs(0.00698133) = 0.00698133
[18.524] fabs( 0.00698133 - 1.0) = fabs(-0.993019) = 0.993019
[18.524] Is Grenze mit 0.993019 kleiner als 1.19209e-05 ?
[18.524] Es gibt keine principal axis.
[18.524] Not aligned !
#18.524# ERROR: Runtime Exception: Non-aligned planar figures not supported!

Is this bug still present? I couldn't reproduce it.

Andreas, can you try to reproduxe this bug on Mac?

Closing this bug. It does not occur in the current version. Please feel free to reopen it if this bug is still present.

kislinsk changed the task status from Invalid to Spite.Jun 27 2018, 1:30 PM
kislinsk added a project: Bulk Edit.
kislinsk changed the task status from Spite to Invalid.Jun 27 2018, 1:36 PM
kislinsk removed a project: Bulk Edit.