{"action":"created","issue":{"url":"https://api.github.com/repos/poldracklab/mriqc/issues/747","repository_url":"https://api.github.com/repos/poldracklab/mriqc","labels_url":"https://api.github.com/repos/poldracklab/mriqc/issues/747/labels{/name}","comments_url":"https://api.github.com/repos/poldracklab/mriqc/issues/747/comments","events_url":"https://api.github.com/repos/poldracklab/mriqc/issues/747/events","html_url":"https://github.com/poldracklab/mriqc/issues/747","id":352603708,"node_id":"MDU6SXNzdWUzNTI2MDM3MDg=","number":747,"title":"Failure in SpatialNormalization step with MRIQC v0.14.2 and Docker image","user":{"login":"DavidEWarrenPhD","id":17655356,"node_id":"MDQ6VXNlcjE3NjU1MzU2","avatar_url":"https://avatars2.githubusercontent.com/u/17655356?v=4","gravatar_id":"","url":"https://api.github.com/users/DavidEWarrenPhD","html_url":"https://github.com/DavidEWarrenPhD","followers_url":"https://api.github.com/users/DavidEWarrenPhD/followers","following_url":"https://api.github.com/users/DavidEWarrenPhD/following{/other_user}","gists_url":"https://api.github.com/users/DavidEWarrenPhD/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidEWarrenPhD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidEWarrenPhD/subscriptions","organizations_url":"https://api.github.com/users/DavidEWarrenPhD/orgs","repos_url":"https://api.github.com/users/DavidEWarrenPhD/repos","events_url":"https://api.github.com/users/DavidEWarrenPhD/events{/privacy}","received_events_url":"https://api.github.com/users/DavidEWarrenPhD/received_events","type":"User","site_admin":false},"labels":[{"id":306812526,"node_id":"MDU6TGFiZWwzMDY4MTI1MjY=","url":"https://api.github.com/repos/poldracklab/mriqc/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-08-21T15:48:23Z","updated_at":"2018-08-23T03:39:31Z","closed_at":null,"author_association":"NONE","body":"I'm trying the latest version of MRIQC (v0.14.2) through the Docker image (pulled today, 8/21/18).  Processing of all participants fails at the SpatialNormalization step — a sample crash log is below.\r\n\r\nMRIQC was called as follows for a single participant.\r\n```\r\ndocker run     -it     --rm     -v /mnt/warren_lab/datasets/devcog/data/bids:/data:ro     -v /bulk/projects/mriqc:/out poldracklab/mriqc:latest /data /out participant --participant-label somelabel --session-id 1 -m T1w -w /out/work\r\n```\r\n\r\nThe problem seems to derive from an empty mask after the warp from individual anatomy to MNI.  Specifically, antsRegistration (wrapped by nipype/niworkflows) is used to warp the (unremarkable and non-empty) brain mask from binarized/sub-some_label_ses-1_acq-main_T1w_conformed_calc_thresh.nii.gz to MNI space for a sanity check of the warp (by checking overlap with the MNI brain mask), but the resulting MNI-space mask is empty.\r\n\r\nThe ANTs warp from individual anatomy to MNI is decent, and I've tested the mask warp using a local version of ANTs with the same result (i.e., an empty mask after warping).  I'm stumped.  Any thoughts?\r\n\r\n```\r\n$ cat crash-20180821-151959-root-SpatialNormalization.a0-9e488a0b-32af-4cc4-aa5f-33f844d645b7.txt \r\nNode: workflow_enumerator.anatMRIQCT1w.SpatialNormalization.SpatialNormalization\r\nWorking directory: /out/work/workflow_enumerator/anatMRIQCT1w/SpatialNormalization/_in_file_..data..sub-somelabel..ses-1..anat..sub-somelabel_ses-1_acq-main_T1w.nii.gz/SpatialNormalization\r\n\r\nNode inputs:\r\n\r\ncompress_report = auto\r\nexplicit_masking = True\r\nflavor = fast\r\nfloat = False\r\ninitial_moving_transform = <undefined>\r\nlesion_mask = <undefined>\r\nmoving = T1\r\nmoving_image = /out/work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-somelabel..ses-1..anat..sub-somelabel_ses-1_acq-main_T1w.nii.gz/inu_n4/sub-somelabel_ses-1_acq-main_T1w_conformed_corrected.nii.gz\r\nmoving_mask = /out/work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-somelabel..ses-1..anat..sub-somelabel_ses-1_acq-main_T1w.nii.gz/binarize/sub-somelabel_ses-1_acq-main_T1w_conformed_calc_thresh.nii.gz\r\nnum_threads = 1\r\norientation = RAS\r\nout_report = report.svg\r\nreference = T1\r\nreference_image = <undefined>\r\nreference_mask = /niworkflows_data/mni_icbm152_nlin_asym_09c/2mm_brainmask.nii.gz\r\nsettings = <undefined>\r\ntemplate = mni_icbm152_nlin_asym_09c\r\ntemplate_resolution = 2\r\n\r\nTraceback (most recent call last):\r\n  File \"/usr/local/miniconda/lib/python3.6/site-packages/nipype/pipeline/plugins/multiproc.py\", line 69, in run_node\r\n    result['result'] = node.run(updatehash=updatehash)\r\n  File \"/usr/local/miniconda/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py\", line 471, in run\r\n    result = self._run_interface(execute=True)\r\n  File \"/usr/local/miniconda/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py\", line 555, in _run_interface\r\n    return self._run_command(execute)\r\n  File \"/usr/local/miniconda/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py\", line 635, in _run_command\r\n    result = self._interface.run(cwd=outdir)\r\n  File \"/usr/local/miniconda/lib/python3.6/site-packages/nipype/interfaces/base/core.py\", line 521, in run\r\n    runtime = self._run_interface(runtime)\r\n  File \"/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/interfaces/mni.py\", line 178, in _run_interface\r\n    self._validate_results()\r\n  File \"/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/interfaces/mni.py\", line 396, in _validate_results\r\n    overlap_perc = float(overlap_voxel_count.sum()) / float(input_mask_data.sum()) * 100\r\nZeroDivisionError: float division by zero\r\n\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/poldracklab/mriqc/issues/comments/415274244","html_url":"https://github.com/poldracklab/mriqc/issues/747#issuecomment-415274244","issue_url":"https://api.github.com/repos/poldracklab/mriqc/issues/747","id":415274244,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNTI3NDI0NA==","user":{"login":"oesteban","id":598470,"node_id":"MDQ6VXNlcjU5ODQ3MA==","avatar_url":"https://avatars2.githubusercontent.com/u/598470?v=4","gravatar_id":"","url":"https://api.github.com/users/oesteban","html_url":"https://github.com/oesteban","followers_url":"https://api.github.com/users/oesteban/followers","following_url":"https://api.github.com/users/oesteban/following{/other_user}","gists_url":"https://api.github.com/users/oesteban/gists{/gist_id}","starred_url":"https://api.github.com/users/oesteban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oesteban/subscriptions","organizations_url":"https://api.github.com/users/oesteban/orgs","repos_url":"https://api.github.com/users/oesteban/repos","events_url":"https://api.github.com/users/oesteban/events{/privacy}","received_events_url":"https://api.github.com/users/oesteban/received_events","type":"User","site_admin":false},"created_at":"2018-08-23T03:39:31Z","updated_at":"2018-08-23T03:39:31Z","author_association":"COLLABORATOR","body":"That'd be wonderful. There is one more thing at play here, AFNI and ANTs implement the s/q-form headers of NIFTI in (almost opposite) different ways. In fMRIPrep we curate input data for that, but we don't in MRIQC and that could also be the issue. \r\n\r\nHow to test? Using nibabel you can copy the s-form matrix and code over the q-form matrix and that should do."}}
{"actor":{"display_login":"oesteban"}}