Re: [Freesurfer] treatment effect compare to controls

2015-03-03 Thread amirhossein manzouri
Hi Martin,
Thanks for your instructions. In my analysis when we look at Two Stage
Model results within our control group , we see increase in thickness
(thickening) more than decrease (thinning), where we expect to see the
thinning effect. Is there any explanation for this? I have 19 controls with
2 to 3 years difference between tp1 and tp2.

Best regards,
Amirhossein Manzouri




On Mon, Feb 23, 2015 at 5:25 PM, Martin Reuter mreu...@nmr.mgh.harvard.edu
wrote:

 Hi,

 yes, the first is to stack all the data into a single file (on your study
 average, usually that is fsaverage). The second steps smoothes the data.
 You can use different smoothing levels, depending on your data. Usually 10
 or 15 is a good number.

 The data will automatically be taken from the sub1t1.long.tempsub1 etc
 directories (this is signaled by the --qdec-long flag. The qdec table needs
 to be in the longitudinal format, that means the first column is the
 subject id (sub1-t1) the second column the base name (tempsub1) column
 headers are fsid fsid-base ….
 usually the third column is time from baseline (in years), but can be any
 time variable that you want to use in the LME.

 There is an example of the longitudinal qdec table here:
 http://freesurfer.net/fswiki/LongitudinalTwoStageModel

 I'll probably add that to the lme page so it is easier to find.

 Best, Martin

 On Feb 23, 2015, at 4:54 AM, amirhossein manzouri a.h.manzo...@gmail.com
 wrote:

 Hi  and thanks Martin for your help,
 I am trying to do mixed effect analysis, should I use the registered to
 template data for this ( sub1-t1.long.tempsub1 and sub1-t2.long.tempsub1)
 and how should the aded.table.dat look like? Do I need to run :

 mris_preproc --qdec-long qdec.table.dat --target study_average --hemi lh 
 --meas thickness --out lh.thickness.mgh

 mri_surf2surf --hemi lh --s study_average --sval lh.thickness.mgh --tval 
 lh.thickness_sm10.mgh --fwhm-trg 10 --cortex  --noreshape


 -
 Dr. Martin Reuter
 Assistant in Neuroscience - Massachusetts General Hospital
 Instructor in Neurology   - Harvard Medical School
 MGH / HMS / MIT

 A.A.Martinos Center for Biomedical Imaging
 149 Thirteenth Street, Suite 2301
 Charlestown, MA 02129

 Phone: +1-617-724-5652
 Email:
mreu...@nmr.mgh.harvard.edu
reu...@mit.edu
 Web  : http://reuter.mit.edu

 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


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.


Re: [Freesurfer] multiple comparisons correction for individual hemispheres (native space)

2015-03-03 Thread Douglas N Greve
Hi Antonin, please remember to send responses to the list. Thanks! I've 
put a new version of cluster-sess in that same location. Let me know if 
that works.

for the mri_mcsim command, make sure to pass it a fwhm that is an 
integer. Also, I would probably just run it with --fwhm-max so that it 
does all the fwhms below the max. There is virtually no time penalty for 
this and it may be useful in other cases where the fwhm is not exactly 
the same.

doug

On 03/03/2015 08:42 AM, Antonin Skoch wrote:
 Dear Douglas,

 thank you very much for the file. It seems, that the -cache-dir 
 parameter is not parsed properly in this script.
 By -cache-dir you fill-in the CacheDir variable, but it is never used 
 and at line 182 you use for csd directory construction variable SimDir 
 which hard-coded points to $SUBJECTS_DIR/fsaverage/mult-comp-cor.

 But when I corrected for this, it works in principle.

 Could you please check that I understand the usage correctly?
 I simulated my own distribution in subject's native space by using 
 mri_mcsim, for example for right hemisphere by this command
 mri_mcsim --o subject_name/rh/cortex --base mc-z --surf subject_name 
 rh --nreps 1 --fwhm my_fwhm(from fwhm.dat in analysis directory)
 and then run cluster-sess -analysis analysis_name -thresh 2 -a2009s 
 -2spaces -cache-dir dir_of_my_simulation -s session_ID

 Regards,

 Antonin

 
 *From:* Douglas N Greve [mailto:gr...@nmr.mgh.harvard.edu]
 *To:* Antonin Skoch [mailto:a...@medicon.cz]
 *Sent:* Mon, 02 Mar 2015 21:07:36 +0100
 *Subject:* Re: [Freesurfer] multiple comparisons correction for
 individual hemispheres (native space)

 Sorry, try it now

 On 03/02/2015 02:42 PM, Antonin Skoch wrote:
  Dear Douglas,
 
  I am also interested in multiple comparisons correction in
 first-level
  analysis for individual hemispheres in fsFast. Unfortunately,
 your file
 
 ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/cluster-sess
 
  which you provided for Christopher in November 2014 is not
 available
  at that location. Could you please provide this file permanently
 for
  other users?
 
  Regards,
 
  Antonin Skoch
  Institute for Clinical and Experimental Medicine
  Czech Republic

 -- 
 Douglas N. Greve, Ph.D.
 MGH-NMR Center
 gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu
 Phone Number: 617-724-2358
 Fax: 617-726-7422

 Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
 FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
 www.nmr.mgh.harvard.edu/facility/filedrop/index.html
 Outgoing:
 ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/



 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.


-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
gr...@nmr.mgh.harvard.edu
Phone Number: 617-724-2358
Fax: 617-726-7422

Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
www.nmr.mgh.harvard.edu/facility/filedrop/index.html
Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


Re: [Freesurfer] QDEC longitudinal analysis

2015-03-03 Thread Martin Reuter
Hi Carolina,

the command long_qdec_table reduces your longitudinal table (the one with the 
second column 'fsid-base') into cross sectional format with one line per 
subject. That's all it does. In order to create the within-subject rate and 
percent change maps, you need to run long_mris_slopes first. That will create a 
within subject rate map (via a linear fit into the longitudinal data within 
each subject) and map the results to the study template (usually fsaverage), it 
also performs smoothing. You are right that, in order to run the cross 
sectional analysis of rate-maps with QDEC you would need to modify the qdecrc

Documentation can be found here:
http://freesurfer.net/fswiki/LongitudinalTwoStageModel 

Note that we recommend to use Linear Mixed Effects models for analysis of 
longitudinal data (which currently requires matlab):
http://freesurfer.net/fswiki/LinearMixedEffectsModels 

Best, Martin


On Mar 3, 2015, at 2:46 AM, carolina.mr carolina...@uol.com.br wrote:

 Hello Freesurfers,
  
 I am trying to run QDEC for a longitudinal analysis.
  
 I've run the command  long_qdec_table --qdec ./qdec/long.qdec.table.dat 
 --cross --out ./qdec/cross.qdec.table.dat to adjust my qdec table to the 
 right format for QDEC (with only one line / subject).
 I've also created the .Qdecrc file in my qdec directory.
  
 But, my end up table contains the fsid with my base images. When I run the 
 analysis, appears an error message: Error in analyze: Couldn't open 
 /baseID/surf/lh.thickness.fwhm10.fsaverage.mgz file.
 Indeed, this file does not exist in the base directory (but I think it was 
 not supposed to be there).
  
 Additionaly, I was interested in test the correlation between spc and rate 
 and the changes in the clinical parameters of my sample. I though it would be 
 feasible after creating .Qdecrc file. Is that right?
  
 Kind regards,
 Carolina
  
  
 ___
 Freesurfer mailing list
 Freesurfer@nmr.mgh.harvard.edu
 https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

-
Dr. Martin Reuter
Assistant in Neuroscience - Massachusetts General Hospital
Instructor in Neurology   - Harvard Medical School
MGH / HMS / MIT

A.A.Martinos Center for Biomedical Imaging
149 Thirteenth Street, Suite 2301
Charlestown, MA 02129

Phone: +1-617-724-5652
Email: 
   mreu...@nmr.mgh.harvard.edu
   reu...@mit.edu
Web  : http://reuter.mit.edu 

___
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.


Re: [Freesurfer] equivalent for fslmaths -mas option in freesurfer

2015-03-03 Thread Sarah Finnegan
The command I used to visualise the label converted to volume form (using 
mri_label2vol) in tkmedit was 

tkmedit V2_subject5_1 orig.mgz   -overlay V2_lh.mgz  -overlay-reg register.dat 
-fthresh .5 -fmid 1

my tksurfer command was 
tksurfer V2_subject5_1 lh inflated 

where I then attempted to overlay V2_lh.mgz as an overlay using the 
register.dat file to register. This produces no visible overlay. 

I have just retried with fill thresh set to 0 but no change to whether any data 
is visible on the inflated surface. 

V2_colour_lh.mgz is the functional overlay that I want to extract any data 
active within V2 from, this was produced by my usage of mri_vol2surf

mri_vol2surf --src {zstat1} --srcreg {anat2exf.register.dat} --hemi 
{hemi}--projfrac {0.8} --out {V2_colour_lh} --out_type {mgz}


essentially what I wanted was to take mask a functional volume of colour 
activation across the occipital cortex with a V2 mask to only see activation 
within V2 on the inflated surface. 
I have a V2.label file and a V2_colour_lh.mgz file overlaid onto an inflated 
surface using mri_vol2surf.

thanks
S 




From: Sarah Finnegan
Sent: 03 March 2015 14:41
To: Freesurfer support list
Subject: RE: [Freesurfer] equivalent for fslmaths -mas option in freesurfer

Hi Doug,

Thanks I had hoped to use mri_mask but was foiled in my attempt to convert the 
.label files to .mgz using mri_label2bvol. I assumed I must be on the wrong 
track.

my command was

mri_label2vol --label V2_lh.label --temp f.nii.gz --reg register.dat 
--fillthresh .3 --proj frac 0 1 .1 --subject V2_subject5 --hemi lh --o V2_lh.mgz

I have previously used this command successfully to convert labels for usage in 
FSL. The volume will display using tkmedit on the orig surface, but in tksurfer 
using the inflated surface there is nothing visible when attempting to open as 
an overlay.

I have played around with different options and attempted to move forward to 
mri_mask using the V2_lh.mgz file (hoping to later open the data in tksurfer) 
but the command

mri_mask -transfer 255 -keep_mask_deletion_edits masked_data V2_lh.mgz 
lh_colour.mgz V2_colour_lh.mgz

gives

transfer mask voxels=255 to dst vol
Transferring mask edits ('1' voxels) to dst vol
ERROR: dimension mismatch between source and mask

I assume I must be missing something fundamental in the mri_label2vol command?

Thank you for your help
Sarah


From: freesurfer-boun...@nmr.mgh.harvard.edu 
[freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Sarah Finnegan 
[sarah.finne...@stcatz.ox.ac.uk]
Sent: 26 February 2015 15:12
To: Freesurfer support list
Subject: Re: [Freesurfer] equivalent for fslmaths -mas option in freesurfer

Hi Bruce

Thanks for your reply,
I did use mri_vol2surf for the sampling

mri_vol2surf --src {zstat1} --srcreg {anat2exf.register.dat} --hemi 
{hemi}--projfrac {0.8} --out {out file name} --out_type {mgz}

I don't believe that I want to average within the ROI. I want to take any 
clusters of activity within V2 and feed this into a script i'm developing in 
MATLAB to work out the distance between different voxel clusters and the size 
of each cluster, but only for within my region defined as V2. Hopefully that 
makes sense, If I average I think I will lose this spatial information?

Thanks
Sarah

From: freesurfer-boun...@nmr.mgh.harvard.edu 
[freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Bruce Fischl 
[fis...@nmr.mgh.harvard.edu]
Sent: 26 February 2015 15:04
To: Freesurfer support list
Subject: Re: [Freesurfer] equivalent for fslmaths -mas option in freesurfer

Hi Sarah

have you used mri_vol2surf to sample the data onto the surface? When you
say extract specific regions of functional data from a flat  do you
want to average within the ROI?

cheers
Bruce
On Thu, 26 Feb 2015, Sarah Finnegan wrote:

 I have a question about the equivalent of fslmaths -mas option in
 freesurfer.
 I have several manually defined labels in .label form that I want to use to
 extract specific regions of functional data from a flat patch. Ordinarily in
 fsl I would just use

 fslmaths -invol {functional_data} -mas {bin_label} -outvol
 {masked_functional_data}

 but I'm a little confused about an equivalent for this in free surfer as I
 don't want to perform any further stats on these ROI yet, extract them from
 any surrounding data and overlay onto the flattened surface.

 I have tried using
 mri_vol2roi --label {V2_rh.label} --srcvol {functional_data.mgz} --srcreg
 {anat2exf.register.dat} --roiavg {func_V2_mask} --finalmskvol
 {func_V2_mask_out}
 but when overlaying the output file there are no data points visible.

 Any help would be great as several other functions that I have tried seem to
 be obsolete,

 Thanks!
 Sarah


___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu

Re: [Freesurfer] Monte Carlo simulation - Longitudinal Pipeline

2015-03-03 Thread Douglas N Greve

I don't know, esp since it is an approximation to begin with. An 
alternative is to take the offsets from your multi-time-point subjects 
and the single maps from your subjects with one time point and run that 
through the one-sample-group-mean (--osgm in mri_glmfit). If you go this 
route, then you should subtract the mean age of the one time-point 
subjects from the age of the multi-time point subjects before the 1st 
stage of analysis.

doug


On 03/02/2015 07:25 PM, Janosch Linkersdörfer wrote:
 Hi Doug,

 thank you very much for your answer!

 Am 02.03.2015 um 11:30 schrieb Douglas N Greve gr...@nmr.mgh.harvard.edu:

 You would do the long analysis using a random effects analysis.
 OK, so basically do 2-stage modeling 
 (https://surfer.nmr.mgh.harvard.edu/fswiki/LongitudinalTwoStageModel), right?

 For each subject you can get a slope (this won't work if the subject only 
 has 1 time point), then concatenate the slopes into a file and run 
 mri_glmfit, then follow the procedures from the archive email you reference.
 One quarter of my subjects only has one measurement time point. Can I still 
 use this method (which would only consider the 3/4 of the subjects) to 
 correct clusters found in the whole group? Or would it only be valid for 
 correcting clusters from an LME model for the reduced group?

 Thanks,

 Janosch

 doug

 On 02/24/2015 08:35 PM, Janosch Linkersdörfer wrote:
 Hi Doug and others,

 I would like apply (Monte Carlo simulation) cluster correction (as opposed 
 to the implemented vertex-wise FDR correction) on the results from a 
 longitudinal study I analyzed using the LME toolbox. The design is 
 unbalanced (different number of time points, from 1 to 4, per subject).

 In this thread 
 (http://www.mail-archive.com/freesurfer%40nmr.mgh.harvard.edu/msg35367.html)
  you, Doug, suggested, if I understand correctly:

 - concatenating the images using `mris_preproc --paired-diff`
 - smooth with the same kernel size as used in the lme analysis
 - running `mri_glmfit` on them with an fsgd file that uses the same 
 covariates and the same contrast (excluding the interaction term with time) 
 as used in the lme analysis
 - overwriting sig.mgh with the one from the lme analysis
 - running `mri_glmfit-sim --cache`

 How would I extend this to my case where I don't have pairwise images, but 
 1 image for some participants, for others up to 4?

 Thanks a lot,

 Janosch




 -- 
 Douglas N. Greve, Ph.D.
 MGH-NMR Center
 gr...@nmr.mgh.harvard.edu
 Phone Number: 617-724-2358
 Fax: 617-726-7422

 Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
 FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
 www.nmr.mgh.harvard.edu/facility/filedrop/index.html
 Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/



 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.




-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
gr...@nmr.mgh.harvard.edu
Phone Number: 617-724-2358
Fax: 617-726-7422

Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
www.nmr.mgh.harvard.edu/facility/filedrop/index.html
Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


[Freesurfer] Mapping Own DK Regional Stats onto Surface

2015-03-03 Thread Jin, Tony
Hi all,

I’d like to map my own stats (one value per Desikan-Killiany region) onto a 
subject's surface file, to create a figure similar to the following:
http://openi.nlm.nih.gov/detailedresult.php?img=3280212_pone.0031913.g001req=4

To do this, I tried to create a scalar overlay file using mris_convert’s 
--parcstats option, per the following mris_convert example:

“”
Create a scalar overlay file where each parcellation region
contains a single value:
  mris_convert \
--annot lh.aparc.annot \
--parcstats lh.parcstats.txt \
lh.white \
lh.parcstats

(...)

--parcstats infile is the name of text file containing label/val pairs, where 
label is an annot name and val is a value associated with that label.
“”

However, looking at the output file, stats didn’t seem to map to any vertices; 
instead, I observed zeroes across all in both Freeview and after conversion to 
ASCII (see first few lines below). I tried a few other ways to delimit the 
“label/val” pairs of the --parcstats file, including using tab, space, and 
forward-slash, but each way seemed to produce the same results:

000 -10.67346 -71.19921 6.09064 0.0
001 -11.29567 -71.20504 6.32133 0.0
002 -12.26970 -71.62605 6.00416 0.0
003 -13.11823 -71.40913 6.45834 0.0
004 -14.22002 -71.39742 6.28750 0.0

So, I wonder: is using mris_convert with the --parcstats flag a correct way to 
create such a map? If so, what could have gone wrong? If not, what’s the 
easiest way to map my own regional stats onto a surface?

Your expertise is greatly appreciated;

Thanks and all the best,

Tony Jin
Data Technician
Dept. of Psychiatry
Stony Brook Medicine


This e-mail message, including any attachments, is for the sole use of the 
intended recipient(s) and may contain confidential and privileged information. 
Any unauthorized review, use, disclosure or distribution is prohibited. If you 
are not the intended recipient, please contact the sender by e-mail and destroy 
all copies of the original.
___
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.


Re: [Freesurfer] equivalent for fslmaths -mas option in freesurfer

2015-03-03 Thread Douglas N Greve

On 03/03/2015 10:43 AM, Sarah Finnegan wrote:
 The command I used to visualise the label converted to volume form (using 
 mri_label2vol) in tkmedit was

 tkmedit V2_subject5_1 orig.mgz   -overlay V2_lh.mgz  -overlay-reg 
 register.dat -fthresh .5 -fmid 1

 my tksurfer command was
 tksurfer V2_subject5_1 lh inflated

 where I then attempted to overlay V2_lh.mgz as an overlay using the 
 register.dat file to register. This produces no visible overlay.
This does not surprise me too much. The mask will be very thin and 
you'll  have to make sure to sample it properly. So, try running 
mri_vol2surf with V2_lh.mgz as the input and a projection fraction of 
0.5. Then load the result as an overlay in tksurfer, eg,

tksurfer V2_subject5_1 lh inflated -overlay yournewfile.mgz -fminmax 0.5 1



 I have just retried with fill thresh set to 0 but no change to whether any 
 data is visible on the inflated surface.

 V2_colour_lh.mgz is the functional overlay that I want to extract any data 
 active within V2 from, this was produced by my usage of mri_vol2surf

 mri_vol2surf --src {zstat1} --srcreg {anat2exf.register.dat} --hemi 
 {hemi}--projfrac {0.8} --out {V2_colour_lh} --out_type {mgz}


 essentially what I wanted was to take mask a functional volume of colour 
 activation across the occipital cortex with a V2 mask to only see activation 
 within V2 on the inflated surface.
 I have a V2.label file and a V2_colour_lh.mgz file overlaid onto an inflated 
 surface using mri_vol2surf.
You'll need to decide what space you want to do the masking in. The way 
you have it now, you have the mask in volume space and the thing to be 
masked in surface space (thus the dimension error).
doug

 thanks
 S



 
 From: Sarah Finnegan
 Sent: 03 March 2015 14:41
 To: Freesurfer support list
 Subject: RE: [Freesurfer] equivalent for fslmaths -mas option in freesurfer

 Hi Doug,

 Thanks I had hoped to use mri_mask but was foiled in my attempt to convert 
 the .label files to .mgz using mri_label2bvol. I assumed I must be on the 
 wrong track.

 my command was

 mri_label2vol --label V2_lh.label --temp f.nii.gz --reg register.dat 
 --fillthresh .3 --proj frac 0 1 .1 --subject V2_subject5 --hemi lh --o 
 V2_lh.mgz

 I have previously used this command successfully to convert labels for usage 
 in FSL. The volume will display using tkmedit on the orig surface, but in 
 tksurfer using the inflated surface there is nothing visible when attempting 
 to open as an overlay.

 I have played around with different options and attempted to move forward to 
 mri_mask using the V2_lh.mgz file (hoping to later open the data in tksurfer) 
 but the command

 mri_mask -transfer 255 -keep_mask_deletion_edits masked_data V2_lh.mgz 
 lh_colour.mgz V2_colour_lh.mgz

 gives

 transfer mask voxels=255 to dst vol
 Transferring mask edits ('1' voxels) to dst vol
 ERROR: dimension mismatch between source and mask

 I assume I must be missing something fundamental in the mri_label2vol command?

 Thank you for your help
 Sarah

 
 From: freesurfer-boun...@nmr.mgh.harvard.edu 
 [freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Sarah Finnegan 
 [sarah.finne...@stcatz.ox.ac.uk]
 Sent: 26 February 2015 15:12
 To: Freesurfer support list
 Subject: Re: [Freesurfer] equivalent for fslmaths -mas option in freesurfer

 Hi Bruce

 Thanks for your reply,
 I did use mri_vol2surf for the sampling

 mri_vol2surf --src {zstat1} --srcreg {anat2exf.register.dat} --hemi 
 {hemi}--projfrac {0.8} --out {out file name} --out_type {mgz}

 I don't believe that I want to average within the ROI. I want to take any 
 clusters of activity within V2 and feed this into a script i'm developing in 
 MATLAB to work out the distance between different voxel clusters and the size 
 of each cluster, but only for within my region defined as V2. Hopefully that 
 makes sense, If I average I think I will lose this spatial information?

 Thanks
 Sarah
 
 From: freesurfer-boun...@nmr.mgh.harvard.edu 
 [freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Bruce Fischl 
 [fis...@nmr.mgh.harvard.edu]
 Sent: 26 February 2015 15:04
 To: Freesurfer support list
 Subject: Re: [Freesurfer] equivalent for fslmaths -mas option in freesurfer

 Hi Sarah

 have you used mri_vol2surf to sample the data onto the surface? When you
 say extract specific regions of functional data from a flat  do you
 want to average within the ROI?

 cheers
 Bruce
 On Thu, 26 Feb 2015, Sarah Finnegan wrote:

 I have a question about the equivalent of fslmaths -mas option in
 freesurfer.
 I have several manually defined labels in .label form that I want to use to
 extract specific regions of functional data from a flat patch. Ordinarily in
 fsl I would just use

 fslmaths -invol {functional_data} -mas {bin_label} -outvol
 {masked_functional_data}

 but I'm a little confused about an equivalent for this in free 

Re: [Freesurfer] Bad design matrix

2015-03-03 Thread Douglas N Greve

I think just using DOSS instead of DODS will do it (--fsgd your.fsgd doss)


On 03/03/2015 12:42 AM, Anders Hougaard wrote:
 Thanks Doug.
 Any suggestions for a more appropriate design?
 I guess this is a common situation where two or more parameters only
 apply to one group (in this case patients) and are zero or constant in
 the other.

 Best,
 Anders

 2015-03-02 21:21 GMT+01:00 Douglas N Greve gr...@nmr.mgh.harvard.edu:
 It looks like the 4th column is always -0.9 and the 6th col is always
 -9.138 which makes them redundant with column 2 and causes the error.
 doug

 On 03/02/2015 03:16 PM, Anders Hougaard wrote:
 Dear Doug,

 Thanks for the answer. I deliberately chose not to demean.
 With demeaning I get the same error (see below). Any suggestions?

 Best,
 Anders

 Design matrix --
1.000   0.000  -0.600   0.000   17.137   0.000;
1.000   0.000  -0.800   0.000   11.962   0.000;
1.000   0.000   7.100   0.000   11.190   0.000;
1.000   0.000   0.700   0.000   30.736   0.000;
1.000   0.000   3.100   0.000   23.735   0.000;
1.000   0.000   0.100   0.000   21.121   0.000;
1.000   0.000   1.100   0.000   12.395   0.000;
1.000   0.000   2.100   0.000   24.912   0.000;
1.000   0.000   0.100   0.000  -8.021   0.000;
1.000   0.000  -0.700   0.000   8.877   0.000;
1.000   0.000   0.100   0.000   0.893   0.000;
1.000   0.000   7.100   0.000   29.849   0.000;
1.000   0.000  -0.400   0.000  -1.825   0.000;
1.000   0.000   2.100   0.000   14.361   0.000;
1.000   0.000   2.100   0.000   7.267   0.000;
1.000   0.000   0.100   0.000   34.169   0.000;
1.000   0.000   0.100   0.000   30.500   0.000;
1.000   0.000   1.100   0.000   9.219   0.000;
1.000   0.000   0.100   0.000   26.270   0.000;
1.000   0.000   1.100   0.000   2.320   0.000;
1.000   0.000   0.100   0.000   22.325   0.000;
1.000   0.000   0.100   0.000   13.323   0.000;
1.000   0.000   1.100   0.000  -2.628   0.000;
1.000   0.000   7.100   0.000   12.379   0.000;
1.000   0.000   1.100   0.000  -2.581   0.000;
1.000   0.000   0.100   0.000  -4.492   0.000;
1.000   0.000   1.100   0.000   11.549   0.000;
1.000   0.000   0.100   0.000  -8.413   0.000;
1.000   0.000   1.100   0.000   9.663   0.000;
1.000   0.000   1.100   0.000   8.655   0.000;
1.000   0.000   1.100   0.000   25.778   0.000;
1.000   0.000   3.100   0.000   2.739   0.000;
1.000   0.000   0.100   0.000   21.745   0.000;
1.000   0.000  -0.400   0.000  -5.762   0.000;
1.000   0.000   0.100   0.000   14.969   0.000;
1.000   0.000   0.100   0.000   3.535   0.000;
1.000   0.000   0.100   0.000  -0.287   0.000;
1.000   0.000   1.100   0.000  -2.283   0.000;
1.000   0.000   0.100   0.000  -0.257   0.000;
1.000   0.000   0.100   0.000  -1.207   0.000;
1.000   0.000   0.100   0.000   1.140   0.000;
1.000   0.000   0.600   0.000  -4.829   0.000;
1.000   0.000   1.100   0.000   2.213   0.000;
1.000   0.000   0.100   0.000   2.503   0.000;
1.000   0.000   0.600   0.000   3.193   0.000;
1.000   0.000   0.100   0.000   10.361   0.000;
1.000   0.000   0.100   0.000   3.546   0.000;
1.000   0.000   6.600   0.000   12.532   0.000;
1.000   0.000   0.100   0.000  -1.286   0.000;
1.000   0.000   0.100   0.000  -5.428   0.000;
1.000   0.000  -0.400   0.000  -1.661   0.000;
1.000   0.000  -0.800   0.000   21.444   0.000;
1.000   0.000   0.100   0.000   21.517   0.000;
1.000   0.000  -0.600   0.000   8.515   0.000;
1.000   0.000   0.100   0.000   19.530   0.000;
1.000   0.000   1.100   0.000   1.824   0.000;
1.000   0.000   0.100   0.000   15.795   0.000;
1.000   0.000   0.600   0.000  -6.140   0.000;
1.000   0.000   2.600   0.000   0.803   0.000;
1.000   0.000   0.100   0.000   16.904   0.000;
0.000   1.000   0.000  -0.900   0.000  -9.138;
0.000   1.000   0.000  -0.900   0.000  -9.138;
0.000   1.000   0.000  -0.900   0.000  -9.138;
0.000   1.000   0.000  -0.900   0.000  -9.138;
0.000   1.000   0.000  -0.900   0.000  -9.138;
0.000   1.000   0.000  -0.900   0.000  -9.138;
0.000   1.000   0.000  -0.900   0.000  -9.138;
0.000   1.000   0.000  -0.900   0.000  -9.138;
0.000   1.000   0.000  -0.900   0.000  -9.138;
0.000   1.000   0.000  -0.900   0.000  -9.138;
0.000   1.000   0.000  -0.900   0.000  -9.138;
0.000   1.000   0.000  -0.900   0.000  -9.138;
0.000   1.000   0.000  -0.900   0.000  -9.138;
0.000   1.000   0.000  -0.900   0.000  -9.138;
0.000   1.000   0.000  -0.900   0.000  -9.138;
0.000   1.000   0.000  -0.900   0.000  -9.138;
0.000   1.000   0.000  -0.900   0.000  -9.138;
0.000   1.000   0.000  -0.900   0.000  -9.138;
0.000   1.000   0.000  -0.900   0.000  -9.138;
0.000   1.000   0.000  -0.900   0.000  -9.138;
0.000   1.000   0.000  -0.900   0.000  -9.138;
0.000   1.000   

Re: [Freesurfer] Mapping Own DK Regional Stats onto Surface

2015-03-03 Thread Douglas N Greve

That is the right way (or one of them). Did you look at the result in 
tksurfer?

On 03/03/2015 11:34 AM, Jin, Tony wrote:
 Hi all,

 I’d like to map my own stats (one value per Desikan-Killiany region) 
 onto a subject's surface file, to create a figure similar to the 
 following:
 http://openi.nlm.nih.gov/detailedresult.php?img=3280212_pone.0031913.g001req=4

 To do this, I tried to create a scalar overlay file using 
 mris_convert’s --parcstats option, per the following mris_convert example:

 “”
 Create a scalar overlay file where each parcellation region
 contains a single value:
   mris_convert \
 --annot lh.aparc.annot \
 --parcstats lh.parcstats.txt \
 lh.white \
 lh.parcstats

 (...)

 --parcstats infile is the name of text file containing label/val 
 pairs, where label is an annot name and val is a value associated with 
 that label.
 “”

 However, looking at the output file, stats didn’t seem to map to any 
 vertices; instead, I observed zeroes across all in both Freeview and 
 after conversion to ASCII (see first few lines below). I tried a few 
 other ways to delimit the “label/val” pairs of the --parcstats file, 
 including using tab, space, and forward-slash, but each way seemed to 
 produce the same results:

 000 -10.67346 -71.19921 6.09064 0.0
 001 -11.29567 -71.20504 6.32133 0.0
 002 -12.26970 -71.62605 6.00416 0.0
 003 -13.11823 -71.40913 6.45834 0.0
 004 -14.22002 -71.39742 6.28750 0.0

 So, I wonder: is using mris_convert with the --parcstats flag a 
 correct way to create such a map? If so, what could have gone wrong? 
 If not, what’s the easiest way to map my own regional stats onto a 
 surface?

 Your expertise is greatly appreciated;

 Thanks and all the best,

 Tony Jin
 Data Technician
 Dept. of Psychiatry
 Stony Brook Medicine


 This e-mail message, including any attachments, is for the sole use of 
 the intended recipient(s) and may contain confidential and privileged 
 information. Any unauthorized review, use, disclosure or distribution 
 is prohibited. If you are not the intended recipient, please contact 
 the sender by e-mail and destroy all copies of the original.


 ___
 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
gr...@nmr.mgh.harvard.edu
Phone Number: 617-724-2358
Fax: 617-726-7422

Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
www.nmr.mgh.harvard.edu/facility/filedrop/index.html
Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/

___
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.



Re: [Freesurfer] equivalent for fslmaths -mas option in freesurfer

2015-03-03 Thread Sarah Finnegan
Hi Doug,

Thanks! the combination of sampling incorrectly and confusion of spaces was the 
root of the problem. 

Everything is now looking as it should.



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: 03 March 2015 16:00
To: freesurfer@nmr.mgh.harvard.edu
Subject: Re: [Freesurfer] equivalent for fslmaths -mas option in freesurfer

On 03/03/2015 10:43 AM, Sarah Finnegan wrote:
 The command I used to visualise the label converted to volume form (using 
 mri_label2vol) in tkmedit was

 tkmedit V2_subject5_1 orig.mgz   -overlay V2_lh.mgz  -overlay-reg 
 register.dat -fthresh .5 -fmid 1

 my tksurfer command was
 tksurfer V2_subject5_1 lh inflated

 where I then attempted to overlay V2_lh.mgz as an overlay using the 
 register.dat file to register. This produces no visible overlay.
This does not surprise me too much. The mask will be very thin and
you'll  have to make sure to sample it properly. So, try running
mri_vol2surf with V2_lh.mgz as the input and a projection fraction of
0.5. Then load the result as an overlay in tksurfer, eg,

tksurfer V2_subject5_1 lh inflated -overlay yournewfile.mgz -fminmax 0.5 1



 I have just retried with fill thresh set to 0 but no change to whether any 
 data is visible on the inflated surface.

 V2_colour_lh.mgz is the functional overlay that I want to extract any data 
 active within V2 from, this was produced by my usage of mri_vol2surf

 mri_vol2surf --src {zstat1} --srcreg {anat2exf.register.dat} --hemi 
 {hemi}--projfrac {0.8} --out {V2_colour_lh} --out_type {mgz}


 essentially what I wanted was to take mask a functional volume of colour 
 activation across the occipital cortex with a V2 mask to only see activation 
 within V2 on the inflated surface.
 I have a V2.label file and a V2_colour_lh.mgz file overlaid onto an inflated 
 surface using mri_vol2surf.
You'll need to decide what space you want to do the masking in. The way
you have it now, you have the mask in volume space and the thing to be
masked in surface space (thus the dimension error).
doug

 thanks
 S



 
 From: Sarah Finnegan
 Sent: 03 March 2015 14:41
 To: Freesurfer support list
 Subject: RE: [Freesurfer] equivalent for fslmaths -mas option in freesurfer

 Hi Doug,

 Thanks I had hoped to use mri_mask but was foiled in my attempt to convert 
 the .label files to .mgz using mri_label2bvol. I assumed I must be on the 
 wrong track.

 my command was

 mri_label2vol --label V2_lh.label --temp f.nii.gz --reg register.dat 
 --fillthresh .3 --proj frac 0 1 .1 --subject V2_subject5 --hemi lh --o 
 V2_lh.mgz

 I have previously used this command successfully to convert labels for usage 
 in FSL. The volume will display using tkmedit on the orig surface, but in 
 tksurfer using the inflated surface there is nothing visible when attempting 
 to open as an overlay.

 I have played around with different options and attempted to move forward to 
 mri_mask using the V2_lh.mgz file (hoping to later open the data in tksurfer) 
 but the command

 mri_mask -transfer 255 -keep_mask_deletion_edits masked_data V2_lh.mgz 
 lh_colour.mgz V2_colour_lh.mgz

 gives

 transfer mask voxels=255 to dst vol
 Transferring mask edits ('1' voxels) to dst vol
 ERROR: dimension mismatch between source and mask

 I assume I must be missing something fundamental in the mri_label2vol command?

 Thank you for your help
 Sarah

 
 From: freesurfer-boun...@nmr.mgh.harvard.edu 
 [freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Sarah Finnegan 
 [sarah.finne...@stcatz.ox.ac.uk]
 Sent: 26 February 2015 15:12
 To: Freesurfer support list
 Subject: Re: [Freesurfer] equivalent for fslmaths -mas option in freesurfer

 Hi Bruce

 Thanks for your reply,
 I did use mri_vol2surf for the sampling

 mri_vol2surf --src {zstat1} --srcreg {anat2exf.register.dat} --hemi 
 {hemi}--projfrac {0.8} --out {out file name} --out_type {mgz}

 I don't believe that I want to average within the ROI. I want to take any 
 clusters of activity within V2 and feed this into a script i'm developing in 
 MATLAB to work out the distance between different voxel clusters and the size 
 of each cluster, but only for within my region defined as V2. Hopefully that 
 makes sense, If I average I think I will lose this spatial information?

 Thanks
 Sarah
 
 From: freesurfer-boun...@nmr.mgh.harvard.edu 
 [freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Bruce Fischl 
 [fis...@nmr.mgh.harvard.edu]
 Sent: 26 February 2015 15:04
 To: Freesurfer support list
 Subject: Re: [Freesurfer] equivalent for fslmaths -mas option in freesurfer

 Hi Sarah

 have you used mri_vol2surf to sample the data onto the surface? When you
 say extract specific regions of functional data from a flat  do you
 want to average within the ROI?

 

Re: [Freesurfer] lGI ?h.pial-outer-smoothed

2015-03-03 Thread Marie Schaer

Hi Giedre,

Small intersections like that are fine and won't affect the lGI computation, so 
you are good with that. Values around 20 are however more preoccupying! Can you 
send me a screenshot of the lGI overlaid on the surface for this subject using 
tksurfer or freeview?

Best,

Marie

NB: if you are interested in thickness as well, you might want to correct the 
segmentation in the parahippocampal gyrus for this subject (the drop-shaped 
WM inclusion in the cortex).

On Mar 3, 2015, at 6:58 AM, Stripeikyte, G. 
g.stripeik...@umcutrecht.nlmailto:g.stripeik...@umcutrecht.nl wrote:

Dear freesurfers,

I am analysing localGI and noticed that sometimes scans with 
?h.pial-outer-smoothed surface intersect ?h.pial surface (attached pic.). Is 
this normal or  should I correct parameters and rerun localGI? Also when I 
extracted ROI lGI values I got some extremely high results. For example in 
lh_insula and rh_insula, for some participants lGI reach about 20. Scans look 
normal of these participants. Are such high values possible or something wrong 
with calculation?

Sincerely,
Giedre


De informatie opgenomen in dit bericht kan vertrouwelijk zijn en is uitsluitend 
bestemd voor de geadresseerde. Indien u dit bericht onterecht ontvangt, wordt u 
verzocht de inhoud niet te gebruiken en de afzender direct te informeren door 
het bericht te retourneren. Het Universitair Medisch Centrum Utrecht is een 
publiekrechtelijke rechtspersoon in de zin van de W.H.W. (Wet Hoger Onderwijs 
en Wetenschappelijk Onderzoek) en staat geregistreerd bij de Kamer van 
Koophandel voor Midden-Nederland onder nr. 30244197.

Denk s.v.p aan het milieu voor u deze e-mail afdrukt.



This message may contain confidential information and is intended exclusively 
for the addressee. If you receive this message unintentionally, please do not 
use the contents but notify the sender immediately by return e-mail. University 
Medical Center Utrecht is a legal person by public law and is registered at the 
Chamber of Commerce for Midden-Nederland under no. 30244197.

Please consider the environment before printing this e-mail.

pial-outer-smoothed.png___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edumailto: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


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] from vol timecourse to surf timecourse

2015-03-03 Thread Jan Willem Koten



Dear Surfer experts,

(Most likely Dough)





It is common practice to perform the slice time correction first and than the motion correction. However free surfer seems to work in the opposite way.

I have tried to write a mini matlab freesurfer script for the common way.



system([stc-sess -s  funcdir(i).name  -i f -o fstc -so siemens]) 

system([mc-sess -s  funcdir(i).name  -fstem fstc -fmcstem fstcmc -per-run])



This seems to work.



My problem is how do I get the resulting fstcmc.ni.gz on to the fsaverage surface using spherical alignment?





Jan






___
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] Tracula: cannot open file `1000' for reading Bedpost file error

2015-03-03 Thread Katherine Damme
Hello Freesurfers,

I recently updated my Freesurfer version and now I am getting an error in
tracula.

awk: cmd. line:1: fatal: cannot open file `1000' for reading (No such file
or directory)

Any help would be appreciated.


trac-all.error
Description: Binary data
Mon Mar  2 18:24:56 CST 2015
/home/k/ksd770/Desktop/Subj/090
/usr/local/freesurfer/bin/trac-all
-prep -c 090.dmrirc
Subject 090
SUBJECTS_DIR /home/k/ksd770/Desktop/Subj
FREESURFER_HOME /usr/local/freesurfer
Actual FREESURFER_HOME /usr/local/freesurfer
build-stamp.txt: freesurfer-Linux-centos4_x86_64-stable-pub-v5.3.0
root
kate.ad.wcas.northwestern.edu
Linux kate.ad.wcas.northwestern.edu 2.6.32-504.8.1.el6.x86_64 #1 SMP Fri Dec 19 12:09:25 EST 2014 x86_64 x86_64 x86_64 GNU/Linux
cputime  unlimited
filesize unlimited
datasize unlimited
stacksize10240 kbytes
coredumpsize 0 kbytes
memoryuseunlimited
vmemoryuse   unlimited
descriptors  1024 
memorylocked 64 kbytes
maxproc  126968 

 total   used   free sharedbuffers cached
Mem:  16275144   103039725971172  12916  896047644376
-/+ buffers/cache:2569992   13705152
Swap:  8208380  748248133556


Program versions:
$Id: trac-all,v 1.22.2.12 2013/02/23 02:01:02 ayendiki Exp $
mri_convert --all-info 
ProgramName: mri_convert  ProgramArguments: --all-info  ProgramVersion: $Name: stable5 $  TimeStamp: 2015/03/03-00:24:56-GMT  BuildTimeStamp: May 13 2013 18:45:07  CVS: $Id: mri_convert.c,v 1.179.2.7 2012/09/05 21:55:16 mreuter Exp $  User: root  Machine: kate.ad.wcas.northwestern.edu  Platform: Linux  PlatformVersion: 2.6.32-504.8.1.el6.x86_64  CompilerName: GCC  CompilerVersion: 30400 
FLIRT version 6.0
$Id: bbregister,v 1.49.2.3 2013/03/25 18:04:53 greve Exp $
$Id: mri_cvs_register,v 1.15.2.12 2013/02/09 00:37:37 nicks Exp $
ProgramName: dmri_train  ProgramArguments: --all-info  ProgramVersion: $Name: stable5 $  TimeStamp: 2015/03/03-00:24:56-GMT  BuildTimeStamp: May 13 2013 18:45:07  CVS:   User: root  Machine: kate.ad.wcas.northwestern.edu  Platform: Linux  PlatformVersion: 2.6.32-504.8.1.el6.x86_64  CompilerName: GCC  CompilerVersion: 30400 
ProgramName: dmri_paths  ProgramArguments: --all-info  ProgramVersion: $Name: stable5 $  TimeStamp: 2015/03/03-00:24:56-GMT  BuildTimeStamp: May 13 2013 18:45:07  CVS:   User: root  Machine: kate.ad.wcas.northwestern.edu  Platform: Linux  PlatformVersion: 2.6.32-504.8.1.el6.x86_64  CompilerName: GCC  CompilerVersion: 30400 
ProgramName: dmri_pathstats  ProgramArguments: --all-info  ProgramVersion: $Name: stable5 $  TimeStamp: 2015/03/03-00:24:56-GMT  BuildTimeStamp: May 13 2013 18:45:07  CVS:   User: root  Machine: kate.ad.wcas.northwestern.edu  Platform: Linux  PlatformVersion: 2.6.32-504.8.1.el6.x86_64  CompilerName: GCC  CompilerVersion: 30400 
ProgramName: dmri_mergepaths  ProgramArguments: --all-info  ProgramVersion: $Name: stable5 $  TimeStamp: 2015/03/03-00:24:56-GMT  BuildTimeStamp: May 13 2013 18:45:07  CVS:   User: root  Machine: kate.ad.wcas.northwestern.edu  Platform: Linux  PlatformVersion: 2.6.32-504.8.1.el6.x86_64  CompilerName: GCC  CompilerVersion: 30400 
INFO: current FREESURFER_HOME does not match that of previous processing.
Current: /usr/local/freesurfer
Previous: /projects/p20394/software/freesurfer-v5.3.0


New invocation of trac-preproc


root
kate.ad.wcas.northwestern.edu
Linux kate.ad.wcas.northwestern.edu 2.6.32-504.8.1.el6.x86_64 #1 SMP Fri Dec 19 12:09:25 EST 2014 x86_64 x86_64 x86_64 GNU/Linux
cputime  unlimited
filesize unlimited
datasize unlimited
stacksize10240 kbytes
coredumpsize 0 kbytes
memoryuseunlimited
vmemoryuse   unlimited
descriptors  1024 
memorylocked 64 kbytes
maxproc  126968 

 total   used   free sharedbuffers cached
Mem:  16275144   103163885958756  12916  896047644376
-/+ buffers/cache:2582408   13692736
Swap:  8208380  748248133556

#-
/usr/local/freesurfer/bin/trac-preproc 
#-
#@# Image corrections Mon Mar  2 18:24:57 CST 2015
mri_convert /home/k/ksd770/Desktop/Subj/090/orig/90.MR.FMRI_STUDIES_NUSSLOCK.6.1.20140620.100913.pmv751.dcm /home/k/ksd770/Desktop/Subj/090/dmri/dwi_orig.nii.gz
mri_convert /home/k/ksd770/Desktop/Subj/090/orig/90.MR.FMRI_STUDIES_NUSSLOCK.6.1.20140620.100913.pmv751.dcm /home/k/ksd770/Desktop/Subj/090/dmri/dwi_orig.nii.gz 
$Id: mri_convert.c,v 1.179.2.7 2012/09/05 21:55:16 mreuter Exp $
reading from /home/k/ksd770/Desktop/Subj/090/orig/90.MR.FMRI_STUDIES_NUSSLOCK.6.1.20140620.100913.pmv751.dcm...
Getting Series No 
INFO: Found 67 files in /home/k/ksd770/Desktop/Subj/090/orig
INFO: Scanning for Series Number 6
Scanning Directory 
INFO: found 65 files in series
INFO: loading series header info.

RunNo = 5
WARNING: Run 1 appears to be truncated
  Files Found: 65, Files Expected (lRep+1): 1
FileName 		

[Freesurfer] Fwd: Recon-all Error

2015-03-03 Thread Hassan bakhshi
HI,

Im using freesurfer newly, i have a folder of a subject's MRI's named
139942

I tried to run recon-all of a File named I000 The point is to get
Superior temporal gyrus thickness.

but it show an error and stop working. i looked up archive of FAQ's but i
didnt anything usefull.

There is the recon-all log attached!

Please Help!


By the way I'm using Ubuntu 14.04 LTS!!
‫چهارشنبه ۰۴ مارس ۱۵، ساعت ۰۹:۴۷:۱۵ (IRST)‬
/usr/local/freesurfer/subjects/139942
/usr/local/freesurfer/bin/recon-all
-s 139942 -i /usr/local/139942/I000
subjid 139942
setenv SUBJECTS_DIR /usr/local/freesurfer/subjects
FREESURFER_HOME /usr/local/freesurfer
Actual FREESURFER_HOME /usr/local/freesurfer
build-stamp.txt: freesurfer-Linux-centos6_x86_64-stable-pub-v5.3.0
Linux circle-Ubuntu 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
cputime  unlimited
filesize unlimited
datasize unlimited
stacksize8192 kbytes
coredumpsize 0 kbytes
memoryuseunlimited
vmemoryuse   unlimited
descriptors  1024 
memorylocked 64 kbytes
maxproc  47440 
maxlocks unlimited
maxsignal47440 
maxmessage   819200 
maxnice  0 
maxrtprio0 
maxrttimeunlimited

 total   used   free sharedbuffers cached
Mem:   609403227211923372840  24664 1398361525816
-/+ buffers/cache:10555405038492
Swap:   102396  0 102396


program versions used
$Id: recon-all,v 1.379.2.73 2013/05/12 23:15:37 nicks Exp $
$Id: mri_motion_correct.fsl,v 1.14 2011/03/02 20:16:39 nicks Exp $
mri_convert -all-info 
ProgramName: mri_convert  ProgramArguments: -all-info  ProgramVersion: $Name: stable5 $  TimeStamp: 2015/03/04-06:17:15-GMT  BuildTimeStamp: May 13 2013 16:24:28  CVS: $Id: mri_convert.c,v 1.179.2.7 2012/09/05 21:55:16 mreuter Exp $  User: root  Machine: circle-Ubuntu  Platform: Linux  PlatformVersion: 3.13.0-32-generic  CompilerName: GCC  CompilerVersion: 40400 
FLIRT version 5.5
$Id: talairach_avi,v 1.9 2011/03/02 18:38:06 nicks Exp $
mri_convert --version 
stable5
ProgramName: tkregister2_cmdl  ProgramArguments: --all-info  ProgramVersion: $Name: stable5 $  TimeStamp: 2015/03/04-06:17:15-GMT  BuildTimeStamp: May 13 2013 16:24:28  CVS: $Id: tkregister2.c,v 1.121.2.1 2011/03/28 20:25:16 greve Exp $  User: root  Machine: circle-Ubuntu  Platform: Linux  PlatformVersion: 3.13.0-32-generic  CompilerName: GCC  CompilerVersion: 40400 
Program nu_correct, built from:
Package MNI N3, version 1.10, compiled by nicks@minerva (x86_64-unknown-linux-gnu) on 2010-02-20 at 17:32:37
ProgramName: mri_make_uchar  ProgramArguments: -all-info  ProgramVersion: $Name: stable5 $  TimeStamp: 2015/03/04-06:17:16-GMT  BuildTimeStamp: May 13 2013 16:24:28  CVS: $Id: mri_make_uchar.c,v 1.4 2011/03/02 00:04:14 nicks Exp $  User: root  Machine: circle-Ubuntu  Platform: Linux  PlatformVersion: 3.13.0-32-generic  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mri_normalize  ProgramArguments: -all-info  ProgramVersion: $Name: stable5 $  TimeStamp: 2015/03/04-06:17:16-GMT  BuildTimeStamp: May 13 2013 16:24:28  CVS: $Id: mri_normalize.c,v 1.73.2.1 2012/10/17 19:11:32 nicks Exp $  User: root  Machine: circle-Ubuntu  Platform: Linux  PlatformVersion: 3.13.0-32-generic  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mri_watershed  ProgramArguments: -all-info  ProgramVersion: $Name: stable5 $  TimeStamp: 2015/03/04-06:17:16-GMT  BuildTimeStamp: May 13 2013 16:24:28  CVS: $Id: mri_watershed.cpp,v 1.96.2.1 2011/11/08 22:18:44 nicks Exp $  User: root  Machine: circle-Ubuntu  Platform: Linux  PlatformVersion: 3.13.0-32-generic  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mri_gcut  ProgramArguments: -all-info  ProgramVersion: $Name: stable5 $  TimeStamp: 2015/03/04-06:17:16-GMT  BuildTimeStamp: May 13 2013 16:24:28  CVS: $Id: mri_gcut.cpp,v 1.14 2011/03/02 00:04:16 nicks Exp $  User: root  Machine: circle-Ubuntu  Platform: Linux  PlatformVersion: 3.13.0-32-generic  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mri_segment  ProgramArguments: -all-info  ProgramVersion: $Name: stable5 $  TimeStamp: 2015/03/04-06:17:16-GMT  BuildTimeStamp: May 13 2013 16:24:28  CVS: $Id: mri_segment.c,v 1.40 2011/03/02 00:04:24 nicks Exp $  User: root  Machine: circle-Ubuntu  Platform: Linux  PlatformVersion: 3.13.0-32-generic  CompilerName: GCC  CompilerVersion: 40400 
ProgramName: mri_label2label  ProgramArguments: -all-info  ProgramVersion: $Name: stable5 $  TimeStamp: 2015/03/04-06:17:16-GMT  BuildTimeStamp: May 13 2013 16:24:28  CVS: $Id: mri_label2label.c,v 1.40.2.2 2013/04/02 16:26:15 greve Exp $  User: root  Machine: circle-Ubuntu  Platform: Linux  PlatformVersion: 3.13.0-32-generic  CompilerName: GCC  CompilerVersion: 40400 


 === NUMBER OF OPENMP THREADS = 1 === 
ProgramName: mri_em_register  ProgramArguments: -all-info  ProgramVersion: $Name: stable5 $  TimeStamp: 

Re: [Freesurfer] Monte Carlo simulation - Longitudinal Pipeline

2015-03-03 Thread Janosch Linkersdörfer


Am 03.03.2015 um 14:42 schrieb Douglas N Greve gr...@nmr.mgh.harvard.edu:

 
 Some of this Martin will have to comment on, but my comments below
 
 On 03/03/2015 12:35 PM, Janosch Linkersdörfer wrote:
 Hey Doug,
 
 thanks again! That means, I would do something like:
 
 1.) construct longitudinal qdec table
 - only use fsid, fsid-base, and years/age columns
 - substract the average age of the one-time point subjects from years/age 
 value for every subject at every time point
 
 2.) run long_mris_slopes
 - use the --do-avg flag?
 Yes, I think so
 
 3.) concatenate the output files from 2) and the maps from the one-time 
 point subjects with mris_preproc
 - use --is flag to select maps by specifying full path
 What command are you talking about to do the concatenation?

mris_preproc, I thought.

Thanks for your help,

Janosch

 Otherwise sounds right. Make sure you use the average of the time points from 
 long_mris_slopes and not the slope.
 
 4.) run mri_glmfit
 - use --osgm flag for one-sample group mean
 Yes
 
 5.) replace sig.mgz file with the one from LME analysis and run 
 mri_glmfit-sim
 Yes
 
 Is that correct? (especially, is using --do-avg what you meant by taking the 
 offset)
 
 Thanks,
 
 Janosch
 
 
 Am 03.03.2015 um 08:32 schrieb Douglas N Greve gr...@nmr.mgh.harvard.edu:
 
 I don't know, esp since it is an approximation to begin with. An 
 alternative is to take the offsets from your multi-time-point subjects and 
 the single maps from your subjects with one time point and run that through 
 the one-sample-group-mean (--osgm in mri_glmfit). If you go this route, 
 then you should subtract the mean age of the one time-point subjects from 
 the age of the multi-time point subjects before the 1st stage of analysis.
 
 doug
 
 
 On 03/02/2015 07:25 PM, Janosch Linkersdörfer wrote:
 Hi Doug,
 
 thank you very much for your answer!
 
 Am 02.03.2015 um 11:30 schrieb Douglas N Greve gr...@nmr.mgh.harvard.edu:
 
 You would do the long analysis using a random effects analysis.
 OK, so basically do 2-stage modeling 
 (https://surfer.nmr.mgh.harvard.edu/fswiki/LongitudinalTwoStageModel), 
 right?
 
 For each subject you can get a slope (this won't work if the subject only 
 has 1 time point), then concatenate the slopes into a file and run 
 mri_glmfit, then follow the procedures from the archive email you 
 reference.
 One quarter of my subjects only has one measurement time point. Can I 
 still use this method (which would only consider the 3/4 of the subjects) 
 to correct clusters found in the whole group? Or would it only be valid 
 for correcting clusters from an LME model for the reduced group?
 
 Thanks,
 
 Janosch
 
 doug
 
 On 02/24/2015 08:35 PM, Janosch Linkersdörfer wrote:
 Hi Doug and others,
 
 I would like apply (Monte Carlo simulation) cluster correction (as 
 opposed to the implemented vertex-wise FDR correction) on the results 
 from a longitudinal study I analyzed using the LME toolbox. The design 
 is unbalanced (different number of time points, from 1 to 4, per 
 subject).
 
 In this thread 
 (http://www.mail-archive.com/freesurfer%40nmr.mgh.harvard.edu/msg35367.html)
  you, Doug, suggested, if I understand correctly:
 
 - concatenating the images using `mris_preproc --paired-diff`
 - smooth with the same kernel size as used in the lme analysis
 - running `mri_glmfit` on them with an fsgd file that uses the same 
 covariates and the same contrast (excluding the interaction term with 
 time) as used in the lme analysis
 - overwriting sig.mgh with the one from the lme analysis
 - running `mri_glmfit-sim --cache`
 
 How would I extend this to my case where I don't have pairwise images, 
 but 1 image for some participants, for others up to 4?
 
 Thanks a lot,
 
 Janosch
 
 
 
 
 -- 
 Douglas N. Greve, Ph.D.
 MGH-NMR Center
 gr...@nmr.mgh.harvard.edu
 Phone Number: 617-724-2358
 Fax: 617-726-7422
 
 Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
 FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
 www.nmr.mgh.harvard.edu/facility/filedrop/index.html
 Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/
 
 
 
 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.
 
 
 -- 
 Douglas N. Greve, Ph.D.
 MGH-NMR Center
 gr...@nmr.mgh.harvard.edu
 Phone Number: 617-724-2358
 Fax: 617-726-7422
 
 Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
 FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
 www.nmr.mgh.harvard.edu/facility/filedrop/index.html
 Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/
 
 
 
 
 -- 
 Douglas N. Greve, Ph.D.
 MGH-NMR Center
 

Re: [Freesurfer] Monte Carlo simulation - Longitudinal Pipeline

2015-03-03 Thread Douglas N Greve

Some of this Martin will have to comment on, but my comments below

On 03/03/2015 12:35 PM, Janosch Linkersdörfer wrote:
 Hey Doug,

 thanks again! That means, I would do something like:

 1.) construct longitudinal qdec table
 - only use fsid, fsid-base, and years/age columns
 - substract the average age of the one-time point subjects from years/age 
 value for every subject at every time point

 2.) run long_mris_slopes
 - use the --do-avg flag?
Yes, I think so

 3.) concatenate the output files from 2) and the maps from the one-time point 
 subjects with mris_preproc
 - use --is flag to select maps by specifying full path
What command are you talking about to do the concatenation? Otherwise 
sounds right. Make sure you use the average of the time points from 
long_mris_slopes and not the slope.

 4.) run mri_glmfit
 - use --osgm flag for one-sample group mean
Yes

 5.) replace sig.mgz file with the one from LME analysis and run mri_glmfit-sim
Yes

 Is that correct? (especially, is using --do-avg what you meant by taking the 
 offset)

 Thanks,

 Janosch


 Am 03.03.2015 um 08:32 schrieb Douglas N Greve gr...@nmr.mgh.harvard.edu:

 I don't know, esp since it is an approximation to begin with. An alternative 
 is to take the offsets from your multi-time-point subjects and the single 
 maps from your subjects with one time point and run that through the 
 one-sample-group-mean (--osgm in mri_glmfit). If you go this route, then you 
 should subtract the mean age of the one time-point subjects from the age of 
 the multi-time point subjects before the 1st stage of analysis.

 doug


 On 03/02/2015 07:25 PM, Janosch Linkersdörfer wrote:
 Hi Doug,

 thank you very much for your answer!

 Am 02.03.2015 um 11:30 schrieb Douglas N Greve gr...@nmr.mgh.harvard.edu:

 You would do the long analysis using a random effects analysis.
 OK, so basically do 2-stage modeling 
 (https://surfer.nmr.mgh.harvard.edu/fswiki/LongitudinalTwoStageModel), 
 right?

 For each subject you can get a slope (this won't work if the subject only 
 has 1 time point), then concatenate the slopes into a file and run 
 mri_glmfit, then follow the procedures from the archive email you 
 reference.
 One quarter of my subjects only has one measurement time point. Can I still 
 use this method (which would only consider the 3/4 of the subjects) to 
 correct clusters found in the whole group? Or would it only be valid for 
 correcting clusters from an LME model for the reduced group?

 Thanks,

 Janosch

 doug

 On 02/24/2015 08:35 PM, Janosch Linkersdörfer wrote:
 Hi Doug and others,

 I would like apply (Monte Carlo simulation) cluster correction (as 
 opposed to the implemented vertex-wise FDR correction) on the results 
 from a longitudinal study I analyzed using the LME toolbox. The design is 
 unbalanced (different number of time points, from 1 to 4, per subject).

 In this thread 
 (http://www.mail-archive.com/freesurfer%40nmr.mgh.harvard.edu/msg35367.html)
  you, Doug, suggested, if I understand correctly:

 - concatenating the images using `mris_preproc --paired-diff`
 - smooth with the same kernel size as used in the lme analysis
 - running `mri_glmfit` on them with an fsgd file that uses the same 
 covariates and the same contrast (excluding the interaction term with 
 time) as used in the lme analysis
 - overwriting sig.mgh with the one from the lme analysis
 - running `mri_glmfit-sim --cache`

 How would I extend this to my case where I don't have pairwise images, 
 but 1 image for some participants, for others up to 4?

 Thanks a lot,

 Janosch




 -- 
 Douglas N. Greve, Ph.D.
 MGH-NMR Center
 gr...@nmr.mgh.harvard.edu
 Phone Number: 617-724-2358
 Fax: 617-726-7422

 Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
 FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
 www.nmr.mgh.harvard.edu/facility/filedrop/index.html
 Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/



 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.


 -- 
 Douglas N. Greve, Ph.D.
 MGH-NMR Center
 gr...@nmr.mgh.harvard.edu
 Phone Number: 617-724-2358
 Fax: 617-726-7422

 Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
 FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
 www.nmr.mgh.harvard.edu/facility/filedrop/index.html
 Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/




-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
gr...@nmr.mgh.harvard.edu
Phone Number: 617-724-2358
Fax: 617-726-7422

Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2

Re: [Freesurfer] Mapping Own DK Regional Stats onto Surface

2015-03-03 Thread Douglas N Greve

It looks like you made your txt file under windows which creates an 
obscure situation where there are carriage returns instead of line feeds 
and that causes the error. If you run 'more my_parcstats.txt' you see a 
bunch of ^M strings. So, you'll need to recreate it under a linux system.

doug

On 03/03/2015 05:50 PM, Jin, Tony wrote:
 Hi Dr. Greve (and co.),

 Good to hear that I’m using a proper command, but alas, visualizing 
 the surface overlay file using tksurfer confirmed that my stats didn’t 
 transfer. I believe I’m calling tksurfer correctly, since I replaced 
 the lh.parcstats file with lh.thickness, and a cortical thickness heat 
 map overlaid just fine.

 Would you please confirm that my parcstats.txt file is arranged 
 correctly? It is an ascii file with 36 lines. Here are the first few:

 ctx-lh-bankssts 0.905
 ctx-lh-caudalanteriorcingulate 0.838
 ctx-lh-caudalmiddlefrontal 0.922
 ctx-lh-cuneus 0.892

 And here are my calls:

  To generate overlay file:
 mris_convert --annot lh.aparc.annot --parcstats parcstats.txt lh.pial 
 *lh.parcstats* — new desired annotation file

  To visualize overlay file mapped onto lh.pial surface using Tksurfer:
 tksurfer subject lh pial -overlay *lh.parcstats*

  To convert overlay file to ASCII for validation:
 mris_convert -c *lh.parcstats* lh.pial lh.parcstats.asc

 I tried doing this with version 5.3.0 on both Mac and Linux platforms 
 and got the same results (zeroes across all vertices). If it helps, 
 I’ve attached both my —parcstats text file and the resulting overlay 
 file.  Any ideas as to how I can successfully transfer my stats onto a 
 surface overlay file?

 Thank you for your assistance,
 Tony

 Tony Jin
 Data Technician
 Dept. of Psychiatry
 Stony Brook Medicine

 From: Douglas N Greve gr...@nmr.mgh.harvard.edu 
 mailto:gr...@nmr.mgh.harvard.edu
 Reply-To: freesurfer@nmr.mgh.harvard.edu 
 mailto:freesurfer@nmr.mgh.harvard.edu 
 freesurfer@nmr.mgh.harvard.edu mailto:freesurfer@nmr.mgh.harvard.edu
 Date: Tuesday, March 3, 2015 at 11:43 AM
 To: freesurfer@nmr.mgh.harvard.edu 
 mailto:freesurfer@nmr.mgh.harvard.edu 
 freesurfer@nmr.mgh.harvard.edu mailto:freesurfer@nmr.mgh.harvard.edu
 Subject: Re: [Freesurfer] Mapping Own DK Regional Stats onto Surface


 That is the right way (or one of them). Did you look at the result in
 tksurfer?

 On 03/03/2015 11:34 AM, Jin, Tony wrote:

 Hi all,

 I’d like to map my own stats (one value per Desikan-Killiany region)
 onto a subject's surface file, to create a figure similar to the
 following:
 
 http://openi.nlm.nih.gov/detailedresult.php?img=3280212_pone.0031913.g001req=4

 To do this, I tried to create a scalar overlay file using
 mris_convert’s --parcstats option, per the following mris_convert
 example:

 “”
 Create a scalar overlay file where each parcellation region
 contains a single value:
mris_convert \
 --annot lh.aparc.annot \
 --parcstats lh.parcstats.txt \
 lh.white \
 lh.parcstats

 (...)

 --parcstats infile is the name of text file containing label/val
 pairs, where label is an annot name and val is a value associated
 with
 that label.
 “”

 However, looking at the output file, stats didn’t seem to map to any
 vertices; instead, I observed zeroes across all in both Freeview and
 after conversion to ASCII (see first few lines below). I tried a few
 other ways to delimit the “label/val” pairs of the --parcstats
 file,
 including using tab, space, and forward-slash, but each way seemed to
 produce the same results:

 000 -10.67346 -71.19921 6.09064 0.0
 001 -11.29567 -71.20504 6.32133 0.0
 002 -12.26970 -71.62605 6.00416 0.0
 003 -13.11823 -71.40913 6.45834 0.0
 004 -14.22002 -71.39742 6.28750 0.0

 So, I wonder: is using mris_convert with the --parcstats flag a
 correct way to create such a map? If so, what could have gone wrong?
 If not, what’s the easiest way to map my own regional stats onto a
 surface?

 Your expertise is greatly appreciated;

 Thanks and all the best,

 Tony Jin
 Data Technician
 Dept. of Psychiatry
 Stony Brook Medicine


 This e-mail message, including any attachments, is for the sole
 use of
 the intended recipient(s) and may contain confidential and privileged
 information. Any unauthorized review, use, disclosure or distribution
 is prohibited. If you are not the intended recipient, please contact
 the sender by e-mail and destroy all copies of the original.


 ___
 Freesurfer mailing list
 Freesurfer@nmr.mgh.harvard.edu mailto:Freesurfer@nmr.mgh.harvard.edu
 https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


 -- 
 Douglas N. Greve, Ph.D.
 MGH-NMR Center
 gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu
 Phone Number: 617-724-2358
 Fax: 617-726-7422

 Bugs: 

Re: [Freesurfer] tksurfer overlay threshold

2015-03-03 Thread Douglas N Greve

I'm not sure what you mean. optimal in what sense?
doug

On 03/03/2015 03:21 PM, Hirsch, Gabriella wrote:
 Hi Fs experts,

 I had a quick question about settings thresholds of surface overlays 
 in Tksurfer. I am currently generating images of the thickness, volume 
 and surface area of individual subjects, and would like to know if 
 there are optimal minimum and maximum threshold values to be set for 
 different surfaces. For example, when overlaying thickness (from 
 /surf/?h.thickness), I have set the min threshold to 1 or 1.3 (see 
 attached); however I'm not sure this same threshold holds up in the 
 other surfaces (e.g. surface area).

 In summary, is there an optimal way to determine what this min. and 
 max. threshold should be in function of the distribution displayed in 
 the threshold window (see attached, on the left)?

 Thank you!

 Gabriella


 ___
 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
gr...@nmr.mgh.harvard.edu
Phone Number: 617-724-2358
Fax: 617-726-7422

Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
www.nmr.mgh.harvard.edu/facility/filedrop/index.html
Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/

___
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.



Re: [Freesurfer] tksurfer overlay threshold

2015-03-03 Thread Bruce Fischl
you can use the command:

set_current_threshold_from_percentile(min, mid,max)

which will compute the thresholds based on the histogram of values

On Tue, 3 Mar 2015, Douglas N Greve wrote:


 I'm not sure what you mean. optimal in what sense?
 doug

 On 03/03/2015 03:21 PM, Hirsch, Gabriella wrote:
 Hi Fs experts,

 I had a quick question about settings thresholds of surface overlays
 in Tksurfer. I am currently generating images of the thickness, volume
 and surface area of individual subjects, and would like to know if
 there are optimal minimum and maximum threshold values to be set for
 different surfaces. For example, when overlaying thickness (from
 /surf/?h.thickness), I have set the min threshold to 1 or 1.3 (see
 attached); however I'm not sure this same threshold holds up in the
 other surfaces (e.g. surface area).

 In summary, is there an optimal way to determine what this min. and
 max. threshold should be in function of the distribution displayed in
 the threshold window (see attached, on the left)?

 Thank you!

 Gabriella


 ___
 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.



Re: [Freesurfer] from vol timecourse to surf timecourse

2015-03-03 Thread Douglas N Greve

You can use something like
rawfunc2surf-sess -i fstcmc -hemi lh -fwhm 5 -o 
fstcmc.sm05.fsaverage.lh.nii.gz

Then in mkanalysis-sess, use -funcstem fstcmc.sm05.fsaverage.lh (and do 
not include preprocessing options)

doug


On 03/03/2015 02:12 PM, Jan Willem Koten wrote:

 Dear Surfer experts,

 (Most likely Dough)

 It is common practice to perform the slice time correction first and 
 than the motion correction. However free surfer seems to work in the 
 opposite way.

 I have tried to write a mini matlab freesurfer script for the common way.

 system(['stc-sess -s 'funcdir(i).name ' -i f -o fstc -so siemens'])

 system(['mc-sess -s 'funcdir(i).name ' -fstem fstc -fmcstem fstcmc 
 -per-run'])

 This seems to work.

 My problem is how do I get the resulting fstcmc.ni.gz on to the 
 fsaverage surface using spherical alignment?

 Jan



 ___
 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
gr...@nmr.mgh.harvard.edu
Phone Number: 617-724-2358
Fax: 617-726-7422

Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
www.nmr.mgh.harvard.edu/facility/filedrop/index.html
Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/

___
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.



Re: [Freesurfer] Mapping Own DK Regional Stats onto Surface

2015-03-03 Thread Jin, Tony
Hi Doug and co.,

To follow up about this: I may have resolved the issue. For posterity, label 
names of the mris_convert --parcstats file should be created without the 
ctx-?h” prefix:

My parcstats file previously read...

ctx-lh-bankssts 0.905
ctx-lh-caudalanteriorcingulate 0.838
ctx-lh-caudalmiddlefrontal 0.922
ctx-lh-cuneus 0.892
...

But should have read...

bankssts 0.905
caudalanteriorcingulate 0.838
caudalmiddlefrontal 0.922
cuneus 0.892
...

Here’s an example of a successful output message:

reading colortable from annotation file...

colortable with 36 entries read (originally 
/autofs/space/terrier_001/users/nicks/freesurfer/average/colortable_desikan_killiany.txt)

label: bankssts, val: 0.90471

label: caudalanteriorcingulate, val: 0.83800

label: caudalmiddlefrontal, val: 0.92191

label: cuneus, val: 0.89220

label: entorhinal, val: 0.59121

label: frontalpole, val: 0.74679

label: fusiform, val: 0.93415

label: inferiorparietal, val: 0.92599

label: inferiortemporal, val: 0.95396

label: insula, val: 0.87674

label: isthmuscingulate, val: 0.88986

label: lateraloccipital, val: 0.93415

label: lateralorbitofrontal, val: 0.91696

label: lingual, val: 0.90705

label: medialorbitofrontal, val: 0.85372

label: middletemporal, val: 0.95222

label: paracentral, val: 0.91375

label: parahippocampal, val: 0.77710

label: parsopercularis, val: 0.93823

label: parsorbitalis, val: 0.92425

label: parstriangularis, val: 0.94988

label: pericalcarine, val: 0.84703

label: postcentral, val: 0.93590

label: posteriorcingulate, val: 0.93998

label: precentral, val: 0.96708

label: precuneus, val: 0.95396

label: rostralanteriorcingulate, val: 0.92278

label: rostralmiddlefrontal, val: 0.95222

label: superiorfrontal, val: 0.95979

label: superiorparietal, val: 0.95075

label: superiortemporal, val: 0.93094

label: supramarginal, val: 0.95222

label: temporalpole, val: 0.27797

label: transversetemporal, val: 0.90879

Many thanks for your responsiveness; have a great night!

Tony Jin
Data Technician
Dept. of Psychiatry
Stony Brook Medicine


From: Jin, Tony Jin 
tony@stonybrookmedicine.edumailto:tony@stonybrookmedicine.edu
Reply-To: 
freesurfer@nmr.mgh.harvard.edumailto:freesurfer@nmr.mgh.harvard.edu 
freesurfer@nmr.mgh.harvard.edumailto:freesurfer@nmr.mgh.harvard.edu
Date: Tuesday, March 3, 2015 at 6:28 PM
To: freesurfer@nmr.mgh.harvard.edumailto:freesurfer@nmr.mgh.harvard.edu 
freesurfer@nmr.mgh.harvard.edumailto:freesurfer@nmr.mgh.harvard.edu
Subject: Re: [Freesurfer] Mapping Own DK Regional Stats onto Surface

Thank you for discovering this text file issue. I’ve corrected its formatting, 
reran the command, but unfortunately the overlay file issue persists. The 
following is the Terminal I/O; once again, I’ve also attached the parcstats 
file and the output overlay file for reference.


mris_convert --annot /sub1/label/lh.aparc.annot --parcstats 
/20150302_map_and_edits/parcstats_properly_formatted.txt /sub1/surf/lh.pial 
/20150302_map_and_edits/lh.parcstats.overlay

reading colortable from annotation file...

colortable with 36 entries read (originally 
/autofs/space/terrier_001/users/nicks/freesurfer/average/colortable_desikan_killiany.txt)

Any thoughts or suggestions would be greatly appreciated;
Tony

From: Douglas N Greve 
gr...@nmr.mgh.harvard.edumailto:gr...@nmr.mgh.harvard.edu
Reply-To: 
freesurfer@nmr.mgh.harvard.edumailto:freesurfer@nmr.mgh.harvard.edu 
freesurfer@nmr.mgh.harvard.edumailto:freesurfer@nmr.mgh.harvard.edu
Date: Tuesday, March 3, 2015 at 5:59 PM
To: freesurfer@nmr.mgh.harvard.edumailto:freesurfer@nmr.mgh.harvard.edu 
freesurfer@nmr.mgh.harvard.edumailto:freesurfer@nmr.mgh.harvard.edu
Subject: Re: [Freesurfer] Mapping Own DK Regional Stats onto Surface


It looks like you made your txt file under windows which creates an
obscure situation where there are carriage returns instead of line feeds
and that causes the error. If you run 'more my_parcstats.txt' you see a
bunch of ^M strings. So, you'll need to recreate it under a linux system.

doug

On 03/03/2015 05:50 PM, Jin, Tony wrote:
Hi Dr. Greve (and co.),

Good to hear that I’m using a proper command, but alas, visualizing
the surface overlay file using tksurfer confirmed that my stats didn’t
transfer. I believe I’m calling tksurfer correctly, since I replaced
the lh.parcstats file with lh.thickness, and a cortical thickness heat
map overlaid just fine.

Would you please confirm that my parcstats.txt file is arranged
correctly? It is an ascii file with 36 lines. Here are the first few:

ctx-lh-bankssts 0.905
ctx-lh-caudalanteriorcingulate 0.838
ctx-lh-caudalmiddlefrontal 0.922
ctx-lh-cuneus 0.892

And here are my calls:

 To generate overlay file:
mris_convert --annot lh.aparc.annot --parcstats parcstats.txt lh.pial
*lh.parcstats* — new desired annotation file

 To visualize overlay file 

Re: [Freesurfer] Monte Carlo simulation - Longitudinal Pipeline

2015-03-03 Thread Janosch Linkersdörfer
Hey Doug,

thanks again! That means, I would do something like:

1.) construct longitudinal qdec table
- only use fsid, fsid-base, and years/age columns
- substract the average age of the one-time point subjects from years/age value 
for every subject at every time point

2.) run long_mris_slopes
- use the --do-avg flag?

3.) concatenate the output files from 2) and the maps from the one-time point 
subjects with mris_preproc
- use --is flag to select maps by specifying full path

4.) run mri_glmfit
- use --osgm flag for one-sample group mean

5.) replace sig.mgz file with the one from LME analysis and run mri_glmfit-sim

Is that correct? (especially, is using --do-avg what you meant by taking the 
offset)

Thanks,

Janosch


Am 03.03.2015 um 08:32 schrieb Douglas N Greve gr...@nmr.mgh.harvard.edu:

 
 I don't know, esp since it is an approximation to begin with. An alternative 
 is to take the offsets from your multi-time-point subjects and the single 
 maps from your subjects with one time point and run that through the 
 one-sample-group-mean (--osgm in mri_glmfit). If you go this route, then you 
 should subtract the mean age of the one time-point subjects from the age of 
 the multi-time point subjects before the 1st stage of analysis.
 
 doug
 
 
 On 03/02/2015 07:25 PM, Janosch Linkersdörfer wrote:
 Hi Doug,
 
 thank you very much for your answer!
 
 Am 02.03.2015 um 11:30 schrieb Douglas N Greve gr...@nmr.mgh.harvard.edu:
 
 You would do the long analysis using a random effects analysis.
 OK, so basically do 2-stage modeling 
 (https://surfer.nmr.mgh.harvard.edu/fswiki/LongitudinalTwoStageModel), right?
 
 For each subject you can get a slope (this won't work if the subject only 
 has 1 time point), then concatenate the slopes into a file and run 
 mri_glmfit, then follow the procedures from the archive email you reference.
 One quarter of my subjects only has one measurement time point. Can I still 
 use this method (which would only consider the 3/4 of the subjects) to 
 correct clusters found in the whole group? Or would it only be valid for 
 correcting clusters from an LME model for the reduced group?
 
 Thanks,
 
 Janosch
 
 doug
 
 On 02/24/2015 08:35 PM, Janosch Linkersdörfer wrote:
 Hi Doug and others,
 
 I would like apply (Monte Carlo simulation) cluster correction (as opposed 
 to the implemented vertex-wise FDR correction) on the results from a 
 longitudinal study I analyzed using the LME toolbox. The design is 
 unbalanced (different number of time points, from 1 to 4, per subject).
 
 In this thread 
 (http://www.mail-archive.com/freesurfer%40nmr.mgh.harvard.edu/msg35367.html)
  you, Doug, suggested, if I understand correctly:
 
 - concatenating the images using `mris_preproc --paired-diff`
 - smooth with the same kernel size as used in the lme analysis
 - running `mri_glmfit` on them with an fsgd file that uses the same 
 covariates and the same contrast (excluding the interaction term with 
 time) as used in the lme analysis
 - overwriting sig.mgh with the one from the lme analysis
 - running `mri_glmfit-sim --cache`
 
 How would I extend this to my case where I don't have pairwise images, but 
 1 image for some participants, for others up to 4?
 
 Thanks a lot,
 
 Janosch
 
 
 
 
 -- 
 Douglas N. Greve, Ph.D.
 MGH-NMR Center
 gr...@nmr.mgh.harvard.edu
 Phone Number: 617-724-2358
 Fax: 617-726-7422
 
 Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
 FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
 www.nmr.mgh.harvard.edu/facility/filedrop/index.html
 Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/
 
 
 
 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.
 
 
 
 
 -- 
 Douglas N. Greve, Ph.D.
 MGH-NMR Center
 gr...@nmr.mgh.harvard.edu
 Phone Number: 617-724-2358
 Fax: 617-726-7422
 
 Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
 FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
 www.nmr.mgh.harvard.edu/facility/filedrop/index.html
 Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/
 


___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


Re: [Freesurfer] -addtp option not working in recon-all -long

2015-03-03 Thread Bishesh Khanal
Thanks Martin. It works now.

On Mon, Mar 2, 2015 at 10:51 PM, Martin Reuter mreu...@nmr.mgh.harvard.edu
wrote:

  Hi Bishesh,

 it is a know bug. in your recon-all find this block (should be in line
 6148)

 if ( ! $found_tpNid ) then
   echo ERROR: $tpNid is not in
 ${longbasedir}/${BaseSubjsListFname}
   echo 
   exit 1
 endif


 and replace the first line (if statement) with:

 if ( ! $found_tpNid  ! $DoAddTp  ) then

 Best, Martin



 On 02/25/2015 05:21 PM, Bishesh Khanal wrote:

 It's 5.3.0. Here is the freesurfer version and my system info:
 Build stamp: freesurfer-Linux-centos6_x86_
 64-stable-pub-v5.3.0
 RedHat release: Fedora release 19 (Schrödinger’s Cat)
 Kernel info: Linux 3.14.22-100.fc19.x86_64 x86_64


 On Wed, Feb 25, 2015 at 7:54 PM, Martin Reuter 
 mreu...@nmr.mgh.harvard.edu wrote:

  Hi Bishesh,

 that is weird, it should add the time point to that file. What version of
 FS are you using?

 Best, Martin


 On 02/25/2015 06:03 AM, Bishesh Khanal wrote:

  Hi all,
  I wanted to add a new timepoint in my longitudinal stream without
 recreating the base template. recon-all -help shows that I should be able
 to do that with:
   recon-all -long tpNsubjid longbasesubjid -addtp -all

  However, when I tried it I get an error.
  Here is the error:
 $recon-all -long miriad_189_AD_M_10SimulatedT1From01
 miriad_189_AD_M_01_10 -addtp -all
 ERROR: miriad_189_AD_M_10SimulatedT1From01 is not in
 /home/bkhanal/works/freesurfer/freesurferSubjects/miriad_189_AD_M_01_10/base-tps

  Since I'm using a new timepoint which was not used in creating the base
 template it would of course not be in base-tps. Is -addtp no having any
 effect here ?
  The freesurfer version and my system info:
 Build stamp: freesurfer-Linux-centos6_x86_64-stable-pub-v5.3.0
 RedHat release: Fedora release 19 (Schrödinger’s Cat)
 Kernel info: Linux 3.14.22-100.fc19.x86_64 x86_64

  Thanks,
  Bishesh




  ___
 Freesurfer mailing 
 listfreesur...@nmr.mgh.harvard.eduhttps://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


 --
 Dr. Martin Reuter

 Instructor in Neurology
   Harvard Medical School
 Assistant in Neuroscience
   Dept. of Radiology, Massachusetts General Hospital
   Dept. of Neurology, Massachusetts General Hospital
 Research Affiliate
   Computer Science and Artificial Intelligence Lab,
   Dept. of Electrical Engineering and Computer Science,
   Massachusetts Institute of Technology

 A.A.Martinos Center for Biomedical Imaging
 149 Thirteenth Street, Suite 2301
 Charlestown, MA 02129

 Phone: +1-617-724-5652
 Email:
mreu...@nmr.mgh.harvard.edu
reu...@mit.edu
 Web  : http://reuter.mit.edu


 ___
 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 
 listfreesur...@nmr.mgh.harvard.eduhttps://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


 --
 Dr. Martin Reuter

 Instructor in Neurology
   Harvard Medical School
 Assistant in Neuroscience
   Dept. of Radiology, Massachusetts General Hospital
   Dept. of Neurology, Massachusetts General Hospital
 Research Affiliate
   Computer Science and Artificial Intelligence Lab,
   Dept. of Electrical Engineering and Computer Science,
   Massachusetts Institute of Technology

 A.A.Martinos Center for Biomedical Imaging
 149 Thirteenth Street, Suite 2301
 Charlestown, MA 02129

 Phone: +1-617-724-5652
 Email:
mreu...@nmr.mgh.harvard.edu
reu...@mit.edu
 Web  : http://reuter.mit.edu


 ___
 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


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was 

Re: [Freesurfer] equivalent for fslmaths -mas option in freesurfer

2015-03-03 Thread Sarah Finnegan
Hi Doug, 

Thanks I had hoped to use mri_mask but was foiled in my attempt to convert the 
.label files to .mgz using mri_label2bvol. I assumed I must be on the wrong 
track. 

my command was 

mri_label2vol --label V2_lh.label --temp f.nii.gz --reg register.dat 
--fillthresh .3 --proj frac 0 1 .1 --subject V2_subject5 --hemi lh --o V2_lh.mgz

I have previously used this command successfully to convert labels for usage in 
FSL. The volume will display using tkmedit on the orig surface, but in tksurfer 
using the inflated surface there is nothing visible when attempting to open as 
an overlay.  

I have played around with different options and attempted to move forward to 
mri_mask using the V2_lh.mgz file (hoping to later open the data in tksurfer) 
but the command 

mri_mask -transfer 255 -keep_mask_deletion_edits masked_data V2_lh.mgz 
lh_colour.mgz V2_colour_lh.mgz

gives

transfer mask voxels=255 to dst vol
Transferring mask edits ('1' voxels) to dst vol
ERROR: dimension mismatch between source and mask 

I assume I must be missing something fundamental in the mri_label2vol command?

Thank you for your help
Sarah


From: freesurfer-boun...@nmr.mgh.harvard.edu 
[freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Sarah Finnegan 
[sarah.finne...@stcatz.ox.ac.uk]
Sent: 26 February 2015 15:12
To: Freesurfer support list
Subject: Re: [Freesurfer] equivalent for fslmaths -mas option in freesurfer

Hi Bruce

Thanks for your reply,
I did use mri_vol2surf for the sampling

mri_vol2surf --src {zstat1} --srcreg {anat2exf.register.dat} --hemi 
{hemi}--projfrac {0.8} --out {out file name} --out_type {mgz}

I don't believe that I want to average within the ROI. I want to take any 
clusters of activity within V2 and feed this into a script i'm developing in 
MATLAB to work out the distance between different voxel clusters and the size 
of each cluster, but only for within my region defined as V2. Hopefully that 
makes sense, If I average I think I will lose this spatial information?

Thanks
Sarah

From: freesurfer-boun...@nmr.mgh.harvard.edu 
[freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Bruce Fischl 
[fis...@nmr.mgh.harvard.edu]
Sent: 26 February 2015 15:04
To: Freesurfer support list
Subject: Re: [Freesurfer] equivalent for fslmaths -mas option in freesurfer

Hi Sarah

have you used mri_vol2surf to sample the data onto the surface? When you
say extract specific regions of functional data from a flat  do you
want to average within the ROI?

cheers
Bruce
On Thu, 26 Feb 2015, Sarah Finnegan wrote:

 I have a question about the equivalent of fslmaths -mas option in
 freesurfer.
 I have several manually defined labels in .label form that I want to use to
 extract specific regions of functional data from a flat patch. Ordinarily in
 fsl I would just use

 fslmaths -invol {functional_data} -mas {bin_label} -outvol
 {masked_functional_data}

 but I'm a little confused about an equivalent for this in free surfer as I
 don't want to perform any further stats on these ROI yet, extract them from
 any surrounding data and overlay onto the flattened surface.

 I have tried using
 mri_vol2roi --label {V2_rh.label} --srcvol {functional_data.mgz} --srcreg
 {anat2exf.register.dat} --roiavg {func_V2_mask} --finalmskvol
 {func_V2_mask_out}
 but when overlaying the output file there are no data points visible.

 Any help would be great as several other functions that I have tried seem to
 be obsolete,

 Thanks!
 Sarah


___
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


Re: [Freesurfer] equivalent for fslmaths -mas option in freesurfer

2015-03-03 Thread Douglas Greve




On 3/3/15 9:41 AM, Sarah Finnegan wrote:
 Hi Doug,

 Thanks I had hoped to use mri_mask but was foiled in my attempt to convert 
 the .label files to .mgz using mri_label2bvol. I assumed I must be on the 
 wrong track.

 my command was

 mri_label2vol --label V2_lh.label --temp f.nii.gz --reg register.dat 
 --fillthresh .3 --proj frac 0 1 .1 --subject V2_subject5 --hemi lh --o 
 V2_lh.mgz

 I have previously used this command successfully to convert labels for usage 
 in FSL. The volume will display using tkmedit on the orig surface, but in 
 tksurfer using the inflated surface there is nothing visible when attempting 
 to open as an overlay.
I'm not sure what you mean here by it displays in tkmedit on the orig 
surface. Can you elaborate? What was your tksurfer command. Also, try a 
fillthresh of 0 as there may be few voxels that have more than 30%.

 I have played around with different options and attempted to move forward to 
 mri_mask using the V2_lh.mgz file (hoping to later open the data in tksurfer) 
 but the command

 mri_mask -transfer 255 -keep_mask_deletion_edits masked_data V2_lh.mgz 
 lh_colour.mgz V2_colour_lh.mgz

 gives

 transfer mask voxels=255 to dst vol
 Transferring mask edits ('1' voxels) to dst vol
 ERROR: dimension mismatch between source and mask

 I assume I must be missing something fundamental in the mri_label2vol command?
Not sure what you are trying to do in that command. Where did 
lh_colour.mgz come from?
doug

 Thank you for your help
 Sarah

 
 From: freesurfer-boun...@nmr.mgh.harvard.edu 
 [freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Sarah Finnegan 
 [sarah.finne...@stcatz.ox.ac.uk]
 Sent: 26 February 2015 15:12
 To: Freesurfer support list
 Subject: Re: [Freesurfer] equivalent for fslmaths -mas option in freesurfer

 Hi Bruce

 Thanks for your reply,
 I did use mri_vol2surf for the sampling

 mri_vol2surf --src {zstat1} --srcreg {anat2exf.register.dat} --hemi 
 {hemi}--projfrac {0.8} --out {out file name} --out_type {mgz}

 I don't believe that I want to average within the ROI. I want to take any 
 clusters of activity within V2 and feed this into a script i'm developing in 
 MATLAB to work out the distance between different voxel clusters and the size 
 of each cluster, but only for within my region defined as V2. Hopefully that 
 makes sense, If I average I think I will lose this spatial information?

 Thanks
 Sarah
 
 From: freesurfer-boun...@nmr.mgh.harvard.edu 
 [freesurfer-boun...@nmr.mgh.harvard.edu] on behalf of Bruce Fischl 
 [fis...@nmr.mgh.harvard.edu]
 Sent: 26 February 2015 15:04
 To: Freesurfer support list
 Subject: Re: [Freesurfer] equivalent for fslmaths -mas option in freesurfer

 Hi Sarah

 have you used mri_vol2surf to sample the data onto the surface? When you
 say extract specific regions of functional data from a flat  do you
 want to average within the ROI?

 cheers
 Bruce
 On Thu, 26 Feb 2015, Sarah Finnegan wrote:

 I have a question about the equivalent of fslmaths -mas option in
 freesurfer.
 I have several manually defined labels in .label form that I want to use to
 extract specific regions of functional data from a flat patch. Ordinarily in
 fsl I would just use

 fslmaths -invol {functional_data} -mas {bin_label} -outvol
 {masked_functional_data}

 but I'm a little confused about an equivalent for this in free surfer as I
 don't want to perform any further stats on these ROI yet, extract them from
 any surrounding data and overlay onto the flattened surface.

 I have tried using
 mri_vol2roi --label {V2_rh.label} --srcvol {functional_data.mgz} --srcreg
 {anat2exf.register.dat} --roiavg {func_V2_mask} --finalmskvol
 {func_V2_mask_out}
 but when overlaying the output file there are no data points visible.

 Any help would be great as several other functions that I have tried seem to
 be obsolete,

 Thanks!
 Sarah


 ___
 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



___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer