help > RE: Field mapping correction
Feb 15, 2019  06:02 PM | Alfonso Nieto-Castanon - Boston University
RE: Field mapping correction
Hi Dayana,

Sorry about that, the error message was a bug in the code which was not handling your scenario correctly (you seem to have a single 4d volume containing two magnitude images, and another 3d volume containing the phasediff image). Please try the attached patch and let me know if you still run into any issues (note: this patch is for release 18b, to install it simply copy the attached file to the conn distribution folder overwriting the file with the same name there)

Regarding the image seemingly changing in the display when selecting only the magnitude volume and the magnitude+phase volumes, that is perfectly fine, it is just an issue with the intensity scaling of the display changing between the two displays (the display in the right is scaled in a way that shows both positive and negative values, while the display in the left is scaled differently since all values shown are positive). 

Last, regarding entering these files without using the GUI, you could perhaps use something like the following:

nses = 1;
for nsub = 1:numel(filenames) conn_set_functional(nsub,nses,'fmap',filenames{nsub}); end

where the variables filenames contains the list of the file pairs for each subject, so it should look something like:
  filenames = { ...
                   {'/data/subject1/magnitude.nii','/data/subject1/phase.nii'} ...
                   {'/data/subject2/magnitude.nii','/data/subject2/phase.nii'} ...
                   {'/data/subject3/magnitude.nii','/data/subject3/phase.nii'} ...
   ... etc.
                    }; 

Hope this helps
Alfonso
Originally posted by Dayana Hayek:
Hi Alfonso, 

Thank you so much for the quick reply!

I did exactly what you have said, but I have an error "Error using FieldMap_create (line 139); Funny number of input fieldmap images".

What I found also weird (attached pic) is that when I load the magnitude alone, it appears ok (left side of the pic) and when I load both magnitude and phase, the image changes (right side of the pic). I am not sure what is happening?

One last question, is it possible to load two image for each subject but not manually, for multiple subject? I used the ALT-select option to load functional and structural data for multiple subject, but it doesn't seem to work when there are two file for each subject.

Thanks,
Regards,

Dayana

Threaded View

TitleAuthorDate
Dayana Hayek Feb 13, 2019
jothini Mar 1, 2024
Yi Ding Nov 20, 2020
Dayana Hayek Mar 6, 2019
boris Feb 22, 2019
Alfonso Nieto-Castanon Feb 27, 2019
boris Feb 27, 2019
Zhaoxia Qin Feb 22, 2019
Alfonso Nieto-Castanon Feb 14, 2019
Dayana Hayek Feb 15, 2019
RE: Field mapping correction
Alfonso Nieto-Castanon Feb 15, 2019
Juan Dominguez Feb 27, 2019
Alfonso Nieto-Castanon Feb 27, 2019
Dayana Hayek Feb 20, 2019
Alfonso Nieto-Castanon Feb 20, 2019
Dayana Hayek Feb 20, 2019
Victoria Okuneye Feb 15, 2019
Alfonso Nieto-Castanon Feb 15, 2019
madeleine Oct 15, 2020
Alfonso Nieto-Castanon Oct 15, 2020
madeleine Oct 16, 2020
madeleine Oct 19, 2020