Page MenuHomePhabricator

Rotation Interaction in 3D Renderwindow activated
Closed, ResolvedPublic

Description

  • Load Pic3D
  • In Renderwindow-Menu Popup click "Crosshair Rotation"
  • Move the mouse cursor in the 3D Renderwindow along the border of the blue plane. In the bottom area of the blue plane the cursor will change to a Rotation-Icon and you can perform rotation of that plane AND rotate the whole 3D scene at the same time. Not good. Sometimes also possible with other planes.

Bug was NOT in previous Release 2012-09

Event Timeline

Changed Target Milestone to upcoming release

I bisected this bug to:

eccb0666cefcf8ada36610f69479c55f9b1bcbf0 is the first bad commit
commit eccb0666cefcf8ada36610f69479c55f9b1bcbf0
Author: Daniel Maleike <d.maleike@mint-medical.de>
Date: Tue Oct 2 16:29:11 2012 -0600

Re-write / Refactoring of the SlicesRotator; tried to document much more of it; generalize to more than 3 planes

I talked to Daniel. He said he thinks that the removed geometry checks are the reason for this (see diff of commit). He also mentioned that the best solution would be to check in each method the Mapper ID of the sender (which is a BaseRenderer) and skip working of the Mapper ID == 3D.

If I insert

//disable rotation in 3D renderwindow

if(clickedRenderer->GetMapperID() == BaseRenderer::Standard3D)
{
    return false;
}

into SlicesRotator::DoDecideBetweenRotationAndSliceSelection the rotation gets disabled in 3D, however, if you go once into the 3D renderwindow, the rotation is also disabled in 2D. So this is not a solution.

Andi and I tried to insert:

if(clickedRenderer->GetMapperID() == BaseRenderer::Standard3D)
{
    return false;
}

at various places. Either rotation still works in 3D or the it does not work in 2D after the 3D renderwindow was hit once with the mouse.


Basti and I looked into the code but did not really found anything special. We compared diff to master and found out that the changes in the method DoDecideBetweenRotationAndSliceSelection() are responsible for the enabled rotation in 3D. Unfortunately, Daniel changed a lot in this method and we could not figure out what exactly the problem is.

@Daniel: Could you have a look at your changes and compare them to the former, working version? This is be important for our release and should be done before next Tuesday evening. Let me know if you have questions or no time at all. Then we will make this a known issue for the December release.

(In reply to comment #5)

@Daniel: Could you have a look at your changes and compare them to the
former, working version? This is be important for our release and should be
done before next Tuesday evening. Let me know if you have questions or no
time at all. Then we will make this a known issue for the December release.

Sorry, I have too many other things to do right now. I don't think I could do this until Tuesday. If I can squeeze it in, I'll let you know.

We found a solution.

in mitkSlicesRotator.cpp
line 327

for (SNCVector::iterator iter = m_RotatableSNCs.begin(); iter != m_RotatableSNCs.end(); ++iter)
{

..
..

we need a check if cursor is in 3D renderwindow. If so, then do not check for intersecting planes. skit the for loop then. So we added these lines

if (clickedRenderer->GetMapperID() == BaseRenderer::Standard3D)

break;

Works now!

New remote branch pushed: bug-13751-rotationIn3DRenderWindow

Ok, that looks good, thanks for looking into this some more.

Now that I saw your patch, I think you could use a better place:

void SlicesRotator::UpdateRotatableSNCs()

could already check 2D/3D and ignore 3D windows. If this also works, I would prefer that solution.

[4883d8]: Merge branch 'bug-13751-rotationIn3DRenderWindow'

Merged commits:

2012-12-05 17:55:30 Bastian Graser [653618]
Added check for 3D Renderwindow rotation