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
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
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.
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
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
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
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
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
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
does it load ok in freesurfer (in tksurfer)? What error do you get in AFNI/FSL? If it
On Mon, 6 Feb 2012, Omer Tal wrote:
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
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Hey Bruce,
So the mgh file loads fine in tksurfer (shows proper map) for the given subject, and so does its corresponding mgz (created from mri_convert).
In FSL there is no physical error, but when loading in the nii file, the X location is in ~786XX instead of the typical -128 to 128 or something close, Y has no slices to go through at all, and Z seems for the most part normal (240 slices centered at 0).
When I was trying to load those in AFNI, it simply said "ncols 157373 in volumes exceeds 32768" even though the reshape has been done.
Thank you, Omer Tal
does it load ok in freesurfer (in tksurfer)? What error do you get in AFNI/FSL? If it
On Mon, 6 Feb 2012, Omer Tal wrote:
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
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
It sounds like it is doing the right thing. The geometry is going to be bogus because it is a surface. You should post to the AFNI list. doug
Omer Tal wrote:
Hey Bruce,
So the mgh file loads fine in tksurfer (shows proper map) for the given subject, and so does its corresponding mgz (created from mri_convert).
In FSL there is no physical error, but when loading in the nii file, the X location is in ~786XX instead of the typical -128 to 128 or something close, Y has no slices to go through at all, and Z seems for the most part normal (240 slices centered at 0).
When I was trying to load those in AFNI, it simply said "ncols 157373 in volumes exceeds 32768" even though the reshape has been done.
Thank you, Omer Tal
does it load ok in freesurfer (in tksurfer)? What error do you get in AFNI/FSL? If it
On Mon, 6 Feb 2012, Omer Tal wrote:
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
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Sorry, that was the wrong error description (for the AFNI portion).
It just says cannot open dataset test.nii
Well, if it doesn't work on FSL or AFNI, I would guess it is the conversion process from FreeSurfer. I don't think anyone on AFNI knows mri_convert or mri_sruf2surf.
Honestly just trying to get support for your product for a very simple task, not sure where else I could find someone who would know how to use FS outputs.
Omer
It sounds like it is doing the right thing. The geometry is going to be bogus because it is a surface. You should post to the AFNI list. doug
Omer Tal wrote:
Hey Bruce,
So the mgh file loads fine in tksurfer (shows proper map) for the given subject, and so does its corresponding mgz (created from mri_convert).
In FSL there is no physical error, but when loading in the nii file, the X location is in ~786XX instead of the typical -128 to 128 or something close, Y has no slices to go through at all, and Z seems for the most part normal (240 slices centered at 0).
When I was trying to load those in AFNI, it simply said "ncols 157373 in volumes exceeds 32768" even though the reshape has been done.
Thank you, Omer Tal
does it load ok in freesurfer (in tksurfer)? What error do you get in AFNI/FSL? If it
On Mon, 6 Feb 2012, Omer Tal wrote:
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
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
It appears to be working for both FS and FSL. If it is working in FS and FSL and not in AFNI, then there's not much we can do about it. The AFNI developers don't know about our tools, and we don't know about theirs. I suggest you send the file to the AFNI developers and ask why it does not load. doug
Omer Tal wrote:
Sorry, that was the wrong error description (for the AFNI portion).
It just says cannot open dataset test.nii
Well, if it doesn't work on FSL or AFNI, I would guess it is the conversion process from FreeSurfer. I don't think anyone on AFNI knows mri_convert or mri_sruf2surf.
Honestly just trying to get support for your product for a very simple task, not sure where else I could find someone who would know how to use FS outputs.
Omer
It sounds like it is doing the right thing. The geometry is going to be bogus because it is a surface. You should post to the AFNI list. doug
Omer Tal wrote:
Hey Bruce,
So the mgh file loads fine in tksurfer (shows proper map) for the given subject, and so does its corresponding mgz (created from mri_convert).
In FSL there is no physical error, but when loading in the nii file, the X location is in ~786XX instead of the typical -128 to 128 or something close, Y has no slices to go through at all, and Z seems for the most part normal (240 slices centered at 0).
When I was trying to load those in AFNI, it simply said "ncols 157373 in volumes exceeds 32768" even though the reshape has been done.
Thank you, Omer Tal
does it load ok in freesurfer (in tksurfer)? What error do you get in AFNI/FSL? If it
On Mon, 6 Feb 2012, Omer Tal wrote:
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
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
Hey Doug,
I apologize, maybe I wasn't clear enough.
It DOESNT work in FSL. That would be enough for me if it did. It loads w/ out erroring out and quitting (as it did before the improper reshape), but it is obviously not a proper image anymore as it lost its three dimensions and nothing is displayed (see further explanation in previous e-mail to Bruce).
Would you like to review the file yourself? Maybe that could help clarify.
Thank you, Omer Tal
It appears to be working for both FS and FSL. If it is working in FS and FSL and not in AFNI, then there's not much we can do about it. The AFNI developers don't know about our tools, and we don't know about theirs. I suggest you send the file to the AFNI developers and ask why it does not load. doug
Omer Tal wrote:
Sorry, that was the wrong error description (for the AFNI portion).
It just says cannot open dataset test.nii
Well, if it doesn't work on FSL or AFNI, I would guess it is the conversion process from FreeSurfer. I don't think anyone on AFNI knows mri_convert or mri_sruf2surf.
Honestly just trying to get support for your product for a very simple task, not sure where else I could find someone who would know how to use FS outputs.
Omer
It sounds like it is doing the right thing. The geometry is going to be bogus because it is a surface. You should post to the AFNI list. doug
Omer Tal wrote:
Hey Bruce,
So the mgh file loads fine in tksurfer (shows proper map) for the given subject, and so does its corresponding mgz (created from mri_convert).
In FSL there is no physical error, but when loading in the nii file, the X location is in ~786XX instead of the typical -128 to 128 or something close, Y has no slices to go through at all, and Z seems for the most part normal (240 slices centered at 0).
When I was trying to load those in AFNI, it simply said "ncols 157373 in volumes exceeds 32768" even though the reshape has been done.
Thank you, Omer Tal
does it load ok in freesurfer (in tksurfer)? What error do you get in AFNI/FSL? If it
On Mon, 6 Feb 2012, Omer Tal wrote:
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 > > > _______________________________________________ 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
It won't make sense to load it into fslview. This is a surface, and fslview is a volume viewer. This may be the problem that you are running into with AFNI. If you want to map the surface back to the volume, use mri_vol2surf. doug
Omer Tal wrote:
Hey Doug,
I apologize, maybe I wasn't clear enough.
It DOESNT work in FSL. That would be enough for me if it did. It loads w/ out erroring out and quitting (as it did before the improper reshape), but it is obviously not a proper image anymore as it lost its three dimensions and nothing is displayed (see further explanation in previous e-mail to Bruce).
Would you like to review the file yourself? Maybe that could help clarify.
Thank you, Omer Tal
It appears to be working for both FS and FSL. If it is working in FS and FSL and not in AFNI, then there's not much we can do about it. The AFNI developers don't know about our tools, and we don't know about theirs. I suggest you send the file to the AFNI developers and ask why it does not load. doug
Omer Tal wrote:
Sorry, that was the wrong error description (for the AFNI portion).
It just says cannot open dataset test.nii
Well, if it doesn't work on FSL or AFNI, I would guess it is the conversion process from FreeSurfer. I don't think anyone on AFNI knows mri_convert or mri_sruf2surf.
Honestly just trying to get support for your product for a very simple task, not sure where else I could find someone who would know how to use FS outputs.
Omer
It sounds like it is doing the right thing. The geometry is going to be bogus because it is a surface. You should post to the AFNI list. doug
Omer Tal wrote:
Hey Bruce,
So the mgh file loads fine in tksurfer (shows proper map) for the given subject, and so does its corresponding mgz (created from mri_convert).
In FSL there is no physical error, but when loading in the nii file, the X location is in ~786XX instead of the typical -128 to 128 or something close, Y has no slices to go through at all, and Z seems for the most part normal (240 slices centered at 0).
When I was trying to load those in AFNI, it simply said "ncols 157373 in volumes exceeds 32768" even though the reshape has been done.
Thank you, Omer Tal
does it load ok in freesurfer (in tksurfer)? What error do you get in AFNI/FSL? If it
On Mon, 6 Feb 2012, Omer Tal wrote:
> 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 >> >> >> >> > _______________________________________________ > 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
that's why I asked if you are using SUMA, which knows about surfaces and overlays. The standard AFNI stuff won't know what to do with it, but SUMA should
Bruce
On Mon, 6 Feb 2012, Douglas N Greve wrote:
It won't make sense to load it into fslview. This is a surface, and fslview is a volume viewer. This may be the problem that you are running into with AFNI. If you want to map the surface back to the volume, use mri_vol2surf. doug
Omer Tal wrote:
Hey Doug,
I apologize, maybe I wasn't clear enough.
It DOESNT work in FSL. That would be enough for me if it did. It loads w/ out erroring out and quitting (as it did before the improper reshape), but it is obviously not a proper image anymore as it lost its three dimensions and nothing is displayed (see further explanation in previous e-mail to Bruce).
Would you like to review the file yourself? Maybe that could help clarify.
Thank you, Omer Tal
It appears to be working for both FS and FSL. If it is working in FS and FSL and not in AFNI, then there's not much we can do about it. The AFNI developers don't know about our tools, and we don't know about theirs. I suggest you send the file to the AFNI developers and ask why it does not load. doug
Omer Tal wrote:
Sorry, that was the wrong error description (for the AFNI portion).
It just says cannot open dataset test.nii
Well, if it doesn't work on FSL or AFNI, I would guess it is the conversion process from FreeSurfer. I don't think anyone on AFNI knows mri_convert or mri_sruf2surf.
Honestly just trying to get support for your product for a very simple task, not sure where else I could find someone who would know how to use FS outputs.
Omer
It sounds like it is doing the right thing. The geometry is going to be bogus because it is a surface. You should post to the AFNI list. doug
Omer Tal wrote:
Hey Bruce,
So the mgh file loads fine in tksurfer (shows proper map) for the given subject, and so does its corresponding mgz (created from mri_convert).
In FSL there is no physical error, but when loading in the nii file, the X location is in ~786XX instead of the typical -128 to 128 or something close, Y has no slices to go through at all, and Z seems for the most part normal (240 slices centered at 0).
When I was trying to load those in AFNI, it simply said "ncols 157373 in volumes exceeds 32768" even though the reshape has been done.
Thank you, Omer Tal
> does it load ok in freesurfer (in tksurfer)? What error do you get in > AFNI/FSL? If it > > On Mon, 6 Feb 2012, Omer Tal wrote: > > > > >> 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 >>> >>> >>> >>> >> _______________________________________________ >> 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
Ziad: any idea why Omer can open this file in tksurfer but not afni? Omer: I don't think you'll be able to load it in FSL since it's essentially a surface. Can you give us details about how you are trying to load it in AFNI? Are you using SUMA?
On Mon, 6 Feb 2012, Omer Tal wrote:
Sorry, that was the wrong error description (for the AFNI portion).
It just says cannot open dataset test.nii
Well, if it doesn't work on FSL or AFNI, I would guess it is the conversion process from FreeSurfer. I don't think anyone on AFNI knows mri_convert or mri_sruf2surf.
Honestly just trying to get support for your product for a very simple task, not sure where else I could find someone who would know how to use FS outputs.
Omer
It sounds like it is doing the right thing. The geometry is going to be bogus because it is a surface. You should post to the AFNI list. doug
Omer Tal wrote:
Hey Bruce,
So the mgh file loads fine in tksurfer (shows proper map) for the given subject, and so does its corresponding mgz (created from mri_convert).
In FSL there is no physical error, but when loading in the nii file, the X location is in ~786XX instead of the typical -128 to 128 or something close, Y has no slices to go through at all, and Z seems for the most part normal (240 slices centered at 0).
When I was trying to load those in AFNI, it simply said "ncols 157373 in volumes exceeds 32768" even though the reshape has been done.
Thank you, Omer Tal
does it load ok in freesurfer (in tksurfer)? What error do you get in AFNI/FSL? If it
On Mon, 6 Feb 2012, Omer Tal wrote:
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
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
Hey Bruce,
Maybe I can give more background information to help explain what I am trying to do here.
I have a subject which I have both MEG and fMRI data on. When I reconstructed my subject, I chose a dipole as a seed location and used it for my MEG analysis. Now I want to use the same location as a seed for my fMRI analysis, so I created an mgh file which had the value of 1 only in the FS vertex/dipole corresponding to my seed. I can view all versions of it, mgh, mgz and nii w/ no problem on tksurfer. On FSL though, I can't.
The reason I went this approach is when I wanted to use the same aparc_aseg parcellations in my fMRI data, all i had to do is use mri_convert on the aprac+aseg.mgz and I had a nice nii file I could view in FSL or AFNI overlaying my fMRI data and use the same ROIs in both modalities for analysis. Therefore, I thought it would make sense to do the same here, and create a mgh/mgz file and convert to an nii to get my mask that I could use in AFNI.
Do you believe my approach is impractical?
For loading in AFNI, all I did was afni test.nii.
Thank you, Omer
Ziad: any idea why Omer can open this file in tksurfer but not afni? Omer: I don't think you'll be able to load it in FSL since it's essentially a surface. Can you give us details about how you are trying to load it in AFNI? Are you using SUMA?
On Mon, 6 Feb 2012, Omer Tal wrote:
Sorry, that was the wrong error description (for the AFNI portion).
It just says cannot open dataset test.nii
Well, if it doesn't work on FSL or AFNI, I would guess it is the conversion process from FreeSurfer. I don't think anyone on AFNI knows mri_convert or mri_sruf2surf.
Honestly just trying to get support for your product for a very simple task, not sure where else I could find someone who would know how to use FS outputs.
Omer
It sounds like it is doing the right thing. The geometry is going to be bogus because it is a surface. You should post to the AFNI list. doug
Omer Tal wrote:
Hey Bruce,
So the mgh file loads fine in tksurfer (shows proper map) for the given subject, and so does its corresponding mgz (created from mri_convert).
In FSL there is no physical error, but when loading in the nii file, the X location is in ~786XX instead of the typical -128 to 128 or something close, Y has no slices to go through at all, and Z seems for the most part normal (240 slices centered at 0).
When I was trying to load those in AFNI, it simply said "ncols 157373 in volumes exceeds 32768" even though the reshape has been done.
Thank you, Omer Tal
does it load ok in freesurfer (in tksurfer)? What error do you get in AFNI/FSL? If it
On Mon, 6 Feb 2012, Omer Tal wrote:
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 > > _______________________________________________ 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
you could do the same if you sampled your test.nii into the volume. At the moment it's a surface overlay, so as Doug points out no volume loader will know what to do with it. You need the surface geometry/topology to properly display it. If you want to sample it into the volume I think you want mri_surf2vol.
cheers Bruce
On Mon, 6 Feb 2012, Omer Tal wrote:
Hey Bruce,
Maybe I can give more background information to help explain what I am trying to do here.
I have a subject which I have both MEG and fMRI data on. When I reconstructed my subject, I chose a dipole as a seed location and used it for my MEG analysis. Now I want to use the same location as a seed for my fMRI analysis, so I created an mgh file which had the value of 1 only in the FS vertex/dipole corresponding to my seed. I can view all versions of it, mgh, mgz and nii w/ no problem on tksurfer. On FSL though, I can't.
The reason I went this approach is when I wanted to use the same aparc_aseg parcellations in my fMRI data, all i had to do is use mri_convert on the aprac+aseg.mgz and I had a nice nii file I could view in FSL or AFNI overlaying my fMRI data and use the same ROIs in both modalities for analysis. Therefore, I thought it would make sense to do the same here, and create a mgh/mgz file and convert to an nii to get my mask that I could use in AFNI.
Do you believe my approach is impractical?
For loading in AFNI, all I did was afni test.nii.
Thank you, Omer
Ziad: any idea why Omer can open this file in tksurfer but not afni? Omer: I don't think you'll be able to load it in FSL since it's essentially a surface. Can you give us details about how you are trying to load it in AFNI? Are you using SUMA?
On Mon, 6 Feb 2012, Omer Tal wrote:
Sorry, that was the wrong error description (for the AFNI portion).
It just says cannot open dataset test.nii
Well, if it doesn't work on FSL or AFNI, I would guess it is the conversion process from FreeSurfer. I don't think anyone on AFNI knows mri_convert or mri_sruf2surf.
Honestly just trying to get support for your product for a very simple task, not sure where else I could find someone who would know how to use FS outputs.
Omer
It sounds like it is doing the right thing. The geometry is going to be bogus because it is a surface. You should post to the AFNI list. doug
Omer Tal wrote:
Hey Bruce,
So the mgh file loads fine in tksurfer (shows proper map) for the given subject, and so does its corresponding mgz (created from mri_convert).
In FSL there is no physical error, but when loading in the nii file, the X location is in ~786XX instead of the typical -128 to 128 or something close, Y has no slices to go through at all, and Z seems for the most part normal (240 slices centered at 0).
When I was trying to load those in AFNI, it simply said "ncols 157373 in volumes exceeds 32768" even though the reshape has been done.
Thank you, Omer Tal
does it load ok in freesurfer (in tksurfer)? What error do you get in AFNI/FSL? If it
On Mon, 6 Feb 2012, Omer Tal wrote:
> 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 >> >> > _______________________________________________ > 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
Hey Doug and Bruce,
I believe that was the enlightenment I so desperately needed :).
Thank you very much for your continuous effort and prompt responses. Your support is greatly appreciated!!!
Keep up the good work, Omer Tal
you could do the same if you sampled your test.nii into the volume. At the moment it's a surface overlay, so as Doug points out no volume loader will know what to do with it. You need the surface geometry/topology to properly display it. If you want to sample it into the volume I think you want mri_surf2vol.
cheers Bruce
On Mon, 6 Feb 2012, Omer Tal wrote:
Hey Bruce,
Maybe I can give more background information to help explain what I am trying to do here.
I have a subject which I have both MEG and fMRI data on. When I reconstructed my subject, I chose a dipole as a seed location and used it for my MEG analysis. Now I want to use the same location as a seed for my fMRI analysis, so I created an mgh file which had the value of 1 only in the FS vertex/dipole corresponding to my seed. I can view all versions of it, mgh, mgz and nii w/ no problem on tksurfer. On FSL though, I can't.
The reason I went this approach is when I wanted to use the same aparc_aseg parcellations in my fMRI data, all i had to do is use mri_convert on the aprac+aseg.mgz and I had a nice nii file I could view in FSL or AFNI overlaying my fMRI data and use the same ROIs in both modalities for analysis. Therefore, I thought it would make sense to do the same here, and create a mgh/mgz file and convert to an nii to get my mask that I could use in AFNI.
Do you believe my approach is impractical?
For loading in AFNI, all I did was afni test.nii.
Thank you, Omer
Ziad: any idea why Omer can open this file in tksurfer but not afni? Omer: I don't think you'll be able to load it in FSL since it's essentially a surface. Can you give us details about how you are trying to load it in AFNI? Are you using SUMA?
On Mon, 6 Feb 2012, Omer Tal wrote:
Sorry, that was the wrong error description (for the AFNI portion).
It just says cannot open dataset test.nii
Well, if it doesn't work on FSL or AFNI, I would guess it is the conversion process from FreeSurfer. I don't think anyone on AFNI knows mri_convert or mri_sruf2surf.
Honestly just trying to get support for your product for a very simple task, not sure where else I could find someone who would know how to use FS outputs.
Omer
It sounds like it is doing the right thing. The geometry is going to be bogus because it is a surface. You should post to the AFNI list. doug
Omer Tal wrote:
Hey Bruce,
So the mgh file loads fine in tksurfer (shows proper map) for the given subject, and so does its corresponding mgz (created from mri_convert).
In FSL there is no physical error, but when loading in the nii file, the X location is in ~786XX instead of the typical -128 to 128 or something close, Y has no slices to go through at all, and Z seems for the most part normal (240 slices centered at 0).
When I was trying to load those in AFNI, it simply said "ncols 157373 in volumes exceeds 32768" even though the reshape has been done.
Thank you, Omer Tal
> does it load ok in freesurfer (in tksurfer)? What error do you get > in > AFNI/FSL? If it > > On Mon, 6 Feb 2012, Omer Tal wrote: > > >> 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 >>> >>> >> _______________________________________________ >> 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
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
My apologies for not pointing it out but that number is not a prime number, and its largest factor (653) is smaller than 2^15...
Please advise.
Thank you very much for your time, Omer Tal
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
freesurfer@nmr.mgh.harvard.edu