[Freesurfer] FSFAST registration
External Email - Use Caution Dear FS experts, I’m processing the task-related fMRI using FS-FAST. I check the quality assurance and modified some subjects’ registration file(named new one as “register_manual.lta”). Then I do the first level analysis and group analysis. My first question is: should I apply the new registration file into the following first level analysis and group analysis? I found a tutorial may be answer my question , but I’m not sure about it. http://surfer.nmr.mgh.harvard.edu/fswiki/MultiModalTutorialV6.0/FMRIGroupAnalysis#GroupROIfMRIAnalysis Assemble the data using new registration file by the command: mris_preproc --target fsaverage --hemi lh \ --iv fbirn-101/ces.nii fbirn-101/register.lta \ --iv fbirn-103/ces.nii fbirn-103/register.lta \ --iv fbirn-104/ces.nii fbirn-104/register.lta \ --projfrac 0.5 \ --out lh.ces.mgh Then use “mri_surf2surf”, “mri_glmfit” to do the group analysis. My second question is: does the following two procedures both feasible for fMRI group analysis ? Isxconcat-sess —> mri_glmfit —> mri-glnfit-sim mris_preproc —> mri_surf2surf —> mri_glmfit —> mri-glmfit-sim Thank you! Regards, Star ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
[Freesurfer] vol2subfield
External Email - Use Caution Hi list, where/how should I add the file listed below? https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/6.0.0-patch/vol2subfield Thanks___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] Freeview - command-line label sub-option "opacity" does not work
I’ll add the option for surface labels. > On Dec 30, 2019, at 2:02 PM, Antonin Skoch wrote: > > > External Email - Use Caution > > Hi Ruopeng, > > the command is something like: > > freeview -f rh.inflated:label=my.label:opacity=0.5 > > I see now, that the reason of my problem is that the "opacity" flag is > dedicated for volume labels (loaded by -l flag), not surface labels (loaded > by sub-option :label=label_file ) isn't it? > > Is it possible to control opacity of surface labels? > > Antonin > > > Od: Ruopeng Wang > Komu: Antonin Skoch , Freesurfer support list > > Odesláno: 30.12.2019 19:50 > Předmět: Re: [Freesurfer] Freeview - command-line label sub-option "opacity" > does not work > > Can you post the full command? > > Ruopeng > >>> On Dec 30, 2019, at 1:10 PM, Antonin Skoch wrote: >>> >> >> External Email - Use Caution >> >> Dear experts, >> >> a freeview command-line label sub-option "opacity" does not work for me. >> >> Freeview exits with error: Unrecognized sub-option flag 'opacity'. >> >> I am using most recent dev version (30 dec 2019). >> >> Could you please check that? >> >> Regards, >> >> Antonin Skoch >> ___ >> 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
[Freesurfer] Cortical inflation and maintenance of surface voxel intensity
Dear Freesurfer experts, I am a medical student and am currently doing a fellowship at the JPK Stroke Research Center - MGH. My current research project involves measuring the area of a cortical hypointense brain MRI signal (cortical superficial siderosis) , a marker that lays along the subarachnoid space/pial surface, only visible in blood sensitive MRI (SWI in my case). In summary: We are trying to do a parallel to fMRI studies (fMRI x T1w // SWI x T1w), analyzing SWI signal intensity on a registered inflated brain surface; Projecting SWI surface intensity would then allow manual area demarcation of hipointensities in a flat surface. Here is our step-by-step plan (analogous to fMRIxT1w registration/BOLD signal intensity projection to surface): 1. Perform freesurfer recon-all of the subject in question to generate subject-surface models. 2. BET and register the image of interest (SWI) into the freesurfer-subject space (register both SWI and MEMPRAGE sequences) [bbregister] 3. Having SWI in subject space and a surface model (generated in 1); * Split registered SWI into LH and RH * Tkregister2 to get LTA to mri_vol2surf format * Mri_vol2surf each hemisphere to the recon output 4. Display the SWI hemi surface as an overlay 5. Inflate T1 surface and observe its SWI overlay; * Manual demarcation of characteristic SWI hypointense signals 6. Analyze measured signal We did try this approach, but yet with these steps we could only obtain an inflated cortical surface representation that has no correspondence to SWI`s intensity. So, here comes the question: If BOLD signal intensity can be projected onto surface area; is there a way to project SWI intensity onto the cortical surface? Or Can we preserve the info of SWI surface voxel intensity while doing the surface inflation? If not Is it possible to use the positional information of t1w voxel (used in inflation process) as an index to retrieve its correspondent SWI intensity value? Sorry for the long question. In advance I thank you already for being so attentive. Best, Pedro Pedro Augusto Assis Lopes Student Researcher J. Philip Kistler Stroke Research Center Massachusetts General Hospital 175 Cambridge Street, Suite 300 Boston, MA 02114 Phone: (617) 643-3940 ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] Freeview - command-line label sub-option "opacity" does not work
External Email - Use Caution Hi Ruopeng, the command is something like: freeview -f rh.inflated:label=my.label:opacity=0.5 I see now, that the reason of my problem is that the "opacity" flag is dedicated for volume labels (loaded by -l flag), not surface labels (loaded by sub-option :label=label_file ) isn't it? Is it possible to control opacity of surface labels? Antonin Od: Ruopeng Wang Komu: Antonin Skoch , Freesurfer support list Odesláno: 30.12.2019 19:50 Předmět: Re: [Freesurfer] Freeview - command-line label sub-option "opacity" does not work Can you post the full command? Ruopeng On Dec 30, 2019, at 1:10 PM, Antonin Skoch wrote: External Email - Use Caution Dear experts, a freeview command-line label sub-option "opacity" does not work for me. Freeview exits with error: Unrecognized sub-option flag 'opacity'. I am using most recent dev version (30 dec 2019). Could you please check that? Regards, Antonin Skoch ___ 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
Re: [Freesurfer] Freeview - command-line label sub-option "opacity" does not work
Can you post the full command? Ruopeng > On Dec 30, 2019, at 1:10 PM, Antonin Skoch wrote: > > > External Email - Use Caution > > Dear experts, > > a freeview command-line label sub-option "opacity" does not work for me. > > Freeview exits with error: Unrecognized sub-option flag 'opacity'. > > I am using most recent dev version (30 dec 2019). > > Could you please check that? > > Regards, > > Antonin Skoch > ___ > 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
[Freesurfer] Freeview - command-line label sub-option "opacity" does not work
External Email - Use Caution Dear experts, a freeview command-line label sub-option "opacity" does not work for me. Freeview exits with error: Unrecognized sub-option flag 'opacity'. I am using most recent dev version (30 dec 2019). Could you please check that? Regards, Antonin Skoch ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] Error in MATLAB while using freesurfer commands
You can unzip it outside of freesurfer and name it *.mgh then see if it works cheers Bruce > On Dec 30, 2019, at 3:49 AM, mahdi mahdavi wrote: > > > External Email - Use Caution > > I think a part of the problem is from this part in load_mgh.m: > > % unzip if it is compressed > if (strcmpi(fname((strlen(fname)-3):strlen(fname)), '.MGZ') | ... > strcmpi(fname((strlen(fname)-3):strlen(fname)), '.GZ')) > rand('state', sum(100*clock)); > gzipped = round(rand(1)*1000 + ... > sum(int16(fname))) + round(cputime); > %ind = findstr(fname, '.'); > %new_fname = sprintf('/tmp/tmp.load_mgh.%d.mgh', gzipped); > new_fname = sprintf('%s.load_mgh.%d.mgh', tempname,gzipped); > > if(strcmp(computer,'MAC') || strcmp(computer,'MACI') || ismac) > unix(sprintf('gunzip -c %s > %s', fname, new_fname)) ; > else > unix(sprintf('zcat %s > %s', fname, new_fname)) ; > end > fname = new_fname ; > else > gzipped = -1 ; > end > > there is no command for windows (just mac and linux it seems) and matlab cant > recognize the zcat linux command (my linux shell, however, recognizes it). i > dont know how to modify this part to prevent the not recognized z cat error. > >> On Mon, Dec 30, 2019 at 11:39 AM mahdi mahdavi >> wrote: >> I wanted to test the QuickNATv2 MATLAB and since I saw that it used >> freesufer, I used one of the samples in the subjects folder of freesurfer >> (sample-001.mgz), conformed it to 256^3( the QuickNAT required 256^3) and >> saved it as subject-0001.mgz. I'm sending you the screenshot of mri_info >> subject-0001.mgz. Oh i also forgot to send you the complete MATLAB error; >> it's complete form is like this: >> 'zcat' is not recognized as an internal or external command, >> operable program or batch file. >> ERROR: problem reading fname >> 'rm' is not recognized as an internal or external command, >> operable program or batch file. >> SWITCH expression must be a scalar or a character vector. >> >> Error in load_mgh (line 158) >> switch type >> >> Error in MRIread (line 87) >> [mri.vol, M, mr_parms, volsz] = load_mgh(fspec,[],[],headeronly); >> >> Error in RunFile (line 15) >> DataVol = MRIread([DataPath,FileName]); >> >> I saw somewhere that the problem might be from the .mgz file so i extracted >> it using Winrar and renamed it subject-0001.mgh and this time it showed this >> error: >> ERROR: could not open C:\Users\home\Desktop\Project >> code\QuickNATv2\SampleDatasample-0001.mgh for reading >> ERROR: loading C:\Users\home\Desktop\Project >> code\QuickNATv2\SampleDatasample-0001.mgh as MGH >> Dot indexing is not supported for variables of this type. >> >> Error in RunFile (line 16) >> Data = DataVol.vol >> >> >> >> >> >>> On Sun, Dec 29, 2019 at 10:56 PM Bruce Fischl >>> wrote: >>> Hi Mahdi >>> >>> can you run mri_info in a Linux shell on that file and send us the entire >>> screen output? >>> >>> cheers >>> Bruce >>> On Sun, 29 Dec 2019, mahdi mahdavi wrote: >>> >>> > >>> > External Email - Use Caution >>> > >>> > Hi. I'm a medical student and I'm trying to use the QuickNATv2 MATLAB >>> > code for >>> > structural MRI segmentation for a paper. However, at the last step when I >>> > want to >>> > execute the Run command for this program, it returns an error related to >>> > MRIRead >>> > function from freesurfer. I'm, using windows so I Cloned freesurfer >>> > library from >>> > github and defined its path for MATLAB. The error is: SWITCH expression >>> > must be a >>> > scalar or a character vector; the MRI data is a .mgz file: >>> > >>> > Error in load_mgh (line 166) >>> > switch type >>> > >>> > Error in MRIread (line 94) >>> > [mri.vol, M, mr_parms, volsz] = load_mgh(fspec,[],[],headeronly); >>> > >>> > Error in RunFile (line 15) >>> > DataVol = MRIread([DataPath,FileName]); >>> > I've also tried using linux shell for windows 10 and installed the >>> > freesurfer with >>> > it but i still get the same error. I didn't find any helpful guides on >>> > various >>> > forums so I'm mailing you hoping to find a solution cause I really need >>> > to run >>> > the QuickNAT for a paper. >>> > Regards >>> > Mahdi >>> > >>> > >>> >___ >>> 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 ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] Error in MATLAB while using freesurfer commands
External Email - Use Caution I think a part of the problem is from this part in load_mgh.m: % unzip if it is compressed if (strcmpi(fname((strlen(fname)-3):strlen(fname)), '.MGZ') | ... strcmpi(fname((strlen(fname)-3):strlen(fname)), '.GZ')) rand('state', sum(100*clock)); gzipped = round(rand(1)*1000 + ... sum(int16(fname))) + round(cputime); %ind = findstr(fname, '.'); %new_fname = sprintf('/tmp/tmp.load_mgh.%d.mgh', gzipped); new_fname = sprintf('%s.load_mgh.%d.mgh', tempname,gzipped); if(strcmp(computer,'MAC') || strcmp(computer,'MACI') || ismac) unix(sprintf('gunzip -c %s > %s', fname, new_fname)) ; else unix(sprintf('zcat %s > %s', fname, new_fname)) ; end fname = new_fname ; else gzipped = -1 ; end there is no command for windows (just mac and linux it seems) and matlab cant recognize the zcat linux command (my linux shell, however, recognizes it). i dont know how to modify this part to prevent the not recognized z cat error. On Mon, Dec 30, 2019 at 11:39 AM mahdi mahdavi wrote: > I wanted to test the QuickNATv2 MATLAB and since I saw that it used > freesufer, I used one of the samples in the subjects folder of freesurfer > (sample-001.mgz), conformed it to 256^3( the QuickNAT required 256^3) and > saved it as subject-0001.mgz. I'm sending you the screenshot of mri_info > subject-0001.mgz. Oh i also forgot to send you the complete MATLAB error; > it's complete form is like this: > 'zcat' is not recognized as an internal or external command, > operable program or batch file. > ERROR: problem reading fname > 'rm' is not recognized as an internal or external command, > operable program or batch file. > SWITCH expression must be a scalar or a character vector. > > Error in load_mgh (line 158) > switch type > > Error in MRIread (line 87) > [mri.vol, M, mr_parms, volsz] = load_mgh(fspec,[],[],headeronly); > > Error in RunFile (line 15) > DataVol = MRIread([DataPath,FileName]); > > I saw somewhere that the problem might be from the .mgz file so i > extracted it using Winrar and renamed it subject-0001.mgh and this time it > showed this error: > ERROR: could not open C:\Users\home\Desktop\Project > code\QuickNATv2\SampleDatasample-0001.mgh for reading > ERROR: loading C:\Users\home\Desktop\Project > code\QuickNATv2\SampleDatasample-0001.mgh as MGH > Dot indexing is not supported for variables of this type. > > Error in RunFile (line 16) > Data = DataVol.vol > > > >> > > On Sun, Dec 29, 2019 at 10:56 PM Bruce Fischl > wrote: > >> Hi Mahdi >> >> can you run mri_info in a Linux shell on that file and send us the entire >> screen output? >> >> cheers >> Bruce >> On Sun, 29 Dec 2019, mahdi mahdavi wrote: >> >> > >> > External Email - Use Caution >> > >> > Hi. I'm a medical student and I'm trying to use the QuickNATv2 MATLAB >> code for >> > structural MRI segmentation for a paper. However, at the last step when >> I want to >> > execute the Run command for this program, it returns an error related >> to MRIRead >> > function from freesurfer. I'm, using windows so I Cloned freesurfer >> library from >> > github and defined its path for MATLAB. The error is: SWITCH expression >> must be a >> > scalar or a character vector; the MRI data is a .mgz file: >> > >> > Error in load_mgh (line 166) >> > switch type >> > >> > Error in MRIread (line 94) >> > [mri.vol, M, mr_parms, volsz] = load_mgh(fspec,[],[],headeronly); >> > >> > Error in RunFile (line 15) >> > DataVol = MRIread([DataPath,FileName]); >> > I've also tried using linux shell for windows 10 and installed the >> freesurfer with >> > it but i still get the same error. I didn't find any helpful guides on >> various >> > forums so I'm mailing you hoping to find a solution cause I really need >> to run >> > the QuickNAT for a paper. >> > Regards >> > Mahdi >> > >> > >> >___ >> 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