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

ERROR: MultiRegistration::loadMovables: images have different voxel sizes #538

Closed
chrisgorgo opened this issue May 27, 2017 · 3 comments
Closed
Labels

Comments

@chrisgorgo
Copy link
Contributor

ds000114 sub-02

  	 Saving crash info to /output/fmriprep/sub-02/log/20170527-000852_28440498-3e03-4a91-80b9-cf0b460ff9a7/crash-20170527-001301-root-t1_merge-5f63d74f-82be-4e65-ac5b-45abc515530e.pklz
  Interface StructuralReference failed to run. 
  	 Traceback (most recent call last):
    File "/usr/local/miniconda/lib/python3.6/site-packages/nipype/pipeline/plugins/multiproc.py", line 52, in run_node
      result['result'] = node.run(updatehash=updatehash)
    File "/usr/local/miniconda/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py", line 366, in run
      self._run_interface()
  170527-00:13:01,925 workflow INFO:
      self._result = self._run_command(execute)
    File "/usr/local/miniconda/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py", line 607, in _run_command
      result = self._interface.run()
    File "/usr/local/miniconda/lib/python3.6/site-packages/nipype/interfaces/freesurfer/base.py", line 162, in run
      return super(FSCommand, self).run(**inputs)
    File "/usr/local/miniconda/lib/python3.6/site-packages/nipype/interfaces/base.py", line 1085, in run
      runtime = self._run_wrapper(runtime)
    File "/usr/local/miniconda/lib/python3.6/site-packages/nipype/interfaces/base.py", line 1728, in _run_wrapper
      runtime = self._run_interface(runtime)
    File "/usr/local/miniconda/lib/python3.6/site-packages/nipype/interfaces/base.py", line 1762, in _run_interface
      self.raise_exception(runtime)
    File "/usr/local/miniconda/lib/python3.6/site-packages/nipype/interfaces/base.py", line 1686, in raise_exception
      **runtime.dictcopy()))
  RuntimeError: Command:
  mri_robust_template --satit --fixtp --mov /snapshot/sub-02/ses-retest/anat/sub-02_ses-retest_T1w.nii.gz /snapshot/sub-02/ses-test/anat/sub-02_ses-test_T1w.nii.gz --inittp 1 --iscale --noit --template sub-02_ses-retest_T1w_template.nii.gz --subsample 200
  Standard output:
  $Id: mri_robust_template.cpp,v 1.54 2016/05/05 21:17:08 mreuter Exp $
  --satit: Will estimate SAT iteratively!
  --fixtp: Will map everything to init TP!
  --mov: Using /snapshot/sub-02/ses-retest/anat/sub-02_ses-retest_T1w.nii.gz as movable/source volume.
  --mov: Using /snapshot/sub-02/ses-test/anat/sub-02_ses-test_T1w.nii.gz as movable/source volume.
      Total: 2 input volumes
  --inittp: Using TP 1 as target for initialization
  --iscale: Enableing intensity scaling!
  --noit: Will output only first template (no iterations)!
  --template: Using sub-02_ses-retest_T1w_template.nii.gz as template output volume.
  --subsample: Will subsample if size is larger than 200 on all axes!
  Setting iscale ...
  reading source '/snapshot/sub-02/ses-retest/anat/sub-02_ses-retest_T1w.nii.gz'...
  converting source '/snapshot/sub-02/ses-retest/anat/sub-02_ses-retest_T1w.nii.gz' to bspline ...
  MRItoBSpline degree 3
  reading source '/snapshot/sub-02/ses-test/anat/sub-02_ses-test_T1w.nii.gz'...
  converting source '/snapshot/sub-02/ses-test/anat/sub-02_ses-test_T1w.nii.gz' to bspline ...
  MRItoBSpline degree 3
  Standard error:
  ERROR: MultiRegistration::loadMovables: images have different voxel sizes.
    Currently not supported, maybe first make conform?
    Debug info: size(1) = 1.2993, 1, 1   size(0) = 1, 1.29978, 1
  MultiRegistration::loadMovables: voxel size is different /snapshot/sub-02/ses-test/anat/sub-02_ses-test_T1w.nii.gz.
  No such file or directory
  Return code: 251
@chrisgorgo chrisgorgo added the bug label May 27, 2017
@effigies
Copy link
Member

We could add a conform step, or we could check to see whether the two images have the same dimensions and prune the list to a set with uniform dimensions and zooms.

@chrisgorgo
Copy link
Contributor Author

Some kind of conform would be preferable. We should make sure the final reolution is driven by the input data and not hardcoded (for example 1x1x1).

@effigies
Copy link
Member

That makes sense. So let's switch t1_merge and t1_conform, and update t1_conform to take a list of T1w images.

First pass algorithm:

  • Reorient all images to RAS
  • Take min zoom for each dimension to determine final zooms
  • Resample any images that mismatch

It might be worth seeing if there's a tolerance limit in mri_robust_template. I'm not sure it's worth resampling, for example, 1.29978mm to 1.2993mm.

Note that using min zoom will give some pretty weird results if the ratio is too extreme. We could add a check for a max zoom ratio/difference, if that seems like a reasonable thing to check for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants