-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MRview: Odd behaviour on the opening of ROI's #296
Comments
Suspect this is the same problem as #293... not quite sure how we're going to deal with this one... Also strange for it to have suddenly cropped up out of nowhere. |
I hadn't done a git pull for a couple of months (I can't really remember when) as I was running some big datasets. So I only noticed it when I updated recently. Not much of a help diagnosing when it happened, sorry! |
There's not really a whole lot you can provide; it just has to do with the way we load texture data only when it's actually needed, rather than pre-loading everything. Though it is interesting that it started after an MRtrix update rather than a QT one... |
After battling to sort out Qt problems (two versions and a host of other hassles) a while ago, I am now loath to mess with Qt! |
@Lestropie, I initially thought the same thing as you (that this might be related to #293), but in this case the texture upload is fine, it's just its initial render that's messed up. I'm assuming in #293 the ROIs aren't usable at all...? But there's every chance that it's the same underlying cause: the OpenGL context for the paint event that triggered the upload gets messed up by another paint event before it has a chance to complete. Presumably the update prevention approach we were discussing in #295 would sort this out? |
As discussed in #293, #295, #296 & #298. This essentially ensures the ProgressBar display only kicks in after 1s (so will only affect things for large loads); that the main window does not try to process further updates in the meantime; that mouse events to the main window are not processed until completion; and that the GL context is preserved only if one in found. This works as expected on Qt4. On Qt5, for some reason the background of the main window is cleared to default (grey) as soon as the progressbar is displayed. I'm hoping this is a glitch in Qt5.5 - I can't see any reason for them to clear the background of a widget that explicitly has updates disabled...
please try with the latest commit on master (a8a7202), see if that fixes it... |
Didn't seem to sorry Donald. |
Darn. Ok, assuming this was related to an MRtrix3 update rather than an OS, Qt or OpenGL driver update, the one major change that had happened recently that might relate to this is the move from the deprecated Another change was to set MRtrix to request a core OpenGL profile by default on all platforms, but that was already the default on MacOSX (can't get OpenGL 3.3 otherwise). I notice that MRView is reporting a 4.1 profile, which is unexpected - I was expecting to get a strict 3.3 profile. Can you check whether you have the |
OK, confirmed on my mac too. I'll have a look... |
This is going to be a tough one - things work fine under Linux, also on nvidia hardware. Debug build runs clean on valgrind, no OpenGL errors detected, no bounds check failures... I'll try to checkout earlier versions, see if I can pinpoint what changes introduced the problem... |
OK, it was indeed pull request #266 (i.e. the move to QOpenGLWidget) that introduced the problem. I'm not sure how to proceed, since things to work OK otherwise, it's just the initial render that's corrupt. I'll have a close look at how the ROI tool handles its render, maybe there's an obvious way around this... |
OK, turned out to be simpler than I'd anticipated - just a matter of making sure the GL context was current when loading/saving/modifying the ROI textures. See if commit 08f47ef fixes it for you - seems to work fine on my mac... As a bonus, you also get correct handling of scrolling with the touchpad, and pinch to zoom... 😄 I'll add support for the other gestures at some point, but it'll require a fair bit of refactoring of the event handling. |
Excellent! All good Donald, works fine on my mac now. Thanks for the bonus :) Only been on macs for a few years now (PC's for the last 20years!) but must admit I love all the gestures! |
I guess it never rains but it pours... I'll have a look into that one tomorrow. Can I just check: that used to work fine before this latest set of changes, right? |
Yes I was using it for the whole day yesterday and it worked fine. This morning with the latest commit it doesn't. Cheers! |
Sure, a simple |
Thank you Donald...I just wound back my time machine on the mrtrix3 folder...but I might use your method so I get to keep the improved touchpad handling. |
I have the same issue now on Linux. The ROI seems to initially load OK, but initiating a ROI edit on mouse click fills the slice with unwanted data. Curiously, the contents that the slice gets erroneously filled with repeats itself every 8 clicks... |
Right, after a very extensive OpenGL debugging session, I eventually tracked down the source of the bug. It was embarrassingly trivial - see how extensive commit 47578e7 is... I also fixed a few more things along the way. See if the current version on master works for you... |
That seems to have done the trick Donald! All works well on the mac. Yes a few little bugs with the ROI editing tool also seem to have been ironed out as well. |
Good to hear - now I can get on with my life... I'll close this off then. Feel free to reopen if needed. By the way, if you come across other bugs, do report them, however minor. We may not fix them immediately, but at least we'll be aware of them... |
Cheers Donald! I was a little reticent about posting such a minor issue, but will certainly in the future. Thanks again! |
When opening any ROI an odd shape appears. However it disappears on slicing through the image (or on striking any key!). It doesn't seem to impact on any other processes. (The ROI's in the images attached are DWI masks. The same ROI opened in two different sessions)
I am using:
OS X Yosemite 10.10.4
Qt version 5.4.1
== mrview 0.3.12-546-g0d01cd28 ==
64 bit release version, built Jul 14 2015, using GSL 1.16
mrview: [INFO] GL renderer: NVIDIA GeForce GT 750M OpenGL Engine
mrview: [INFO] GL version: 4.1 NVIDIA-10.4.2 310.41.35f01
mrview: [INFO] GL vendor: NVIDIA Corporation
The text was updated successfully, but these errors were encountered: