-
Notifications
You must be signed in to change notification settings - Fork 0
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
ENH: Add crosshairs, modify mode #5
ENH: Add crosshairs, modify mode #5
Conversation
@@ -58,6 +58,7 @@ dist/ | |||
.shelf | |||
.tox/ | |||
.coverage | |||
cover/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for when nosetests
is run with --cover-html
BTW it looks like using |
Ah - no - I think skimage switched back to using wheels recently - see : If you'd consider doing that, it would be great to update the nibabel build |
Unfortunately I have never worked with wheels before. For this PR I'll just remove the |
BTW I was actually talking about https://github.com/scikit-learn/scikit-learn Would you recommend I try to follow the |
Yeah - it's just: pip install --no-index -f http://travis-wheels.scikit-image.org scipy |
Should I use the |
3df0d6f
to
a704024
Compare
It appears to work by going through the While I'm digging around in there, do we really need 3.2, 3.3, and 3.4 builds? Maybe just 3.4 (skip 3.2 and 3.4) or 3.2 and 3.4 (skip 3.3) would be enough so that we can save on CI time. |
b493001
to
4381c75
Compare
4b5ed71
to
3b17203
Compare
3b17203
to
ef10a7d
Compare
Looks very nice. I notice that if you close one of the linked windows, then the other crashes in self.callbacks.process - do you think it would be easy to get round that? |
Yeah, it can be fixed by putting a call to unlinking in an |
Thanks - that would be very helpful. |
I couldn't actually reproduce the bug. I used this code:
And I tried closing the figures by hitting escape, by pressing the X in the window decorator, and by doing |
No, same crash - I'm on OSX - matplotlib 1.4.2, tk backend. What do you get for this:
? |
If I comment out the
|
Okay, I cleaned up the logic a little bit. While I was in there I also added a nicer |
Eric - I'd like to merge these changes and work on the code a bit. I think there's a problem if the second image has a different (sagittal coronal etc) orientation from the first. OK with you? Or do you have other changes you're in the middle of? |
Weird. I tried it with your images, and also with some that had a different (non-RAS) orientation and they all seemed okay. The idea is that the position coordinates should always be X, Y, Z, and the |
...there also very well already be some code for e.g. extracting a particular coronal slice so you don't have to manually keep track of the flips and order, but I wasn't familiar enough with the code base to know. So if you have more efficient / DRY ways of doing things, feel free. The important thing I was shooting for was always displaying the data in the standard orientations (a la |
There is the code Then the current processing PR adds a function For the orientations thing, what do you get doing linked views of these two images? http://psydata.ovgu.de/philips_achieva_testfiles/conversion2/Phantom_EPI_3mm_sag_15AP_SENSE_13_1.nii http://psydata.ovgu.de/philips_achieva_testfiles/conversion2/Phantom_EPI_3mm_cor_SENSE_8_1.nii Is it what you expect? |
Ahh, I don't get the same orientations shown when plotting those two images -- the center of one is not the center of the other. Should they be the same? Equivalently, are the affines set up to make them have the same origin and orientation? |
Yes - good point - the affines are correct - you can check them by resampling one to the other and viewing the first image and the resampled image (that's what I did just now). |
You want to try making your simplifications and modifications? I suspect that using the |
I can do that. I'll have to think about orientations. My gut feeling is that it's best to default to resampling one image onto the other by default, and if not doing that, then leave it as the original orientation. |
Is the need to resample because one could often be tilted e.g. along every axis relative to another, making the slice matches crap? I had assumed that matching the position, and pulling the corresponding slices directly from each data structure might be "close enough", but I don't know how often affines are skewed relative to one another. |
Yes, if the images don't have the same orientation already, then there is a good chance they will be tilted relative to each other. For example, I guess it's more common than not to have off-axial EPIs, and the structurals often have coronal or sagittal acquisitions (before they get reoriented for distribution). We could add 'as_closest_canonical' as one option where resampling is the default, I guess. |
I'm fine with adding resampling to standard RAS by default, my only concerns would be 1) any data quality degradation and 2) increased processing time. Do you think those problems will be minimal? Either way I think that |
... and if we want to get fancy about it, if one or both of two linked images doesn |
(whoops) doesn't have |
Eric - thinking a bit more, I am drawn towards defering this PR and the resampling etc PR until after the release, and committing myself to doing another release in say 4 weeks time. I want to think a little bit more about the API (or otherwise) for axis names, and let the design of the viewer settle a little out of the light of a release. Is that OK with you? Are there any other PARREC changes you need? |
Sure, that way the more advanced No PARREC changes at my end, things work well on the test cases I've run. |
But if you're going to base your work off of mine, this PR could be merged into your branch, but not into upstream/master. |
Hi guys, any updates on this? I would really like to use a python NIfTI viewer. I am using a fresh install of live nipy and
fails at |
FIX: allow applies_to_matrix_dimension to be a comma-seperate list
Ready for review/merge. Works well on my system. Feel free to tweak the appearance.