physimals / oxford_asl

A command line tool for quantification of perfusion from ASL data
Apache License 2.0
8 stars 7 forks source link

Custom atlas does not work #26

Open LuRoe7 opened 1 year ago

LuRoe7 commented 1 year ago

I'm planning to use oxford_asl within a Python script using the following command (after fsl_anat and after creating fieldmaps)

subprocess.run(["oxford_asl","-i",asl_path,"-o",sub_dir,"-c",m0_path,"--fslanat",fsl_res_dir, "--tis","1.7,2.2,2.7,3.2,3.7","--rpts","12,12,12,20,30","--bolus","1.5", "--casl","--senscorr","--cmethod","single","--fulldata","--pvcorr","--mc","--iaf","tc", "--ibf","tis","--sliceband","10","--slicedt","0.06","--tr","3.58","--te","19", "--fmap",fmap_path,"--fmapmag",fmap_mag_path,"--fmapmagbrain",fmap_magbrain_path, "--echospacing","0.000569995","--pedir","-y","--region-analysis","--region-analysis-atlas", atlas_path,"--region-analysis-atlas-labels",region_names])

atlas_path = /PATH/TO/3D/ATLAS/IN/NIFTI/AND/MNI/SPACE region_names = /PATH/TO/TXT/FILE/WITH/REGION/NAMES

Everything works fine except the calculation of CBF for a custom atlas in MNI space that I want to use. It throws the following info and oxford_asl finishes without producing the regional CBF data:

unknown option --oxasl-output usage: /home/lukas/fsl/bin/python [option] ... [-c cmd | -m mod | file | -] [arg] ... Try `python -h' for more information.

I scanned the analysis script of oxford_asl (https://github.com/physimals/oxford_asl/blob/master/oxford_asl.in) and it seems that the error occurs in line 2616 ($PYTHON -u which oxford_asl_roi_stats --oxasl-output $outdir/native_space --output $outdir/native_space/region_analysis --fslanat $fslanat $roi_analysis_args) On my local computer the expression "which oxford_asl_roi_stats" is not recognized although the corresponding script exists in the FSL directory. When I type "which oxford_asl_roi_stats" in the command line, no output is generated.

Any ideas how to fix that?

mcraig-ibme commented 1 year ago

I think this is the same as #28 and it should be fixed in the most recent FSL release. What FSL version are you using?