Closed tischi closed 5 months ago
And, as discussed, indeed the "position" currently is: final double[] position = BdvPlaygroundHelper.getWindowCentreInCalibratedUnits( bdvHandle );
To reliably also obtain the position of the mouse pointer, I think a keyboard shortcut would be needed to execute this command (unless we have other ideas)?
We could make the CurrentLocationLoggerCommand
always remember, in a static field, the previous position (could be also more than one, but maybe then confusing?) and then simply always print the distance from the current to the previous position (easy feature and maybe helpful?).
Can you check how it was done in an earlier version of MoBIE? I think in Mobie 1.x, the log current position output was giving you the position of the mouse pointer
Can you check how it was done in an earlier version of MoBIE?
Seems to have been already for some time the window center.
I agree, that's the last commit before it was changed to the window center (from 2021): https://github.com/mobie/mobie-viewer-fiji/commit/65d727466f68c769b73ba0658c72db20b013bf83
We could make the CurrentLocationLoggerCommand always remember, in a static field, the previous position (could be also more than one, but maybe then confusing?) and then simply always print the distance from the current to the previous position (easy feature and maybe helpful?).
Citing myself ☝️ , do you think that's a good idea?
Ah, I missed that comment, sorry... Personally, I am already satisfied if I could get the current mouse position without the distance. But, considering there are use cases for a distance, your solution sounds good. It would be up to the user to do it correctly though, considering you would not be able to see the last point you clicked anymore. I would keep it simple, so good enough like this
@jhennies I uploaded a new version, how do you like it?
Awesome, exactly how I need it, thanks!
Cool, if you by chance run into Paolo or Yannick, please let them know that this exists now 😉 .
Several people requested interest in measuring the distance between two points.
We should check what the current functionality provides and how to improve this.
Relevant classes:
CurrentLocationLoggerCommand
ping @jhennies