Re: [Freesurfer] tksurfer
Hi Emalie tksurfer and tkmedit have been deprecated for a long time. Can you try using freeview instead? cheers Bruce On Fri, 21 Feb 2020, Emalie McMahon wrote: External Email - Use Caution Hello, I get an error (see below) when opening tksurfer and tkmedit. Is there anyway to resolve this? tksurfer s001 lh inflated /Applications/freesurfer/tktools/tksurfer.bin: Bad CPU type in executable. Freesurfer Details: freesurfer-i386-apple-darwin11.4.2-stable6-20170119 OS Details: Computer: 2019 Macbook Pro OS: macOS 10.15.2 Catalin Processor: 2.4 GHz 8-Core Intel Core i9 Best, Emalie McMahon PhD Student Johns Hopkins University ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
[Freesurfer] tksurfer
External Email - Use Caution Hello, I get an error (see below) when opening tksurfer and tkmedit. Is there anyway to resolve this? tksurfer s001 lh inflated /Applications/freesurfer/tktools/tksurfer.bin: Bad CPU type in executable. Freesurfer Details: freesurfer-i386-apple-darwin11.4.2-stable6-20170119 OS Details: Computer: 2019 Macbook Pro OS: macOS 10.15.2 Catalin Processor: 2.4 GHz 8-Core Intel Core i9 Best, Emalie McMahon PhD Student Johns Hopkins University___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
[Freesurfer] Creating the pial surface of the cerebellum: how to let the mris_make_surfaces to push the pial surface to the boundary
External Email - Use Caution Dear experts of the freesurfer, I was trying to create the white matter and pial surfaces of the cerebellum of the marmoset, based on ultra-high (80um) resolution ex-vivo images. I manually segment the cerebellum into the white matter and the gray matter and change the header information to 1mm. Based on the manual segmented files, I created white matter surfaces (rh.orig). I tried to use the mris_make_surfaces to expand the white matter to create the matched pial surface. However, the *mris_make_surfaces* failed to push the surface enough. See the attached files and screenshots. I tried smoothing the segmentation, enhancing the contrasts, and tested different expert option (for example: -max_csf 0.1 -min_gray_at_csf_border 1) This was this best I got, but still cannot get an optimal result (not pushed enough): *mris_mask_surfaces -max_csf 0.1 -min_gray_at_csf_border 1 -orig_wm orig -orig_pial orig -noaseg -noaparc -T1 ceb_sm marmosetceb rh * Since I have already manually segmented the cerebellum, *is there a way to force the mris_make_surfaces to expand to the boundary of the image?* The files can be download to replicate what I did: https://pitt.box.com/s/6269a9mnwbs6zi0azn08dn55u47yfa7i Thank you very much! Best Regards, CiRong Liu ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
[Freesurfer] Optseq2 help needed
External Email - Use Caution Dear Developers, I am planning to run PVT (psychomotor vigilance task) in fMRI using event related design. This is an extremely simple reaction time task: participant has to respond to the appeared geometric shape as quickly as possible. The key feature of this paradigm is that we will have fluctuating and quite rapid event presentation times (ranging between 300 and 500 msec). Another important information is that we will use FSL FEAT for the evaluation. We decided to use opseq2 to optimize the design with the following parameters: optseq2 --ntp 150 --tr 2 --psdwin 0 20 --ev evt1 1 45 --nkeep 3 --o exp --nsearch 1 --tnullmin 3 --tnullmax 11 --repvar 10 Although with this design I get quite satisfying efficiency and VRF scores I do not understand that if I decrease dPSD why does it have significant negative effect on efficiency and VRF. Could you explain this? If I understand well, this is the only option to shift the onset of the event from the scanning points, and I would assume that if there is fluctuation in time between scanning points and stimuli presentation, it would help to "catch" the hemodynamic response easier (if the stimulus onset always goes together with the scans, we can always catch the same timepoints of the HRF). Did I misunderstand something? If I use FSL that is based on HRF estimation (and not on FIR), do these parameters (dPSD) and scores (efficiency & VRF) have meaning and function at all? My last question is related to event duration. Although I have fluctuating and short events, as you can see I chose 1 sec (because it has to be the integer multiple of the dPSD). Is it problematic? Thank you for your suggestions, Gergely - Gergely Darnai PhD Department of Behavioural Sciences Medical School, University of Pécs Phone: +36/72/536-256 Fax: +36/72/536-257 H-7624 Szigeti u. 12, Pécs, Hungary ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
[Freesurfer] how to convert the registered file (.lta) into NIfTI format in PETsurfer
External Email - Use Caution Hi All, How do you convert the registered file (.lta) into NIfTI format in PETsurfer. Thanks, ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] surfreg function
External Email - Use Caution Hi Doug, Thank you for your replay. I understood that if I did not specify "--surfreg my_avg_subject.sphere.reg" mri_preproc was going to use the original file ( sphere.reg), because in the help of mri_preproc it mentions this: --surfreg SurfReg : default is sphere.reg With this in mind, do you think it would not be necessary to specify it in mris_preproc? What is the difference between sphere.reg and my_avg_subject.sphere.reg? Best wishes, Marina ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] Question regarding Qdec vs mri_glmfit
External Email - Use Caution Hi,Douglas, Thanks for your reply! I have changed the classes and the contrast as your suggestion. But I still met some problem when viewed the results. I still met the problem when I loaded the sig.mgh file into freeview or qdec. I don't know how to see the result. Thank you in advance! At 2020-02-21 06:00:57, "Douglas N. Greve" wrote: Don't use gender as a continuous variable. You need four classes (TLE-Male, TLE-Female, etc) and change the contrast to reflect it, otherwise I think it looks ok. Load the sig.mgh file into freeview (or the tksurferfv freeview wrapper) On 2/19/2020 10:31 PM, 邓刊 wrote: External Email - Use Caution Dear Freesurfer support, we met some probelm when we investigate difference between two groups. We have two sets of data, one is the TLE group, the other is the extraTLE. We also has the variables: age,gender and neuropsychological test scores. We want to analyze the relationship between cortical thickness and neuropsychological test, controlling for age, gender and group. The contrast in the full DODS model in the mri_glmfit is 0 0 0 0 0.5 0.5 0 0, with the fsgd file being: GroupDescriptorFile 1 Title MyTitle MeasurementName thickness Class Class1_TLE Class Class3_extra_TLE Variables Age factor4 gender Input PT1_01 Class1_TLE 23 12 1 Input PT1_03 Class1_TLE 38 10.26 0 Input PT1_04 Class1_TLE 26 13 0 Input PT1_06 Class1_TLE 45 13 1 Input PT1_11 Class1_TLE 20 15 1 Input PT1_12 Class1_TLE 23 10.26 0 Input PT1_14 Class1_TLE 39 9 1 Input PT1_27 Class1_TLE 51 14 1 Input PT1_32 Class1_TLE 33 11 0 Input PT1_33 Class1_TLE 27 8 1 Input PT1_34 Class1_TLE 19 8 0 Preproc was done with: mris_preproc --fsgd patients_age_gender_Arithmetic.fsgd \ --cache-in thickness.fwhm15.fsaverage \ --target fsaverage \ --hemi rh \ --out rh_thickness_Arithmetic/rh.thickness.fwhm15_arithmetic.mgh GLM was done with: mri_glmfit --y rh_thickness_Arithmetic/rh.thickness.fwhm15_arithmetic.mgh \ --fsgd patients_age_gender_Arithmetic.fsgd dods \ --C difference_Arithmetic_all.mtx \ --surf fsaverage rh \ --glmdir rh_thickness_Arithmetic My questions are: (1)Are the command lines, fsgd file and the contrast matrix correct? (2)We have used qdec (DODS) to visualize the results, but I can't open the sig.mgh file. I dont know why? The terminal shows that : Reading /usr/local/freesurfer/tktools/tkUtils.tcl Using /usr/local/freesurfer/lib/tcl/fsgdfPlot.tcl ERROR: MRISread: file '/usr/local/freesurfer/subjects/Neuropsychology/rh_thickness_Arithmetic/difference_Arithmetic_all/F.mgh' has 0 vertices! Probably trying to use a scalar data file as a surface! Invalid argument I dont know how to solve it. I very appreciate your help. Kind regards, Kan ___ Freesurfer mailing list freesur...@nmr.mgh.harvard.eduhttps://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] Question regarding Qdec vs mri_glmfit
External Email - Use Caution Hi,Douglas, Thanks for your reply! I have changed the classes and the contrast as your suggestion. But I still met some problem when viewed the results. I still met the problem when I loaded the sig.mgh file into freeview or qdec. I still don't know how to see the result. Thank you in advance! At 2020-02-21 06:00:57, "Douglas N. Greve" wrote: Don't use gender as a continuous variable. You need four classes (TLE-Male, TLE-Female, etc) and change the contrast to reflect it, otherwise I think it looks ok. Load the sig.mgh file into freeview (or the tksurferfv freeview wrapper) On 2/19/2020 10:31 PM, 邓刊 wrote: External Email - Use Caution Dear Freesurfer support, we met some probelm when we investigate difference between two groups. We have two sets of data, one is the TLE group, the other is the extraTLE. We also has the variables: age,gender and neuropsychological test scores. We want to analyze the relationship between cortical thickness and neuropsychological test, controlling for age, gender and group. The contrast in the full DODS model in the mri_glmfit is 0 0 0 0 0.5 0.5 0 0, with the fsgd file being: GroupDescriptorFile 1 Title MyTitle MeasurementName thickness Class Class1_TLE Class Class3_extra_TLE Variables Age factor4 gender Input PT1_01 Class1_TLE 23 12 1 Input PT1_03 Class1_TLE 38 10.26 0 Input PT1_04 Class1_TLE 26 13 0 Input PT1_06 Class1_TLE 45 13 1 Input PT1_11 Class1_TLE 20 15 1 Input PT1_12 Class1_TLE 23 10.26 0 Input PT1_14 Class1_TLE 39 9 1 Input PT1_27 Class1_TLE 51 14 1 Input PT1_32 Class1_TLE 33 11 0 Input PT1_33 Class1_TLE 27 8 1 Input PT1_34 Class1_TLE 19 8 0 Preproc was done with: mris_preproc --fsgd patients_age_gender_Arithmetic.fsgd \ --cache-in thickness.fwhm15.fsaverage \ --target fsaverage \ --hemi rh \ --out rh_thickness_Arithmetic/rh.thickness.fwhm15_arithmetic.mgh GLM was done with: mri_glmfit --y rh_thickness_Arithmetic/rh.thickness.fwhm15_arithmetic.mgh \ --fsgd patients_age_gender_Arithmetic.fsgd dods \ --C difference_Arithmetic_all.mtx \ --surf fsaverage rh \ --glmdir rh_thickness_Arithmetic My questions are: (1)Are the command lines, fsgd file and the contrast matrix correct? (2)We have used qdec (DODS) to visualize the results, but I can't open the sig.mgh file. I dont know why? The terminal shows that : Reading /usr/local/freesurfer/tktools/tkUtils.tcl Using /usr/local/freesurfer/lib/tcl/fsgdfPlot.tcl ERROR: MRISread: file '/usr/local/freesurfer/subjects/Neuropsychology/rh_thickness_Arithmetic/difference_Arithmetic_all/F.mgh' has 0 vertices! Probably trying to use a scalar data file as a surface! Invalid argument I dont know how to solve it. I very appreciate your help. Kind regards, Kan ___ Freesurfer mailing list freesur...@nmr.mgh.harvard.eduhttps://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 long_mris_slopes
Hi Guillaume, not sure what is going on. It could be missing permissions or it could be that the disk is full? You could also try to drop the --do-label and see if that works. Best, Martin On Fri, 2020-02-14 at 10:12 +0100, Guillaume Carey wrote: > > Hello everyone, > I’m currently working on a longitudinal FreeSurfer pipeline in order > to compare cortical thickness changes across the time. I’m using > FreeSurfer version 6.0.0 (OS: Scientific Linux 7.3). I already > processed the recon-all, -base and -long processing steps. > Now I’m trying to run the “long_mris_slopes“ processing in order to > prepare the data for a two stage model analyze. But there is an > error. > The command: > long_mris_slopes --qdec ./qdec.dat --meas thickness --hemi lh --do- > spc --do-label --time month --qcache fsaverage --sd $SUBJECTDIR > > At first everything seems to work well for the 1st subject and then: > == > SUBJECT CBTPD-001/template_CBTPD-001 mapping label to QCache > (…) > Writing label file /data/guillaume/ParkAnx3/freesurfer/results/CBTPD- > 001/template_CBTPD-001/label/lh.long.cortex.fsaverage.label 167889 > mri_label2label: Done > > Traceback (most recent call last): > File "/opt/mumc/apps/freesurfer-6.0.0/bin/long_mris_slopes", line > 868, in > dirname = tempfile.mkdtemp('',prefix,'') > File "/usr/lib64/python2.7/tempfile.py", line 329, in mkdtemp > _os.mkdir(file, 0700) > OSError: [Errno 2] No such file or directory: './tmp-CBTPD- > 001/template_CBTPD-001_lh_thickness_wuK7ZI' > > It seems like the output “lh.long.cortex.fsaverage.label” has been > created for this subject. But then there is a missing “tmp” folder. > I haven’t find this error in the archives. Does anyone have an idea > of how to fix it ? > > Best, > Guillaume > ___ > 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] questions about batch running longitudinal data using long_submit_jobs on cluste
Hi, looks like someone changed the default python to version 3, and you are still using a script written for python 2. I think Andrew updated this recently, so obtaining a newer version of the long_submit_jobs script from dev may fix this. Best, Martin On Tue, 2020-02-11 at 18:03 +, Huang, Yiting wrote: > Hi there, > > I am trying to run some longitudinal data using freesurfer > long_submit_jobs command on cluster. I have double checked my > directory and files setup according to freesurfer longitudinal > preprocessing wiki: > https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/Scripts. And it > seems there is no problem with my setup. > However, when I run the command it keeps sending me error as below: > > launchpad:yh917[21] long_submit_jobs --qdec long.qdec.table.dat -- > cdir $PWD/../ --cross --base --long --pause 5 --max 200 --queue > max100 > File "/usr/local/freesurfer/stable6_0_0/bin/long_submit_jobs", line > 94 > print "job submission failed, maybe unknown host "+hostname >^ > SyntaxError: Missing parentheses in call to 'print'. Did you mean > print("job submission failed, maybe unknown host "+hostname)? > > I can't figure out the reasons. Any help please? > > Thanks, > Yiting > ___ > 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] some basic questions regarding longitudinal analyses in Freesurfer
Hi Lara, no, you should not use time point 1 as base. You need to distinguish between the image processing part and the statistics post processing analysis (LME). These are two separate things. For the image processing in the longitudinal pipeline, we create the base (=subject template). The name base can be misleading and has nothing to do with "baseline". That is why we try to refer to it as "subject_template" in most documentation now. Anyway, one never analyzes results of the subject template, but of the final fine-tuned time points after the -long runs. In your case, you can simply process the images independently (cross sectionally) and still perform the statistical LME analysis where you group results from the same subject. For measures from the stats files (aseg, aparc...) you just obtain those from the cross dirs with asegstats2table. For surface results you simply map everything to fsaverage (mris_preproc) and then run the LME. Best, Martin On Thu, 2020-02-20 at 21:53 +, Lara Foland-Ross wrote: > External Email - Use Caution > > Hi there, > > Reposting this message (below). Would appreciate any guidance you can > provide. > > Thanks, > Lara > > > From: freesurfer-boun...@nmr.mgh.harvard.edu < > freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Lara Foland-Ross > > Sent: Friday, February 7, 2020 12:46 PM > To: freesurfer@nmr.mgh.harvard.edu > Subject: [Freesurfer] some basic questions regarding longitudinal > analyses in Freesurfer > > External Email - Use Caution > > Hello, > > I'm analyzing a large dataset using an LME model to examine > longitudinal changes in brain structure that vary as a function of > group (patients vs controls). Because some participants were scanned > several years apart in early childhood, the intra-subject > registration failed in the longitudinal processing stream. For this > reason, my data were not initially processed using the longitudinal > processing stream within Freesurfer. However, per this thread - > https://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/msg55847.html > - I still plan to use the LME model. As I understand it, this model > assumes that the longitudinal processing stream was > conducted. Therefore, I have the following questions: > > 1. would the "base" (aka within-subject template) for each subject be > = time point 1? > 2. would the "long run" for each subject be = each subject's > individual time points? > 3. assuming #1 and 2 are correct, would I need to set my directory > structure to match that used in the longitudinal processing stream? > For example, if I have 2 time points for subject 1234, and they are > initially labeled "1234.time1" and "1234.time2", then in order to run > the LME model, I would create a copy of "1234.time1" and rename the > copy as "1234" to indicate to the software that this should be used > as the base. And, I would also need to rename "1234.time1" and > "1234.time2" as "1234.time1.long.1234" and "1234.time2.long.1234" to > indicate that these folders should be used as the longitudinal time > points. > > Does this seem appropriate? > > Thanks in advance for your help, > Lara > > Lara Foland-Ross, Ph.D. > Senior Research Associate and Imaging Lab Manager > Center for Interdisciplinary Brain Sciences Research > Stanford University School of Medicine > 401 Quarry Road, Room 1356 > Stanford, CA 94305-5795 > > > > ___ > 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
[Freesurfer] GLM DOSS questions
External Email - Use Caution Dear Freesurfer experts, I’ve just completed a GLM analysis in Freesurfer and I’d like to be sure that all the steps I’ve performed are the right ones. My analysis is looking at age related changes in cortical thickness in one group of patients, after regressing out the effects of disease duration. I obviously assume an inverse relationship between age and cortical thickness so that older age would be associated with cortical thickness reductions in specific brain regions. To test this hypothesis with Freesurfer I’ve used a GLM DOSS design. I’ve generated a fsgd file with the first column being the list of patients, the second column the age of patients, and the third column the disease duration. Then I’ve run the mris_preproc command. Afterward, I’ve generated 2 contrast matrices (one for the left and one for the right hemisphere) with the following structure: 0 -1 0. 1 question. Is the contrast matrices structure I’ve chosen the most appropriate one for the hypothesis I’d like to test? Then, I’ve run the glm analysis using the mri_glmfit command. To visualize the results I’ve used the freeview -f command and set the overlay_threshold to 1,5 instead of 4, cause I was interested in looking at all results significant at p < 0.05. 2 question. Is the overlay_threshold I’ve used the correct one? Lastly, I was interested in looking at my results after Montecarlo correction, so I’ve run the simulation using the mri_glmfit-sim command. However, here I’ve changed few options: mri_glmfit-sim \ --glmdir lh.dur.glmdir \ --cache 4 neg \ (here I’ve changed to 1,5 since I was interested again at a P value < 0,05 and not < 0.0001 and I’ve changed the neg option with abs since I was interested in absolute values identified through the previously run analysis) --cwp 0.05\ --2spaces 3 question. Are the edits I made to the command correct? It is not perfectly clear to me which one should be the preferred sign for the analysis (neg, pos or abs?). In the end, in order to visualize the Montecarlo corrected results I’ve used again the Freeview -f command and again I’ve sent the overlay threshold to 1,5 since I was interested in all significant clusters at P < 0,05. 4 question. Again, this threshold is the correct one for my purpose? I have one last question concerning the Montecarlo simulation. Are there any cases in which you would suggest to do not use it since it would not be an appropriate correction? Sorry for the long email but I needed to report all the steps in order to get an answer. Many thanks for all the help you’ll be able to provide. Best, Pilar Ferraro ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer