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

FieldmapReportlet assumes inputs are in same orientation #467

Open
mgxd opened this issue Oct 24, 2024 · 1 comment
Open

FieldmapReportlet assumes inputs are in same orientation #467

mgxd opened this issue Oct 24, 2024 · 1 comment
Labels
effort: low Estimated low effort task good first issue Good for newcomers impact: low Estimated low impact task reports

Comments

@mgxd
Copy link
Contributor

mgxd commented Oct 24, 2024

posted by @effigies in nipreps/fmriprep#3387

While attempting to reproduce a bug report, I ran across a crash. Fieldmaps are always in RAS, while the BOLD references and masks are in the space of the original BOLD. In the case of ds000221, that's LSP. The reportlet assumes all input images are in the same space, and so can fail if the field-of-view is not a cube (and would be bad otherwise).

I was unable to reproduce the reported bug, but it's possible it was confused for this. For searchability's sake, the error was:

2024-10-21 12:21:37,963 [CRITICAL] fMRIPrep failed: Traceback (most recent call last):
  File "/home/chris/mambaforge/envs/fmriprep/lib/python3.11/site-packages/nipype/pipeline/plugins/multiproc.py", line 67, in run_node
    result["result"] = node.run(updatehash=updatehash)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/mambaforge/envs/fmriprep/lib/python3.11/site-packages/nipype/pipeline/engine/nodes.py", line 527, in run
    result = self._run_interface(execute=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/mambaforge/envs/fmriprep/lib/python3.11/site-packages/nipype/pipeline/engine/nodes.py", line 645, in _run_interface
    return self._run_command(execute)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/mambaforge/envs/fmriprep/lib/python3.11/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 sdecreg_report.

Traceback:
        Traceback (most recent call last):
          File "/home/chris/mambaforge/envs/fmriprep/lib/python3.11/site-packages/nipype/interfaces/base/core.py", line 398, in run
            runtime = self._post_run_hook(runtime)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File "/home/chris/mambaforge/envs/fmriprep/lib/python3.11/site-packages/nipype/interfaces/mixins/reporting.py", line 50, in _post_run_hook
            self._generate_report()
          File "/home/chris/Projects/nipreps/sdcflows/sdcflows/interfaces/reportlets.py", line 103, in _generate_report
            abs(np.percentile(fmapdata[maskdata], 99.8)),
                              ~~~~~~~~^^^^^^^^^^
        IndexError: boolean index did not match indexed array along dimension 1; dimension is 88 but corresponding boolean dimension is 64
@mgxd mgxd added good first issue Good for newcomers reports impact: low Estimated low impact task effort: low Estimated low effort task labels Oct 24, 2024
@effigies
Copy link
Member

I would say that the reportlet should verify shapes and affines, not resample.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: low Estimated low effort task good first issue Good for newcomers impact: low Estimated low impact task reports
Projects
None yet
Development

No branches or pull requests

2 participants