Page MenuHomePhabricator

Surface Rendering / Positioning is partially broken
Closed, ResolvedPublic

Description

Surfaces (and possibly otherbasedata types as well) are currently not always correctly rendered. This error happens in several plugins, and I believe that it is caused by a change in geometries. The positional data of these surfaces changes, but they are not rendered to a new position. Not all surfaces are behaving like this, and it may be an action performed on the surface that causes this behaviour. To reproduce:

  1. enable the plugin Igttracking
  2. build, start, enable the navigationDataPlayer
  3. Load a file, for example "RecordedNavigationData" from the IGT-Data Folder in MITK-Data, and play a few frames. Stop playing.
  4. Perform a global reinit. Note that nothing is displayed though the bounding boxes change
  5. Perform a reinit on one of the recorded tools. Note that the bounding box is adjusted, but still nothing is displayed
  6. Load a large image, or open the Trackingtoolbox and do a global reinit
  7. Note that the tools are now being displayed in 0/0/0
  8. Right click one of the recorded tools in the DataManager and select "Details". Note that offset AND translation AND Rotation are set.
  9. Play a few frames.
  10. reinspect details, note that offset and translation are changing.

I am unclear what causes this behaviour. Data is updated correctly, at least in the context that was correct for ages in IGT - Currently tracking is borked as well because the tools don't update anymore. Not all surfaces are broken like that. For example, one can save a recorded Tool, load it again, and the surface is displayed correctly (but not moving anymore obviously). It may have to do something with using affine transformations.

Event Timeline

Bug already exists since merge of new geometry concept (hash b05f0f9221b8228100a23d93b1da93d5ebd2310a). Maybe it is introduced by the new geometry concept or before.

Note: Single surface (e.g. NavigationDataTestData) is displayed but does not move.

User wildes has pushed new remote branch:

bug-17889-SurfaceRenderingPositioningPartiallyBroken

This was a very obscure constellation that was probably a preexisting bug/bad code that only surfaced due to Esther's refactoring of the geometry classes.

BaseGeometry gives out the pointer to its internal IndexToWorldTransform. Other classes can modify it directly, and use the same object to set it again. This triggered a pointer comparison to be true and reject the transform as unnecessary and not update the vtk, even though the indexToWorldTransform had been changed externally.

We removed the equality check. One should discuss whether baseGeometry should actually give out a copy of its transform pointer.

Bug is fixed, but this causes the NavigationDataObjectVisualizationFilterTest to fail.

[7aac64]: Merge branch 'bug-17889-SurfaceRenderingPositioningPartiallyBroken'

Merged commits:

2014-08-20 17:03:31 Esther Wild [c9a3ba]
Clean up NavigationDataObjectVisualizationFilterTest.


2014-08-20 16:35:36 Esther Wild [818b94]
Merge branch 'bug-17889-SurfaceRenderingPositioningPartiallyBroken' of mitk.org:MITK into bug-17889-SurfaceRenderingPositioningPartiallyBroken

Conflicts:
Core/Code/Testing/mitkBaseGeometryTest.cpp


2014-08-20 16:31:03 Esther Wild [ef15ca]
Updated tests to

  1. check for right behaviour of index2worldtransform
  2. mitk::Equal instead of == for float comparisons.

2014-08-20 14:13:06 Sebastian Wirkert [d765b5]
Updated tests to

  1. check for right behaviour of index2worldtransform
  2. mitk::Equal instead of == for float comparisons.

2014-08-19 17:08:35 Sebastian Wirkert [1d78a7]
Quaternions have to be normalized -> test doesn't fail.


2014-08-19 13:14:32 Esther Wild [788840]
Change NavigationDataObjectVisualizationFilterTest to cpp-unit-test


2014-07-23 17:00:47 Esther Wild [f97339]
if question prohibits updating of m_VtkMatrix. Remove, so that TransferItkToVtkTransform is always called.