Skip to content
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

Non-ASCII character '\xc3' in file pymp2rage/mp2rage.py on line 475 #1

Closed
0rC0 opened this issue Aug 6, 2018 · 4 comments
Closed

Comments

@0rC0
Copy link

0rC0 commented Aug 6, 2018

there is some problem at line 474 with the è of José

$ python
Python 2.7.15 | packaged by conda-forge | (default, Jul 27 2018, 10:26:36) 
[GCC 4.8.2 20140120 (Red Hat 4.8.2-15)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pymp2rage
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "pymp2rage/__init__.py", line 1, in <module>
    from .mp2rage import MP2RAGE, MEMP2RAGE
  File "pymp2rage/mp2rage.py", line 474
SyntaxError: Non-ASCII character '\xc3' in file pymp2rage/mp2rage.py on line 475, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
@Gilles86
Copy link
Owner

Gilles86 commented Aug 6, 2018

Good catch. I solved it in this commit
715b087

pymp2rage is still under development. Can I ask what you are using it for? :) Just curious

@0rC0
Copy link
Author

0rC0 commented Aug 6, 2018

Yes you can :)

I'm working with some mp2rage images and no tool give me a satisfying skull stripping.

I wanted to estimate a T1 map to use with nighres, using only T1w and second inversion I obtain not a good result.

@Gilles86
Copy link
Owner

Gilles86 commented Aug 8, 2018

I wanted to estimate a T1 map to use with nighres, using only T1w and second inversion I obtain not a good result.

That is notoriously hard and I am afraid that nighres won't actually use the T1 map for determining the border of the skull. It will just mask it based on where it puts the brain in the INV2.

A hack that worked well for us is to pull the INV2 through ANTS's N4BiasFieldCorrection and then multiply this corrected INV2 with the T1w image. This product image you can then throw through general purpose brain extraction tools like FSL's BET.

Cheers

@0rC0
Copy link
Author

0rC0 commented Aug 10, 2018

Thank very much for the trick!
I used it with FreeSurfer for the brain extraction (I ran autorecon1) and the results are really better!

@0rC0 0rC0 closed this as completed Aug 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants