Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

BUG: resliceimg (MaRdI interpolation) issue #161 #162

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

rtopfer
Copy link
Contributor

@rtopfer rtopfer commented Aug 19, 2020

PR fixes #161 — bug in MaRdI.m (constructor) when the number of image volumes acquired for a given series (a.k.a. number of repetitions, or measurements) as stated in the dicom header differs from the number of image files discovered (i.e. provided by the user).

  • MaRdI() now issues a warning when such a discrepancy occurs; nevertheless proceeding with object construction.

Also fixed are several erroneous variable assignments/reassignments in MaRdI.resliceimg() re: array dimensions.

…row warning when different from dcm header (series repetition number, i.e. number of measurements)
@evaalonsoortiz
Copy link
Member

@rtopfer I just tested this out, and was able to use the testing dataset that has a number of volume repetitions that differs from the original number. To confirm, the original error when usingMaRdI.resliceimg() still occurs. This is expected, right?

… Method now returns the correct array size but the extrapolation is still off (likely due to the ROI/mask assignment on which it is based)
…n mask (must match dims of extrapolation coordinate arrays)
@rtopfer rtopfer marked this pull request as ready for review August 19, 2020 23:09
@rtopfer
Copy link
Contributor Author

rtopfer commented Aug 19, 2020

@evaalonsoortiz should work now? tbh the whole function seems way more complicated than it ought to be... i feel there must be a simpler built-in matlab function somewhere 🧐

@evaalonsoortiz
Copy link
Member

Hmmm, still getting an error. I am using the EPI image in the sample dataset "34_ep2d_bold_realtime_zshim_UNSHIMMED_2" instead of a GRE for the resampling. The error I am getting now is slightly different:

Error using MaRdI/resliceimg (line 1283)
Dimensions of the arrays of extrapolation coordinate and the assigned extrapolation ROI mask must be identical

Error in realtime_zshim (line 310)
GzField.resliceimg( X,Y,Z, mask ) ; % reslice static b0 image

@evaalonsoortiz
Copy link
Member

@evaalonsoortiz should work now? tbh the whole function seems way more complicated than it ought to be... i feel there must be a simpler built-in matlab function somewhere 🧐

I think ANTs ResampleImage could replace this once the code is fully nifti-functional.

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

Successfully merging this pull request may close these issues.

Problem using "resliceimg"
2 participants