Closed tsalo closed 1 year ago
Thank you for your patience, and I would like to ask you another question. Whenever I use ASLprep, I find myself having to download the tpl-MNI152NLin2009cAsym_from-MNI152NLin6Asym_mode-image_xfm.h5 file every time I run the process. Is there a way to avoid repeated downloads?
Additionally, I wanted to mention that tomorrow we will be installing ASL sequences based on multi-PLD on our lab GE machine. I was wondering if ASLprep could handle this type of data. I'm looking forward to your response.
Thank you for your patience, and I would like to ask you another question. Whenever I use ASLprep, I find myself having to download the tpl-MNI152NLin2009cAsym_from-MNI152NLin6Asym_mode-image_xfm.h5 file every time I run the process. Is there a way to avoid repeated downloads?
You can pre-cache templates on your machine and then mount the templateflow folder to your container. Since ASLPrep is built off of fMRIPrep, the instructions on this page should work.
Additionally, I wanted to mention that tomorrow we will be installing ASL sequences based on multi-PLD on our lab GE machine. I was wondering if ASLprep could handle this type of data.
I haven't tried out ASLPrep on multi-PLD data from a GE scanner, but I believe it should be fine as long as the sequence is PCASL. We don't have multi-delay PASL supported at the moment (see #272).
Thanks for your reply and I will try it out.
We pulled the latest docker version(0.4.0) and replaced the ge.py file, but there were 3 errors reported, what is the reason for this?
error1: Node: aslprep_wf.single_subject_101_wf.anat_preproc_wf.anat_derivatives_wf.gen_ref Working directory: /work/aslprep_wf/single_subject_101_wf/anat_preproc_wf/anat_derivatives_wf/_in_tuple_MNI152NLin2009cAsym.resnative/gen_ref
Node inputs:
fixed_image =
Traceback (most recent call last): File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/plugins/multiproc.py", line 67, in run_node result["result"] = node.run(updatehash=updatehash) File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 527, in run result = self._run_interface(execute=True) File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 645, in _run_interface return self._run_command(execute) File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 771, in _run_command raise NodeExecutionError(msg) nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node gen_ref.
Traceback: Traceback (most recent call last): File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 397, in run runtime = self._run_interface(runtime) File "/usr/local/miniconda/lib/python3.8/site-packages/niworkflows/interfaces/nibabel.py", line 430, in _run_interface self._results["out_file"] = _gen_reference( File "/usr/local/miniconda/lib/python3.8/site-packages/niworkflows/interfaces/nibabel.py", line 609, in _gen_reference resampled = nli.resample_img( File "/usr/local/miniconda/lib/python3.8/site-packages/nilearn/image/resampling.py", line 445, in resample_img img = _utils.check_niimg(img) File "/usr/local/miniconda/lib/python3.8/site-packages/nilearn/_utils/niimg_conversions.py", line 286, in check_niimg niimg = load_niimg(niimg, dtype=dtype) File "/usr/local/miniconda/lib/python3.8/site-packages/nilearn/_utils/niimg.py", line 137, in load_niimg dtype = _get_target_dtype(_get_data(niimg).dtype, dtype) File "/usr/local/miniconda/lib/python3.8/site-packages/nilearn/_utils/niimg.py", line 26, in _get_data data = np.asanyarray(img._dataobj) File "/usr/local/miniconda/lib/python3.8/site-packages/nibabel/arrayproxy.py", line 426, in array arr = self._get_scaled(dtype=dtype, slicer=()) File "/usr/local/miniconda/lib/python3.8/site-packages/nibabel/arrayproxy.py", line 393, in _get_scaled scaled = apply_read_scaling(self._get_unscaled(slicer=slicer), scl_slope, scl_inter) File "/usr/local/miniconda/lib/python3.8/site-packages/nibabel/arrayproxy.py", line 363, in _get_unscaled return array_from_file( File "/usr/local/miniconda/lib/python3.8/site-packages/nibabel/volumeutils.py", line 461, in array_from_file raise OSError( OSError: Expected 17060042 bytes, got 17053871 bytes from object
error2: Node: aslprep_wf.single_subject_101_wf.anat_preproc_wf.anat_norm_wf.registration Working directory: /work/aslprep_wf/single_subject_101_wf/anat_preproc_wf/anat_norm_wf/_template_MNI152NLin2009cAsym/registration
Node inputs:
explicit_masking = True
flavor = precise
float = True
initial_moving_transform =
Traceback (most recent call last): File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/plugins/multiproc.py", line 67, in run_node result["result"] = node.run(updatehash=updatehash) File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 527, in run result = self._run_interface(execute=True) File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 645, in _run_interface return self._run_command(execute) File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 771, in _run_command raise NodeExecutionError(msg) nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node registration.
Traceback: Traceback (most recent call last): File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 397, in run runtime = self._run_interface(runtime) File "/usr/local/miniconda/lib/python3.8/site-packages/niworkflows/interfaces/norm.py", line 183, in _run_interface ants_args = self._get_ants_args() File "/usr/local/miniconda/lib/python3.8/site-packages/niworkflows/interfaces/norm.py", line 457, in _get_ants_args args["fixed_image"] = mask( File "/usr/local/miniconda/lib/python3.8/site-packages/niworkflows/interfaces/norm.py", line 506, in mask data = in_nii.get_fdata() File "/usr/local/miniconda/lib/python3.8/site-packages/nibabel/dataobj_images.py", line 368, in get_fdata data = np.asanyarray(self._dataobj, dtype=dtype) File "/usr/local/miniconda/lib/python3.8/site-packages/nibabel/arrayproxy.py", line 426, in array arr = self._get_scaled(dtype=dtype, slicer=()) File "/usr/local/miniconda/lib/python3.8/site-packages/nibabel/arrayproxy.py", line 393, in _get_scaled scaled = apply_read_scaling(self._get_unscaled(slicer=slicer), scl_slope, scl_inter) File "/usr/local/miniconda/lib/python3.8/site-packages/nibabel/arrayproxy.py", line 363, in _get_unscaled return array_from_file( File "/usr/local/miniconda/lib/python3.8/site-packages/nibabel/volumeutils.py", line 461, in array_from_file raise OSError( OSError: Expected 17060042 bytes, got 17053871 bytes from object
could the file be damaged?
error3: Node: aslprep_wf.single_subject_101_wf.asl_preproc_asl.asl_t1_trans_wf.asl_to_t1w_transform Working directory: /work/aslprep_wf/single_subject_101_wf/asl_preproc_asl/asl_t1_trans_wf/asl_to_t1w_transform
Node inputs:
args =
Traceback (most recent call last): File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/plugins/multiproc.py", line 67, in run_node result["result"] = node.run(updatehash=updatehash) File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 527, in run result = self._run_interface(execute=True) File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 645, in _run_interface return self._run_command(execute) File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 771, in _run_command raise NodeExecutionError(msg) nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node asl_to_t1w_transform.
Traceback: Traceback (most recent call last): File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/interfaces/base/core.py", line 397, in run runtime = self._run_interface(runtime) File "/usr/local/miniconda/lib/python3.8/site-packages/aslprep/niworkflows/interfaces/itk.py", line 177, in _run_interface tmp_folder.cleanup() File "/usr/local/miniconda/lib/python3.8/tempfile.py", line 832, in cleanup self._rmtree(self.name) File "/usr/local/miniconda/lib/python3.8/tempfile.py", line 814, in _rmtree _shutil.rmtree(name, onerror=onerror) File "/usr/local/miniconda/lib/python3.8/shutil.py", line 719, in rmtree onerror(os.rmdir, path, sys.exc_info()) File "/usr/local/miniconda/lib/python3.8/shutil.py", line 717, in rmtree os.rmdir(path) OSError: [Errno 26] Text file busy: '/work/aslprep_wf/single_subject_101_wf/asl_preproc_asl/asl_t1_trans_wf/asl_to_t1w_transform/tmp-qtx8k5tj'
@Luoyu-Wang thank you for following up. I have opened a new issue with your traceback and I'll follow up there.
Closes #300.
Changes proposed in this pull request
nb.processing.smooth_image
with a directfrom nibabel.processing import smooth_image
import.