Dear Freesurfer community,
Using freeview, I can visualize that two binary volumes are overlaying in some parts. freeview -v binF1.mgz -v binF2.mgz
When using the command mris_calc -o out.mgz binF1.mgz mul binF2.mgz to create the intersection of these two volumes, I obtain a file with only zeros. To debug, I added the two volumes mris_calc -o out.mgz binF1.mgz add binF2.mgz I was surprise to see that one of the volumes (binF1) is shifted of tens of voxels along an axis. When doing mris_calc -o out.mgz binF2.mgz add binF1.mgz, the binF2 is shifted.
Is that a bug ?
mris_calc : v.1.37.2.4 2011/04/04 freeview : v1.0 2011/05/22
Best,
Christopher
Hi Christophe
what does mri_info tell you about them? Are they the same geometry? Bruce On Fri, 12 Oct 2012, Christopher Coello wrote:
Dear Freesurfer community,
Using freeview, I can visualize that two binary volumes are overlaying in some parts. freeview -v binF1.mgz -v binF2.mgz
When using the command mris_calc -o out.mgz binF1.mgz mul binF2.mgz to create the intersection of these two volumes, I obtain a file with only zeros. To debug, I added the two volumes mris_calc -o out.mgz binF1.mgz add binF2.mgz I was surprise to see that one of the volumes (binF1) is shifted of tens of voxels along an axis. When doing mris_calc -o out.mgz binF2.mgz add binF1.mgz, the binF2 is shifted.
Is that a bug ?
mris_calc : v.1.37.2.4 2011/04/04 freeview : v1.0 2011/05/22
Best,
Christopher
In your use case below, the output volumes in each case are 'out.mgz'. There should be *no* modifications to binF1.mgz or binF2.mgz. 'mris_calc' in fact only reads from those files, it does not write to or manipulate them in any way.
So I don't completely understand how their contents can be modified. Assuming that somehow they are, you can double check with:
cp binF1.mgz binF1-bak.mgz mris_calc -o out.mgz binF1.mgz add binF2.mgz
You report that the above operation has somehow modified binF1.mgz -- if so, then
mris_calc -o out.mgz binF1.mgz sub binF1-bak.mgz
should result in a volume with non-zero elements. Can you check if that is the case?
To debug, I added the two volumes mris_calc -o out.mgz binF1.mgz add binF2.mgz I was surprise to see that one of the volumes (binF1) is shifted of tens of voxels along an axis. When doing mris_calc -o out.mgz binF2.mgz add binF1.mgz, the binF2 is shifted.
Hi Bruce,
They have the same geometry, but didn't have the same center (128 128 128 vs 128 118 72). I guess freeview doesn't not show this difference, or handle it in a different way than mris_calc. Nevertheless, when both volumes have the same center (mri_convert -oc 0 0 0), the mris_calc -o out.mgz binF2.mgz mul binF1.mgz gives the correct and expected result. Should have checked this earlier, but I have been lured by the overlay in freeview.
@ Rudolph : "problem" solved. I didn't express myself correctly, sorry about that. The content of binF1 and binF2 were absolutely not modified, the input volume was "shifted" (see why below) so that the resulting volume was different from what we expected when seeing the overlay in freeview.
Best,
Christopher
On 12.10.2012 16:57, Bruce Fischl wrote:
Hi Christophe
what does mri_info tell you about them? Are they the same geometry? Bruce On Fri, 12 Oct 2012, Christopher Coello wrote:
Dear Freesurfer community,
Using freeview, I can visualize that two binary volumes are overlaying in some parts. freeview -v binF1.mgz -v binF2.mgz
When using the command mris_calc -o out.mgz binF1.mgz mul binF2.mgz to create the intersection of these two volumes, I obtain a file with only zeros. To debug, I added the two volumes mris_calc -o out.mgz binF1.mgz add binF2.mgz I was surprise to see that one of the volumes (binF1) is shifted of tens of voxels along an axis. When doing mris_calc -o out.mgz binF2.mgz add binF1.mgz, the binF2 is shifted.
Is that a bug ?
mris_calc : v.1.37.2.4 2011/04/04 freeview : v1.0 2011/05/22
Best,
Christopher
The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Dear Freesurfer community,
I am using the unpacksdcmdir command as part of a DTI analysis in stable51:
unpacksdcmdir -src /space/archive/60/siemens/Allegra-20401-20051011-143458-528000 -targ ./ -run 009 dti NII CD_cerv_ctrl2_sess2_dti.nii -unpackerr
and am getting the following error:
ERROR: nthRun=1 has an invalid run number (009) Input does not exist or is not in a supported format
I have gone back to the original unpacking steps and confirmed that 009 is the correct run number, and that the path to -src is correct. Running identically structured commands on other subjects in the group has completed without errors.
Have you encountered this error, and do you know how I can correct it?
Thank you!
Jeff
Jeff Waugh, MD/PhD Fellow in Pediatric Movement Disorders, PGY-6 Massachusetts General Hospital / Boston Children's Hospital / Harvard University
Hi Jeff, use -run 9 instead of -run 009 doug
On 10/12/2012 10:58 AM, jwaugh@nmr.mgh.harvard.edu wrote:
Dear Freesurfer community,
I am using the unpacksdcmdir command as part of a DTI analysis in stable51:
unpacksdcmdir -src /space/archive/60/siemens/Allegra-20401-20051011-143458-528000 -targ ./ -run 009 dti NII CD_cerv_ctrl2_sess2_dti.nii -unpackerr
and am getting the following error:
ERROR: nthRun=1 has an invalid run number (009) Input does not exist or is not in a supported format
I have gone back to the original unpacking steps and confirmed that 009 is the correct run number, and that the path to -src is correct. Running identically structured commands on other subjects in the group has completed without errors.
Have you encountered this error, and do you know how I can correct it?
Thank you!
Jeff Jeff Waugh, MD/PhD Fellow in Pediatric Movement Disorders, PGY-6 Massachusetts General Hospital / Boston Children's Hospital / HarvardUniversity _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
freesurfer@nmr.mgh.harvard.edu