GithubHelp home page GithubHelp logo

easy_lausanne's People

Contributors

jguillon avatar julienbesle avatar kjamison avatar mattcieslak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

easy_lausanne's Issues

Failure writing scale*/ROI_HR_th.nii.gz

Hi,

I got error while running easy_lausanne when the folders scale* inside the designated output folder were not existing already.

Here is the kind of log I get:

INFO     : 2017-04-11 19:52:07,275 : main       : ERROR: failure writing ./scale250/ROI_HR_th.nii.gz
CRITICAL : 2017-04-11 19:52:07,275 : runCmd     : Return Value: 1
INFO     : 2017-04-11 19:52:07,277 : main       : Processing somepath/label/ROIv_scale250.nii.gz:
DEBUG    : 2017-04-11 19:52:07,282 : runCmd     : Running: mri_convert -rl "somepath/mri/orig/001.mgz" -rt nearest "somepath/label/ROIv_scale250.nii.gz" -nc "./scale250/ROIv_HR_th.nii.gz"
INFO     : 2017-04-11 19:52:07,791 : main       : mri_convert.bin -rl somepath/mri/orig/001.mgz -rt nearest somepath/label/ROIv_scale250.nii.gz -nc ./scale250/ROIv_HR_th.nii.gz
INFO     : 2017-04-11 19:52:09,813 : main       : niiWrite(): error opening file ./scale250/ROIv_HR_th.nii.gz

[FEAT] Import Lausanne2008 parcellation into Brainstorm software

This is an already closed issue, but it's just to redirect people there:

I managed to import the generated parcellation automatically into Brainstorm using its "Import anatomy from FreeSurfer folder" feature.

You now get a nice colored parcellation in Brainstorm's viewer and can use Lausanne2008 parcellation for all your analysis there:

image

image

More information at this pull request: brainstorm-tools/brainstorm3#65.

Duplicate logging output

Running python 2.7.10

Whenever I run easy_lausanne e.g.
easy_lausanne --subject_id subj --target_volume scan.nii.gz --target_type diffusion --output_dir lausanne

I'm getting output like:

INFO : 2015-06-08 10:38:03,463 : main : T1 -> b0: BBREGISTER linear registration
INFO : 2015-06-08 10:38:03,463 : main : T1 -> b0: BBREGISTER linear registration
INFO : 2015-06-08 10:38:03,463 : main : ========================================
INFO : 2015-06-08 10:38:03,463 : main : ========================================
INFO : 2015-06-08 10:38:03,463 : main : Started FreeSurfer bbregister to find 'T1 --> b0' linear transformation
INFO : 2015-06-08 10:38:03,463 : main : Started FreeSurfer bbregister to find 'T1 --> b0' linear transformation

"out of bounds" issue running easy_lausanne

Hi,
I just installed easy_lausanne and tried registering the atlases to a DWI B0 volume, but I run into a python error after a call to mri_label2vol (full output: easy_lausanne_output.txt):

DEBUG    : 2020-05-05 22:10:38,291 : runCmd     : Return Value: 0
Traceback (most recent call last):
  File "/usr/local/bin/easy_lausanne", line 4, in <module>
    __import__('pkg_resources').run_script('Easy-Lausanne==0.5', 'easy_lausanne')
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 719, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1511, in run_script
    exec(script_code, namespace, namespace)
  File "/usr/local/lib/python2.7/dist-packages/Easy_Lausanne-0.5-py2.7.egg/EGG-INFO/scripts/easy_lausanne", line 86, in <module>

  File "build/bdist.linux-x86_64/egg/easy_lausanne/maskcreation.py", line 274, in create_roi
IndexError: index 256 is out of bounds for axis 2 with size 256

I've tried three subjects and several different B0 volumes for a given subject (different resolutions and different grids). For one subject, the error does not occur, but for the other two, the error always occurs after processing the same label, irrespective of which B0 volume I use, but after different labels for different subjects.

I'm using freesurfer v 6.0.0.

Can anyone help? Alternatively, is there any other way to get the Lausanne 2008 atlas registered with freesurfer subjects?
Thanks

Change of syntax with Network2.0 and upwards

Hi,

I've been getting the following error after running easy_lausanne

Traceback (most recent call last):
File "/usr/bin/easy_lausanne", line 5, in
pkg_resources.run_script('Easy-Lausanne==0.5', 'easy_lausanne')
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 540, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 1462, in run_script
exec_(script_code, namespace, namespace)
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 41, in exec_
exec("""exec code in globs, locs""")
File "", line 1, in
File "/usr/lib/python2.7/site-packages/Easy_Lausanne-0.5-py2.7.egg/EGG-INFO/scripts/easy_lausanne", line 86, in

File "build/bdist.linux-x86_64/egg/easy_lausanne/maskcreation.py", line 234, in create_roi
AttributeError: 'Graph' object has no attribute 'nodes_iter'

... Which looks like it could be to do with the change from "nodes_iter()" method to "nodes()"

Adding laussane 2008 parcellation to mrtrix software

Dear experts

I am trying to add the laussane atlas to the mrtrix software and using easy_laussane. I usually use the following code to register the atlas to my dwi data and have the following questions

easy_lausanne --subject_id sub-01 --target_volume /media/sn/5EB4CC35B4CC1207/run/previous_run/sub-01/dwi/session1/sub-01_session1_dwi1.nii.gz --target_type diffusion --output_dir /media/sn/5EB4CC35B4CC1207/run/previous_run/sub-01/dwi/session1

1- Before using easy_laussane, Do dwi data need to be preprocessed (denoising, motion and eddy correction)?
2-when the running finish, easy_luassane creates two types of files:
ROI_scale125.nii.gz
ROIv_scale125.nii.gz

Can you please explain a little bit about them?

Python error in reading the target volume in easy lausanne

Hi,

I am having an issue with my newly installed Easy Lausanne software. The command isn't able to read the target volume and throws python errors. I echoed the target volume one step above and it exists but isn't read by the software.

Here is my error:
Traceback (most recent call last):
File "/data/jux/bdeck/anaconda3/bin/easy_lausanne", line 4, in
import('pkg_resources').run_script('Easy-Lausanne==0.5', 'easy_lausanne')
File "/data/jux/bdeck/anaconda3/lib/python3.7/site-packages/pkg_resources/init.py", line 664, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/data/jux/bdeck/anaconda3/lib/python3.7/site-packages/pkg_resources/init.py", line 1450, in run_script
script_code = compile(script_text, script_filename, 'exec')
File "/data/jux/bdeck/anaconda3/lib/python3.7/site-packages/Easy_Lausanne-0.5-py3.7.egg/EGG-INFO/scripts/easy_lausanne", line 32
print "Fatal: target volume does not exist", args.target_volume
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Fatal: target volume does not exist", args.target_volume)?

It get's stuck on this line of code:
${RUN} easy_lausanne --subject_id "${subject}" --target_volume "${workingdir}/${basenifti}" --target_type diffusion --output_dir "${lausannedir}" --include500

Could you please help?

Thank you so much in advance.

Thank you
Best,
Apoorva

Example script

Hi -please can you show an example script? It is not clear what directory you need to be in before running the script.

Error with linear transformation

Hello,

When I am trying to run :
easy_lausanne --subject_id fsaverage --target_volume /usr/local/freesurfer/subjects/fsaverage/mri/orig.mgz --target_type bold --output_dir /home/alex/MRI

I got the following error :

DEBUG    : 2020-04-22 13:53:21,670 : runCmd     : Running: convert_xfm -inverse /home/alex/MRI/b0-TO-orig.mat -omat /home/alex/MRI/orig-TO-b0.mat
DEBUG    : 2020-04-22 13:53:22,171 : runCmd     : Return Value: 0
DEBUG    : 2020-04-22 13:53:22,181 : runCmd     : Running: tkregister2 --regheader --mov /usr/local/freesurfer/subjects/fsaverage/mri/rawavg.mgz --targ /usr/local/freesurfer/subjects/fsaverage/mri/orig.mgz --regheader --reg /home/alex/MRI/T1-TO-orig.dat --fslregout /home/alex/MRI/T1-TO-orig.mat --noedit
INFO     : 2020-04-22 13:53:22,683 : main       : mghRead(/usr/local/freesurfer/subjects/fsaverage/mri/rawavg.mgz, -1): could not open file
INFO     : 2020-04-22 13:53:22,684 : main       : tkregister_tcl /usr/local/freesurfer/tktools/tkregister2.tcl
INFO     : 2020-04-22 13:53:22,684 : main       : target  volume /usr/local/freesurfer/subjects/fsaverage/mri/orig.mgz
INFO     : 2020-04-22 13:53:22,685 : main       : movable volume /usr/local/freesurfer/subjects/fsaverage/mri/rawavg.mgz
INFO     : 2020-04-22 13:53:22,685 : main       : reg file       /home/alex/MRI/T1-TO-orig.dat
INFO     : 2020-04-22 13:53:22,685 : main       : LoadVol        0
INFO     : 2020-04-22 13:53:22,685 : main       : ZeroCRAS       0
INFO     : 2020-04-22 13:53:22,686 : main       : $Id: tkregister2.c,v 1.132.2.1 2016/08/02 21:17:29 greve Exp $
INFO     : 2020-04-22 13:53:22,686 : main       : Diagnostic Level -1
INFO     : 2020-04-22 13:53:22,686 : main       : ERROR: could not read /usr/local/freesurfer/subjects/fsaverage/mri/rawavg.mgz as 3
CRITICAL : 2020-04-22 13:53:22,686 : runCmd     : Return Value: 1
DEBUG    : 2020-04-22 13:53:22,697 : runCmd     : Running: convert_xfm -omat /home/alex/MRI/T1-TO-b0.mat -concat /home/alex/MRI/orig-TO-b0.mat /home/alex/MRI/T1-TO-orig.mat
INFO     : 2020-04-22 13:53:23,198 : main       : Could not open matrix file /home/alex/MRI/T1-TO-orig.mat
INFO     : 2020-04-22 13:53:23,199 : main       : Cannot read input-matrix
CRITICAL : 2020-04-22 13:53:23,199 : runCmd     : Return Value: 254
ERROR    : 2020-04-22 13:53:23,200 : main       : An error occurred. Linear transformation file /home/alex/MRI/T1-TO-b0.mat not generated.
Traceback (most recent call last):
  File "/usr/local/bin/easy_lausanne", line 4, in <module>
    __import__('pkg_resources').run_script('Easy-Lausanne==0.5', 'easy_lausanne')
  File "/home/alex/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 666, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/home/alex/.local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1469, in run_script
    exec(script_code, namespace, namespace)
  File "/usr/local/lib/python2.7/dist-packages/Easy_Lausanne-0.5-py2.7.egg/EGG-INFO/scripts/easy_lausanne", line 79, in <module>
    
  File "build/bdist.linux-x86_64/egg/easy_lausanne/registration.py", line 77, in bb_regT12b0
Exception: An error occurred. Linear transformation file /home/alex/MRI/T1-TO-b0.mat not generated.

It seemed that the error comes from .mat file (I do not have matlab install, and scipy seemed to be correctly installed).

Do you have any idea where the error from ?

Where to edit tkregister2 code to run with Freesurfer v6 on Mac Big Sur OS?

Hi,

I am trying to run easy_lasuanne on Freesurfer v6. I have installed it on Python 2.7.18.
When the command runs it gives a bad CPU executable error as tkregister2 is deprecated in Freesurfer in Mac OS Big Sur .

Here is the error:
DEBUG : 2021-09-14 15:23:32,323 : runCmd : Running: tkregister2 --regheader --mov /Users/neurouser1/Documents/TNI/qsiprep_out/freesurfer/sub-TNI002/mri/rawavg.mgz --targ /Users/neurouser1/Documents/TNI/qsiprep_out/freesurfer/sub-TNI002/mri/orig.mgz --regheader --reg /Users/neurouser1/Documents/TNI/lausanneoutput/T1-TO-orig.dat --fslregout /Users/neurouser1/Documents/TNI/lausanneoutput/T1-TO-orig.mat --noedit INFO : 2021-09-14 15:23:32,832 : main : /Applications/freesurfer/tktools/tkregister2.bin: Bad CPU type in executable. CRITICAL : 2021-09-14 15:23:32,832 : runCmd : Return Value: 1 DEBUG : 2021-09-14 15:23:32,837 : runCmd : Running: convert_xfm -omat /Users/neurouser1/Documents/TNI/lausanneoutput/T1-TO-b0.mat -concat /Users/neurouser1/Documents/TNI/lausanneoutput/orig-TO-b0.mat /Users/neurouser1/Documents/TNI/lausanneoutput/T1-TO-orig.mat INFO : 2021-09-14 15:23:33,346 : main : Could not open matrix file /Users/neurouser1/Documents/TNI/lausanneoutput/T1-TO-orig.mat INFO : 2021-09-14 15:23:33,346 : main : Cannot read input-matrix CRITICAL : 2021-09-14 15:23:33,346 : runCmd : Return Value: 254 ERROR : 2021-09-14 15:23:33,346 : main : An error occurred. Linear transformation file /Users/neurouser1/Documents/TNI/lausanneoutput/T1-TO-b0.mat not generated. Traceback (most recent call last): File "/Users/neurouser1/opt/anaconda3/envs/py2/bin/easy_lausanne", line 4, in <module> __import__('pkg_resources').run_script('Easy-Lausanne==0.5', 'easy_lausanne') File "/Users/neurouser1/opt/anaconda3/envs/py2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 666, in run_script self.require(requires)[0].run_script(script_name, ns) File "/Users/neurouser1/opt/anaconda3/envs/py2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1469, in run_script exec(script_code, namespace, namespace) File "/Users/neurouser1/opt/anaconda3/envs/py2/lib/python2.7/site-packages/Easy_Lausanne-0.5-py2.7.egg/EGG-INFO/scripts/easy_lausanne", line 79, in <module>

I edited the registration.py script to have it read in tkregisterfv but the error still persists. I also tried tkregister2_cmdl but the error persists. Both solutions were given in this freesurfer thread.
https://www.mail-archive.com/[email protected]/msg64576.html

tkregisterfv_command = 'tkregisterfv --regheader --mov %s --targ %s --regheader --reg %s --fslregout %s --noedit' % ( op.join(FS_DIR, 'mri', 'rawavg.mgz'), op.join(FS_DIR, 'mri', 'orig.mgz'), op.join(output_directory, 'T1-TO-orig.dat'), op.join(output_directory, 'T1-TO-orig.mat'), ) runCmd(tkregisterfv_command, log)

Could you please advise if there is anywhere else I need to make changes in the code to get it to work?
Thanks in advance.
Best,
Apoorva

GCS files

Hi! Can someone tell me to which scale corresponds each of the .gcs files provided here? Lausanne scales are 33,60,125,250,500, but the .gcs files doesn't have these specific names. Some files are named my_atlas60, my_atlas125, ,my_atlas250 (which I suppose correspond to the respective scales) but there are other files named my_atlas36, my_atlasP1_16, etc, which I don't understand to which parcellation they correspond.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.