Hi all,
Lets start by saying that I know "Reinit" is not the right choice of
word in this case! A reinit would reset the axis, as it should. Lets
say, for the sake of the discussion, that I want a reinit that simply
update the scene's bounding box, nothing else, like [1] to [2] (made by
hand, so not exact!):
- No camera modification, so everything is still at the same place
- Keep the axis rotated if they were
- Resize the scene if an object was added/deleted
I tried adding this snippet in RenderingManager::InitializeViews. In
clear english: reuse the old geometry for the current plane, but update
it with the new offset and bounds that we just calculated.
auto newGeo = timeGeometry->GetGeometryForTimeStep(0);
auto oldTimeGeo = nc->GetCreatedWorldGeometry();
auto oldGeo = oldTimeGeo->GetGeometryForTimeStep(0);
oldGeo->GetIndexToWorldTransform()->SetOffset(
newGeo->GetIndexToWorldTransform()->GetOffset());
oldGeo->SetBounds(newGeo->GetBounds());
nc->SendCreatedWorldGeometryUpdate();
nc->SetInputWorldTimeGeometry(oldTimeGeo);
nc->Update();
...
This doesn't work; it throws the planes in strange places [3], probably
because I broke their affine matrix. I tried many things but my biggest
success was to remove the call to SetInputWorldTimeGeometry [4]. I
checked in DisplayInteractor::Rotate to see if there was a way to find
the old rotation applied to the plane but it doesn't seem to be possible.
Anyway, I'm mostly wondering how YOU, the mitk experts :), would do it.
Thank you for your time.
Nil
[1] http://i.imgur.com/krzBvJV.png
[2] http://i.imgur.com/NWDQQqg.png
[3] http://i.imgur.com/7wwWczy.png
[4] http://i.imgur.com/m9jwrpE.png
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users