Hey Doug,
Here is what I type it the terminal and what pops back at me. The error shows up later when trying to load (either though AFNI or FSL).
mri_surf2surf --sval test.mgh --tval test.nii --reshape-factor 241 --s 111123 --hemi lh
srcsubject = 111123 srcval = test.mgh srctype = trgsubject = 111123 trgval = test.nii trgtype = srcsurfreg = sphere.reg trgsurfreg = sphere.reg srchemi = lh trghemi = lh frame = 0 fwhm-in = 0 fwhm-out = 0 label-src = (null) label-trg = (null) OKToRevFaceOrder = 1 Reading source surface reg /home/otal/raweegmeg/structuralDB//111123/surf/lh.sphere.reg Loading source data INFO: trgsubject = srcsubject Saving target data Reshaping 241 (nvertices = 157373) Saving to test.nii
Thank you, Omer Tal
what's your command line and terminal output?
Omer Tal wrote:
Tried both, but neither gave a proper nii image.
Any other ideas?
Omer Tal
That particular number factors to 241 and 653, so use one of those as the reshape factor to surf2surf. doug
Omer Tal wrote:
Hey Doug,
I believe for this patient/hemisphere the number of vertices is 157373.
What is the workaround in the case my number of vertices is unluckily a prime?
Thank you, Omer Tal
Hi Omar, how many vertices? The reshape only works if the number is not prime (actually the largest prime factor has to be less than 2^15. doug
Omer Tal wrote:
Hey Bruce,
Thank you for the prompt response.
The line is as follows:
mri_convert -it mgh -ot nii test.mgh test.nii.
Since I do agree that the issue is arising from the NIFTI bit limit, i tried doug's suggestion of
mri_surf2surf --sval test.mgh --tval test.nii --reshape-factor 6 --s subject_name --hemi lh
But it doesn't seem to solve the problem. even though now i can load it through FSL without it failing and quitting, the image is faulty w/ over 78,000 data points in the X direction, none in Y, and 240 in Z. At this point, Doug told him to send the file in and no more follow-up is shown...
Please advise.
Thank you very much, Omer Tal UCSD Keck Center for Functional MRI
> Hi Omer > > what file are you trying to convert? What is your entire command > line > with output and what problems do you have? Nifti unfortunately only > allows > 16 bits for the width/height/depth/nframes, so surface overlays > can't > usually fit as nvertices x 1 x 1 x nframes since nvertices > 2^16 > (or > 2^15 > signed). > > cheers > Bruce > > > On Mon, 6 Feb 2012, Omer > Tal wrote: > > > > >> Hey there, >> >> I am trying to convert an mgh file I created into an nii volume so >> I >> can >> load it in AFNI. I was trying to use mri_convert, which I have >> used >> previously to make nii volumes from my aparc+aseg and it worked >> great, >> but >> this time the resulting file is faulty. >> >> I've noticed a previous thread where someone ran into a similar >> problem, >> and it had to do w/ too many vertices existing for NIFTI, and Doug >> suggested using mri_surf2surf, but it didn't work for that guy or >> me >> (at >> which point I think he was sending you files). >> >> Seems like it should be something common and trivial, but I can't >> get >> it >> too work, any suggestions? >> >> Thank you, >> Omer Tal >> UCSD Keck Center for Functional MRI >> _______________________________________________ >> Freesurfer mailing list >> Freesurfer@nmr.mgh.harvard.edu >> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer >> >> >> >> >> >> > _______________________________________________ > Freesurfer mailing list > Freesurfer@nmr.mgh.harvard.edu > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer > > > 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. > > > > > _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
-- Douglas N. Greve, Ph.D. MGH-NMR Center greve@nmr.mgh.harvard.edu Phone Number: 617-724-2358 Fax: 617-726-7422
Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting FileDrop: www.nmr.mgh.harvard.edu/facility/filedrop/index.html
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
-- Douglas N. Greve, Ph.D. MGH-NMR Center greve@nmr.mgh.harvard.edu Phone Number: 617-724-2358 Fax: 617-726-7422
Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting FileDrop: www.nmr.mgh.harvard.edu/facility/filedrop/index.html
-- Douglas N. Greve, Ph.D. MGH-NMR Center greve@nmr.mgh.harvard.edu Phone Number: 617-724-2358 Fax: 617-726-7422
Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting FileDrop: www.nmr.mgh.harvard.edu/facility/filedrop/index.html
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer