akeshavan / mindcontrol

MindControl is an app for quality control of neuroimaging pipeline outputs. Demo:
http://mindcontrol.herokuapp.com/
Other
54 stars 25 forks source link

Incorrect coordinates for logged points #27

Open tpeeters opened 6 years ago

tpeeters commented 6 years ago

When adding new logged points, the resulting point does not match the location where the user clicked. I can observe several issues that are causing this, which may be separate bugs but it needs further investigation:

1 - When dragging with the left mouse button down, the intersection of the blue lines representing the slices in the other views, does not match position of the mouse cursor. It is about one voxel off. This is hard to see when zoomed out, but when you zoom in to the maximum level, it becomes quite clear. See attached image: image Note that while making the screenshot, the crosshair pointer got replaced by a regular mouse pointer, but the tip of the pointer is pointing at the position where the center of the crosshair was.

2 - When doing shift+left-click to add a new point, the point first appears under the mouse pointer, and then jumps to the crossing of the blue lines. If you do a long press (hold shift, push down left mouse button, wait a few seconds, release mouse button, release shift), then the added point initially shows up on the place where you clicked. However, when the view is redrawn (for example when you pan/zoom/add another point), it will jump to the place where the blue lines crossed in the moment you placed the point. This is what usually happens, but a few times I also saw the point jumping further away (I haven not been able to find a pattern or a reliable way to reproduce this).

3 - I have no way of checking that the selected coordinate is (approximately) correct by visual inspection. The coordinates (in the left in the screenshot) are probably patient coordinates, while the coordinates shown at the bottom of the views are integer voxel coordinates. image

4 - The added points are not centered where the crossing of the blue lines is, but the top left of the added 'point' is shown at the crossing of the blue lines.

The version that I used for testing and making these screenshots is the current version on mindcontrol.herokuapp.com, with this data set: http://mindcontrol.herokuapp.com/freesurfer/sub78297-sub78297-000-MPRAGE (but everything also applies to other data sets and other installations of mindcontrol).

Similar problems may exist for 'Logged curves' and 'Painter', but I have not tested those.

tpeeters commented 6 years ago

For 1), I tried to reproduce it with Papaya on http://rii.uthscsa.edu/mango/papaya/ and the bug does not seem to exist in Papaya. The location of the pointer and the crossing of the lines is not the same, but the crossing of the lines is always in the voxel center nearest to the mouse pointer. So the lines move 'discretely' (they jump from one voxel center to the next) when you move the mouse, while in the mindcontrol view the lines move continuously, and always stay on the same side of the mouse cursor.

tpeeters commented 6 years ago

For 2) I mentioned that some times the point jumps further. I found a way to reproduce this:

The new point will now appear near the location where the mouse button was released. Now:

The point now disappears from the location where it was initially shown, and it is moved to the position where the mouse button was first pressed.