Re: [Freesurfer] Fw: Running recon-all with T1 and FLAIR
Hi Douglas, It seems that the lesions are in the right place. Do you have other suggestions? I just want to make sure; when you wrote: ind = find( (aseg.vol == 2 | aseg.vol == 41) & manlesion.vol != 0); -> you meant: ind = find( (aseg.vol == 2 | aseg.vol == 41) & manlesion.vol ~= 0); Best, Silas From: freesurfer-boun...@nmr.mgh.harvard.edu <freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Douglas N Greve <gr...@nmr.mgh.harvard.edu> Sent: Wednesday, August 10, 2016 11:56 PM To: freesurfer@nmr.mgh.harvard.edu Subject: Re: [Freesurfer] Fw: Running recon-all with T1 and FLAIR did you look at the aseg.mgz to see if the lesions were in the right place? On 08/10/2016 03:28 AM, Silas wrote: > > Thank you very much for your help Douglas! > > > I had a few problems running these commands. > > 1) recon-all -autorecon1 -autorecon2 -> no problems > > > 2) The matlab script > > The aseg.auto.mgz (256x256x256) didn't have the same size as the FLAIR > (resliced to 1mm, co-registered in MNI-space and with manually drawn > binary lesion masks (218x182x182)). I overcome this problem by > reslicing the FLAIR image and using aseg.auto.nii as the image > defining space. This was done in SPM8, and prior to this the > aseg.auto.mgz was converted to a .nii using mri_convert. > > This seemed to solve the problem! > > > 3) recon- all -autorecon2-cp -autorecon3 > > When running the following command i get this error: > > /depot64/freesurfer/freesurfer.5.3.0/bin/recon-all -s 01MS > -autorecon2-cp -autorecon3 subjid 01MS > > > > > '#@# Intensity Normalization2 Mon Aug DATE > /.../subjects_FLAIR/01MS/mri > > mri_normalize -aseg aseg.mgz -mask brainmask.mgz norm.mgz brain.mgz > > using segmentation for initial intensity normalization > using MR volume brainmask.mgz to mask input volume... > reading from norm.mgz... > Reading aseg aseg.mgz > normalizing image... > processing with aseg > removing outliers in the aseg WM... > 5361 control points removed > Building bias image > mriMarkUnmarkedNeighbors: all inputs must be MRI_UCHAR or MRI_INT > building Voronoi diagram... > Numerical argument out of domain > Linux big28 3.13.0-66-generic #108-Ubuntu SMP Wed Oct 7 15:20:27 UTC > 2015 x86_64 x86_64 x86_64 GNU/Linux > > recon-all -s 01MS exited with ERRORS at Mon Aug 8 15:31:32 CEST 2016 > > To report a problem, see > http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting' BugReporting - Free Surfer Wiki<http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting> surfer.nmr.mgh.harvard.edu top. Bug Reporting. Submitting a request for help . When submitting a request for help with your problems please be aware that the developers will try and repeat your ... > > *How can i solve this problem?* > > > Best, Silas > > > > > *From:* freesurfer-boun...@nmr.mgh.harvard.edu > <freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Douglas Greve > <gr...@nmr.mgh.harvard.edu> > *Sent:* Tuesday, August 2, 2016 4:06 AM > *To:* freesurfer@nmr.mgh.harvard.edu > *Subject:* Re: [Freesurfer] Fw: Running recon-all with T1 and FLAIR > > That recon-all command will not work as the FLAIR input should be a > simple FLAIR image. The FLAIR will only correct the pial surface and > will have nothing to do with lesion segmentation. Emily Lindermer has > a tool that can take a T1 and FLAIR and produce a lesion map; but > given that you already have manual segmentations, maybe that is not so > helpful. One thing you can do is to edit the aseg.mgz to insert your > lesions. First run recon-all with -autorecon1 -autorecon2 instead of > -all. Then, in matlab, > > > aseg = MRIread('aseg.auto.mgz'); % FreeSurfer aseg > > manlesion = MRIread('manlesion.nii.gz'); % Manual lesion, whatever > format, but should be binary > > ind = find( (aseg.vol == 2 | aseg.vol == 41) & manlesion.vol != 0); > > newaseg = aseg; > > newaseg.vol(ind) = 77; > > MRIwrite(newaseg,'aseg.mgz'); % This will overwrite the aseg.mgz, so > make a backup > > > Then run recon-all with -autorecon2-cp -autorecon3 > > > > On 8/1/16 7:35 AM, Silas wrote: >> >> >> Dear FreeSurfer team, >> >> >> I'm doing a structural analysis with 50 MS patients and 50 healthy >> controls (T1, T2 and FLAIR). The MS patients have multiple lesions >> mainly in white matter. My co-worker did manual editing (bullet >> points) in the FLAIR images, and i would like to use these edits when >> running recon-all in order to avoid further manual editing. >> >> >> The data i'm working
Re: [Freesurfer] Fw: Running recon-all with T1 and FLAIR
did you look at the aseg.mgz to see if the lesions were in the right place? On 08/10/2016 03:28 AM, Silas wrote: > > Thank you very much for your help Douglas! > > > I had a few problems running these commands. > > 1) recon-all -autorecon1 -autorecon2 -> no problems > > > 2) The matlab script > > The aseg.auto.mgz (256x256x256) didn't have the same size as the FLAIR > (resliced to 1mm, co-registered in MNI-space and with manually drawn > binary lesion masks (218x182x182)). I overcome this problem by > reslicing the FLAIR image and using aseg.auto.nii as the image > defining space. This was done in SPM8, and prior to this the > aseg.auto.mgz was converted to a .nii using mri_convert. > > This seemed to solve the problem! > > > 3) recon- all -autorecon2-cp -autorecon3 > > When running the following command i get this error: > > /depot64/freesurfer/freesurfer.5.3.0/bin/recon-all -s 01MS > -autorecon2-cp -autorecon3 subjid 01MS > > > > > '#@# Intensity Normalization2 Mon Aug DATE > /.../subjects_FLAIR/01MS/mri > > mri_normalize -aseg aseg.mgz -mask brainmask.mgz norm.mgz brain.mgz > > using segmentation for initial intensity normalization > using MR volume brainmask.mgz to mask input volume... > reading from norm.mgz... > Reading aseg aseg.mgz > normalizing image... > processing with aseg > removing outliers in the aseg WM... > 5361 control points removed > Building bias image > mriMarkUnmarkedNeighbors: all inputs must be MRI_UCHAR or MRI_INT > building Voronoi diagram... > Numerical argument out of domain > Linux big28 3.13.0-66-generic #108-Ubuntu SMP Wed Oct 7 15:20:27 UTC > 2015 x86_64 x86_64 x86_64 GNU/Linux > > recon-all -s 01MS exited with ERRORS at Mon Aug 8 15:31:32 CEST 2016 > > To report a problem, see > http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting' > > *How can i solve this problem?* > > > Best, Silas > > > > > *From:* freesurfer-boun...@nmr.mgh.harvard.edu > <freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Douglas Greve > <gr...@nmr.mgh.harvard.edu> > *Sent:* Tuesday, August 2, 2016 4:06 AM > *To:* freesurfer@nmr.mgh.harvard.edu > *Subject:* Re: [Freesurfer] Fw: Running recon-all with T1 and FLAIR > > That recon-all command will not work as the FLAIR input should be a > simple FLAIR image. The FLAIR will only correct the pial surface and > will have nothing to do with lesion segmentation. Emily Lindermer has > a tool that can take a T1 and FLAIR and produce a lesion map; but > given that you already have manual segmentations, maybe that is not so > helpful. One thing you can do is to edit the aseg.mgz to insert your > lesions. First run recon-all with -autorecon1 -autorecon2 instead of > -all. Then, in matlab, > > > aseg = MRIread('aseg.auto.mgz'); % FreeSurfer aseg > > manlesion = MRIread('manlesion.nii.gz'); % Manual lesion, whatever > format, but should be binary > > ind = find( (aseg.vol == 2 | aseg.vol == 41) & manlesion.vol != 0); > > newaseg = aseg; > > newaseg.vol(ind) = 77; > > MRIwrite(newaseg,'aseg.mgz'); % This will overwrite the aseg.mgz, so > make a backup > > > Then run recon-all with -autorecon2-cp -autorecon3 > > > > On 8/1/16 7:35 AM, Silas wrote: >> >> >> Dear FreeSurfer team, >> >> >> I'm doing a structural analysis with 50 MS patients and 50 healthy >> controls (T1, T2 and FLAIR). The MS patients have multiple lesions >> mainly in white matter. My co-worker did manual editing (bullet >> points) in the FLAIR images, and i would like to use these edits when >> running recon-all in order to avoid further manual editing. >> >> >> The data i'm working with is already resliced to 1 mm and >> co-registered in MNI-space. >> >> 1) Can i use this data or would it be preferable to use the original >> T1's? >> >> >> My thought was to run the following command: >> >> recon-all -subject subjectname -i /path/to/input_volume -FLAIR >> /path/to/FLAIR_volume_with_edits-FLAIRpial -all >> 2) Does this look correct? Is there anything i should be aware of? -> >> update: Does this command only improve the pial surface? How can i >> also improve the white mater segmentation (white) using FLAIR >> corrections? >> >> 3) Does it make a difference running recon-all -all with the FLAIR >> image - compared to running recon-all -autorecon3 with the FLAIR >> after running recon-all -all with only the T1? >> >> 4) I've also thought about using the lesion s
Re: [Freesurfer] Fw: Running recon-all with T1 and FLAIR
Thank you very much for your help Douglas! I had a few problems running these commands. 1) recon-all -autorecon1 -autorecon2 -> no problems 2) The matlab script The aseg.auto.mgz (256x256x256) didn't have the same size as the FLAIR (resliced to 1mm, co-registered in MNI-space and with manually drawn binary lesion masks (218x182x182)). I overcome this problem by reslicing the FLAIR image and using aseg.auto.nii as the image defining space. This was done in SPM8, and prior to this the aseg.auto.mgz was converted to a .nii using mri_convert. This seemed to solve the problem! 3) recon- all -autorecon2-cp -autorecon3 When running the following command i get this error: /depot64/freesurfer/freesurfer.5.3.0/bin/recon-all -s 01MS -autorecon2-cp -autorecon3 subjid 01MS '#@# Intensity Normalization2 Mon Aug DATE /.../subjects_FLAIR/01MS/mri mri_normalize -aseg aseg.mgz -mask brainmask.mgz norm.mgz brain.mgz using segmentation for initial intensity normalization using MR volume brainmask.mgz to mask input volume... reading from norm.mgz... Reading aseg aseg.mgz normalizing image... processing with aseg removing outliers in the aseg WM... 5361 control points removed Building bias image mriMarkUnmarkedNeighbors: all inputs must be MRI_UCHAR or MRI_INT building Voronoi diagram... Numerical argument out of domain Linux big28 3.13.0-66-generic #108-Ubuntu SMP Wed Oct 7 15:20:27 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux recon-all -s 01MS exited with ERRORS at Mon Aug 8 15:31:32 CEST 2016 To report a problem, see http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting' How can i solve this problem? Best, Silas From: freesurfer-boun...@nmr.mgh.harvard.edu <freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Douglas Greve <gr...@nmr.mgh.harvard.edu> Sent: Tuesday, August 2, 2016 4:06 AM To: freesurfer@nmr.mgh.harvard.edu Subject: Re: [Freesurfer] Fw: Running recon-all with T1 and FLAIR That recon-all command will not work as the FLAIR input should be a simple FLAIR image. The FLAIR will only correct the pial surface and will have nothing to do with lesion segmentation. Emily Lindermer has a tool that can take a T1 and FLAIR and produce a lesion map; but given that you already have manual segmentations, maybe that is not so helpful. One thing you can do is to edit the aseg.mgz to insert your lesions. First run recon-all with -autorecon1 -autorecon2 instead of -all. Then, in matlab, aseg = MRIread('aseg.auto.mgz'); % FreeSurfer aseg manlesion = MRIread('manlesion.nii.gz'); % Manual lesion, whatever format, but should be binary ind = find( (aseg.vol == 2 | aseg.vol == 41) & manlesion.vol != 0); newaseg = aseg; newaseg.vol(ind) = 77; MRIwrite(newaseg,'aseg.mgz'); % This will overwrite the aseg.mgz, so make a backup Then run recon-all with -autorecon2-cp -autorecon3 On 8/1/16 7:35 AM, Silas wrote: Dear FreeSurfer team, I'm doing a structural analysis with 50 MS patients and 50 healthy controls (T1, T2 and FLAIR). The MS patients have multiple lesions mainly in white matter. My co-worker did manual editing (bullet points) in the FLAIR images, and i would like to use these edits when running recon-all in order to avoid further manual editing. The data i'm working with is already resliced to 1 mm and co-registered in MNI-space. 1) Can i use this data or would it be preferable to use the original T1's? My thought was to run the following command: recon-all -subject subjectname -i /path/to/input_volume -FLAIR /path/to/FLAIR_volume_with_edits -FLAIRpial -all 2) Does this look correct? Is there anything i should be aware of? -> update: Does this command only improve the pial surface? How can i also improve the white mater segmentation (white) using FLAIR corrections? 3) Does it make a difference running recon-all -all with the FLAIR image - compared to running recon-all -autorecon3 with the FLAIR after running recon-all -all with only the T1? 4) I've also thought about using the lesion segmentation toolbox for SPM and completely avoid manual editing - is this preferable to using the FLAIR with manual editing? 5) How is the general strength of analysing corpus callosum structurally in MS patients using FreeSurfer? Best, Silas ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu<mailto: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 s
Re: [Freesurfer] Fw: Running recon-all with T1 and FLAIR
That recon-all command will not work as the FLAIR input should be a simple FLAIR image. The FLAIR will only correct the pial surface and will have nothing to do with lesion segmentation. Emily Lindermer has a tool that can take a T1 and FLAIR and produce a lesion map; but given that you already have manual segmentations, maybe that is not so helpful. One thing you can do is to edit the aseg.mgz to insert your lesions. First run recon-all with -autorecon1 -autorecon2 instead of -all. Then, in matlab, aseg = MRIread('aseg.auto.mgz'); % FreeSurfer aseg manlesion = MRIread('manlesion.nii.gz'); % Manual lesion, whatever format, but should be binary ind = find( (aseg.vol == 2 | aseg.vol == 41) & manlesion.vol != 0); newaseg = aseg; newaseg.vol(ind) = 77; MRIwrite(newaseg,'aseg.mgz'); % This will overwrite the aseg.mgz, so make a backup Then run recon-all with -autorecon2-cp -autorecon3 On 8/1/16 7:35 AM, Silas wrote: Dear FreeSurfer team, I'm doing a structural analysis with 50 MS patients and 50 healthy controls (T1, T2 and FLAIR). The MS patients have multiple lesions mainly in white matter. My co-worker did manual editing (bullet points) in the FLAIR images, and i would like to use these edits when running recon-all in order to avoid further manual editing. The data i'm working with is already resliced to 1 mm and co-registered in MNI-space. 1) Can i use this data or would it be preferable to use the original T1's? My thought was to run the following command: recon-all -subject subjectname -i /path/to/input_volume -FLAIR /path/to/FLAIR_volume_with_edits-FLAIRpial -all 2) Does this look correct? Is there anything i should be aware of? -> update: Does this command only improve the pial surface? How can i also improve the white mater segmentation (white) using FLAIR corrections? 3) Does it make a difference running recon-all -all with the FLAIR image - compared to running recon-all -autorecon3 with the FLAIR after running recon-all -all with only the T1? 4) I've also thought about using the lesion segmentation toolbox for SPM and completely avoid manual editing - is this preferable to using the FLAIR with manual editing? 5) How is the general strength of analysing corpus callosum structurally in MS patients using FreeSurfer? Best, Silas ___ 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] Fw: Running recon-all with T1 and FLAIR
Dear FreeSurfer team, I'm doing a structural analysis with 50 MS patients and 50 healthy controls (T1, T2 and FLAIR). The MS patients have multiple lesions mainly in white matter. My co-worker did manual editing (bullet points) in the FLAIR images, and i would like to use these edits when running recon-all in order to avoid further manual editing. The data i'm working with is already resliced to 1 mm and co-registered in MNI-space. 1) Can i use this data or would it be preferable to use the original T1's? My thought was to run the following command: recon-all -subject subjectname -i /path/to/input_volume -FLAIR /path/to/FLAIR_volume_with_edits -FLAIRpial -all 2) Does this look correct? Is there anything i should be aware of? -> update: Does this command only improve the pial surface? How can i also improve the white mater segmentation (white) using FLAIR corrections? 3) Does it make a difference running recon-all -all with the FLAIR image - compared to running recon-all -autorecon3 with the FLAIR after running recon-all -all with only the T1? 4) I've also thought about using the lesion segmentation toolbox for SPM and completely avoid manual editing - is this preferable to using the FLAIR with manual editing? 5) How is the general strength of analysing corpus callosum structurally in MS patients using FreeSurfer? Best, Silas ___ 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.