Page MenuHomePhabricator

[Segmentation] Test tools on different anatomical planes
Closed, ResolvedPublic

Assigned To
Authored By
Mar 28 2022, 5:44 PM
Referenced Files
F2524923: image.png
Mar 28 2022, 5:44 PM
F2524925: image.png
Mar 28 2022, 5:44 PM
F2524927: image.png
Mar 28 2022, 5:44 PM
F2524920: image.png
Mar 28 2022, 5:44 PM


We received feedback from a tester:
All 2D annotation tools work perfectly on axial. However, for sagittal, and coronoal – sometimes the preview of how a segmentation will be created does not work properly (e.g. region growing add, paint etc.). I cannot reproduce it consistently...

We also received related feedback from @norajitr:

  • add tool
    image.png (249×950 px, 15 KB)
  • region growing
    image.png (313×951 px, 22 KB)
  • LiveWire
    image.png (300×958 px, 21 KB)
    image.png (704×207 px, 114 KB)

Event Timeline

kalali triaged this task as High priority.Mar 28 2022, 5:44 PM
kalali created this task.
kalali updated the task description. (Show Details)
kalali updated the task description. (Show Details)

I was able to reproduce this on Windows 10, but the behavior seems to be very inconsistent. When testing with Pic3D.nrrd and brain.nrrd, I took the following steps:

  • load the image
  • create a new segmentation
  • draw with the Add- / Region growing - tool in one of the views
  • draw again with the same tool in a different view

The behavior then differs depending on which views were used. Generally, when first drawing in the axial view and then in either of the other two, the second addition is not drawn interactively but only shown when letting go of the mouse button. This sometimes also occurs when going coronal -> sagittal or sagittal -> coronal, but never when doing the axial view second.
This only happens when using the same tool in both views without deactivating. If I switch the tool or deactivate and re-activate it, the second drawing works perfectly fine.

The live-wire tool problem seems different, as it isn't dependent on a previous move, but can happen immediately in a newly created segmentation. To reproduce it, just use the live-wire tool in either the coronal or sagittal view for multiple steps. Connections aren't shown, but will be drawn after a click.

It probably is an issue in the contour mapper or maybe even an internal issue in VTK that is triggered by the contour mapper. I noticed crashes in the Nvidia driver and OpenGL error outputs before I updated my driver that also goes into the same direction, even though the crashes are now gone. I want to check if we introduced this issue with the latest minor VTK upgrade in which case we should downgrade again.

Oh, in debug mode, I still get an error output at least:

2022-04-13 11:31:26.168 (  55.532s) [                ]     vtkOpenGLState.cxx:741   WARN| Error glLineWidth1 OpenGL errors detected
  0 : (1282) Invalid operation

 with stack trace of
 at vtksys::SystemInformationImplementation::GetProgramStack in D:\MITK-superbuild\ep\src\VTK\Utilities\KWSys\vtksys\SystemInformation.cxx line 3979
 at vtksys::SystemInformation::GetProgramStack in D:\MITK-superbuild\ep\src\VTK\Utilities\KWSys\vtksys\SystemInformation.cxx line 829
 at `anonymous namespace'::reportOpenGLErrors in D:\MITK-superbuild\ep\src\VTK\Rendering\OpenGL2\vtkOpenGLState.cxx line 294
 at vtkOpenGLState::vtkglLineWidth in D:\MITK-superbuild\ep\src\VTK\Rendering\OpenGL2\vtkOpenGLState.cxx line 741
 at vtkOpenGLContextDevice2D::SetLineWidth in D:\MITK-superbuild\ep\src\VTK\Rendering\ContextOpenGL2\vtkOpenGLContextDevice2D.cxx line 1906
 at vtkOpenGLContextDevice2D::DrawPoly in D:\MITK-superbuild\ep\src\VTK\Rendering\ContextOpenGL2\vtkOpenGLContextDevice2D.cxx line 882
 at vtkContext2D::DrawLine in D:\MITK-superbuild\ep\src\VTK\Rendering\Context2D\vtkContext2D.cxx line 112
 at mitk::ContourModelGLMapper2DBase::InternalDrawContour in D:\MITK\Modules\ContourModel\Rendering\mitkContourModelGLMapper2DBase.cpp line 338
 at mitk::ContourModelGLMapper2DBase::DrawContour in D:\MITK\Modules\ContourModel\Rendering\mitkContourModelGLMapper2DBase.cpp line 84
 at mitk::ContourModelGLMapper2D::MitkRender in D:\MITK\Modules\ContourModel\Rendering\mitkContourModelGLMapper2D.cpp line 72
 at mitk::VtkPropRenderer::Render in D:\MITK\Modules\Core\src\Rendering\mitkVtkPropRenderer.cpp line 177
 at vtkMitkRenderProp::RenderOverlay in D:\MITK\Modules\Core\src\Rendering\vtkMitkRenderProp.cpp line 56
 at vtkOpenGLRenderer::UpdateGeometry in D:\MITK-superbuild\ep\src\VTK\Rendering\OpenGL2\vtkOpenGLRenderer.cxx line 446
 at vtkOpenGLRenderer::DeviceRender in D:\MITK-superbuild\ep\src\VTK\Rendering\OpenGL2\vtkOpenGLRenderer.cxx line 300
 at vtkRenderer::Render in D:\MITK-superbuild\ep\src\VTK\Rendering\Core\vtkRenderer.cxx line 383
 at vtkRendererCollection::Render in D:\MITK-superbuild\ep\src\VTK\Rendering\Core\vtkRendererCollection.cxx line 53
 at vtkRenderWindow::DoStereoRender in D:\MITK-superbuild\ep\src\VTK\Rendering\Core\vtkRenderWindow.cxx line 347
 at vtkRenderWindow::Render in D:\MITK-superbuild\ep\src\VTK\Rendering\Core\vtkRenderWindow.cxx line 306
 at vtkOpenGLRenderWindow::Render in D:\MITK-superbuild\ep\src\VTK\Rendering\OpenGL2\vtkOpenGLRenderWindow.cxx line 2335
 at vtkGenericOpenGLRenderWindow::Render in D:\MITK-superbuild\ep\src\VTK\Rendering\OpenGL2\vtkGenericOpenGLRenderWindow.cxx line 225
 at mitk::RenderingManager::ForceImmediateUpdate in D:\MITK\Modules\Core\src\Controllers\mitkRenderingManager.cpp line 246
 at mitk::RenderingManager::ExecutePendingRequests in D:\MITK\Modules\Core\src\Controllers\mitkRenderingManager.cpp line 534
 at QmitkRenderingManager::event in D:\MITK\Modules\QtWidgets\src\QmitkRenderingManager.cpp line 62
 at QStyleAnimation::frameRate
 at QStyleAnimation::frameRate
 at QmitkSafeNotify<QtSingleApplication> in D:\MITK\Modules\AppUtil\src\QmitkSafeNotify.h line 27
 at QmitkSingleApplication::notify in D:\MITK\Modules\AppUtil\src\QmitkSingleApplication.cpp line 23
 at QTextStream::realNumberPrecision
 at QTextStream::realNumberPrecision
 at QTextStream::realNumberPrecision
 at QTextStream::realNumberPrecision
 at qt_plugin_instance
 at QTextStream::realNumberPrecision
 at qt_plugin_instance
 at QTextStream::realNumberPrecision
 at QTextStream::realNumberPrecision
 at QTextStream::realNumberPrecision
 at QOpenGLFunctions_4_3_Compatibility::glLightModeli
 at QStyleAnimation::frameRate
 at berry::QtDisplay::RunEventLoop in D:\MITK\Plugins\org.blueberry.ui.qt\src\internal\berryQtDisplay.cpp line 42
 at berry::Workbench::RunUI in D:\MITK\Plugins\org.blueberry.ui.qt\src\internal\berryWorkbench.cpp line 792
 at berry::Workbench::CreateAndRunWorkbench in D:\MITK\Plugins\org.blueberry.ui.qt\src\internal\berryWorkbench.cpp line 212
 at berry::PlatformUI::CreateAndRunWorkbench in D:\MITK\Plugins\org.blueberry.ui.qt\src\berryPlatformUI.cpp line 39
 at QmitkExtApplication::Start in D:\MITK\Plugins\org.mitk.gui.qt.extapplication\src\internal\QmitkExtApplication.cpp line 29
 at berry::ApplicationHandle::run in D:\MITK\Plugins\org.blueberry.core.runtime\src\internal\berryApplicationHandle.cpp line 190
 at ctkDefaultApplicationLauncher::runApplication in D:\MITK-superbuild\ep\src\CTK\Libs\PluginFramework\ctkDefaultApplicationLauncher.cpp line 157
 at ctkDefaultApplicationLauncher::start in D:\MITK-superbuild\ep\src\CTK\Libs\PluginFramework\ctkDefaultApplicationLauncher.cpp line 85
 at ctkPluginFrameworkLauncher::run in D:\MITK-superbuild\ep\src\CTK\Libs\PluginFramework\ctkPluginFrameworkLauncher.cpp line 486
 at ctkPluginFrameworkLauncher::run in D:\MITK-superbuild\ep\src\CTK\Libs\PluginFramework\ctkPluginFrameworkLauncher.cpp line 427
 at mitk::BaseApplication::main in D:\MITK\Modules\AppUtil\src\mitkBaseApplication.cpp line 718
 at Poco::Util::Application::run in D:\MITK-superbuild\ep\src\Poco\Util\src\Application.cpp line 334
 at mitk::BaseApplication::run in D:\MITK\Modules\AppUtil\src\mitkBaseApplication.cpp line 844
 at main in D:\MITK\Applications\Workbench\MitkWorkbench.cpp line 46
 at invoke_main in d:\a01\_work\12\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl line 79
 at __scrt_common_main_seh in d:\a01\_work\12\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl line 288
 at __scrt_common_main in d:\a01\_work\12\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl line 331
 at mainCRTStartup in d:\a01\_work\12\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp line 17
 at BaseThreadInitThunk
 at RtlUserThreadStart

There are two contour mappers. An OpenGL version using low-level OpenGL API calls through VTK, messing around with contexts and paint devices, and a pure VTK version using PolyData. The former one is currently in use. I switched to the VTK-version which is preferable in principle and it works except for a few minor things like color.

This task is resolved in the current release branch.