Hi Daniel.

Thank you for your answer. I started reading the Gizmo code friday and it does most of what I need! The translation is working as intended. I'm still working on the scaling and rotation, but overall your code is really helpful!

Nil

Le 2018-09-24 à 04:44, Daniel Maleike a écrit :
Hi Nil,

There was a very simple on/off context menu entry implemented for the gizmo 
object but we did not include that in Data Manager in hope of a better UI. If 
you want to try the simple version in your applicaiton, you can have a look at 
a Data Manager modification of mine at

https://github.com/maleike/MITK/commit/e5461f280915eb1291826c2b033ff646f17b3b20#diff-6bc302362095be409143a5f4951eee71

and

https://github.com/maleike/MITK/commit/b67e1d0591d282fd3a32a79283fbed2afdbaaff8#diff-6bc302362095be409143a5f4951eee71

When trying this code you might want to compare the latest branch version of 
QmitkDataManagerView.cpp and the Gizmo module against your version, I might 
have missed a more recent commit.

More importantly (perhaps Stefan was refering to this): the code that 
implements the gizmo deals with exactly what you described: it reacts on 3D 
window interaction, reads perspective information from the VTK camera, inspects 
a selected BaseData object's axes, calculates an axis of movement and then 
moves the object along that axis. You might need to write your own specific 
kind of interaction, but you might find helpful snippets of code in Gizmo.

Kind regards,
Daniel Maleike


Nil Goyette <nil.goye...@usherbrooke.ca> hat am 19. September 2018 um 19:29 
geschrieben:


Hi Stefan,


I wasn't aware of this module, thanks for telling me. This being said,
if it looks like the images in https://phabricator.mitk.org/T19489, I
can't use it. My users do not like this new way of interacting. I didn't
test it though so I don't know if it behaves like I want it to behave.
Is there a plugin in the workbench where I can use it?


Nil


Le 2018-09-19 à 02:53, Dinkelacker, Stefan a écrit :
Hi Nil,


did you already have a look into the Gizmo module. It contains a
dedicated interactor for moving and rotating objects of all kinds and
also comes with a visual cursor that has handles and control the type
of movement/rotation. It was contributed by Daniel Maleike, who has
more information about it if you have in-depth questions.


Best,

Stefan

------------------------------------------------------------------------
*Von:* Nil Goyette <nil.goye...@usherbrooke.ca>
*Gesendet:* Dienstag, 18. September 2018 17:00
*An:* mitk-users@lists.sourceforge.net
*Betreff:* [mitk-users] 3D interactor

Hi all,

I'm using the AffineImageCropperInteractor class and there's one
behavior I want to change.

   * When I rotate in the 3D view then move an object, it follows the
     slope of the image's slice.
   * When I pass in front of a group of streamlines (list of lines in
     3D, in a polydata), the object flickers because it's moved from
     the background to the streamline, background again to another
     streamline, etc.
   * When I move an object in the 3D view and I traverse an axis'
     border, the object is suddenly huge because it was moved just
     above the border.

Can I make the Interactor "stupid"/unaware of any object? I want it to
act as if there was nothing. In fact, I want it to behave like in the
2D views: simply moving parallel to the cameras. Is there a way to do
this without modifying MITK's code? If not, can you please tell me
what I should try? I already tried modifying
mitk::VtkPropRenderer::PickWorldPoint but I have weird memory crashes
so I prefer asking!

Nil Goyette
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users



_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to