Re: [Freesurfer] Error upon trying to load NIFTI image in freeview

2012-12-06 Thread Tudor Popescu
Thanks for your reply Yaniv! That is how I initially tried loading the
NIFTI volumes (via the GUI, File|Load), but in the meantime I discovered
what the problem was: there were spaces in the name of the folder
containing the image, and apparently non-Windows OSs such as Xubuntu don't
deal well with that!

For future reference, as soon as you eliminate spaces - as well as possibly
other'forbidden' characters from the file/folder name, FreeView will load
the image with no problems.

Tudor

On 6 December 2012 00:44, Yaniv Kaufman kaaniv.kaauf...@gmail.com wrote:

 Hi Tudor,

 I am not very experienced with Freeview, but did you try typing freeview
 in the command line and using the File-Load Volume… from the GUI?
 If that doesn't work maybe you can give me the exact command you used.

 Hope I could help.
 Regards,
 Yaniv
 On 06/12/2012, at 1:47 AM, Tudor Popescu tud...@gmail.com wrote:

  Hi everyone,
 
  I tried opening a NIFTI (.nii.gz) image in freeview, but it gives me
 repeated Failed to load image name errors.
 
  That same image loads fine in FSLview, but even when trying with other
 NIFTI images, I get the same error.
 
  The default image
 (/home/virtualuser/freesurfer/subjects/bert/mri/brainmask.mgz) opens fine
 in freeview.
 
  I use FreeSurfer v5.1.0 on Xubuntu 9.10, running through VirtualBox on
 WinXP.
 
  Many thanks for any help!
  Tudor
  ___
  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 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] Missing Insula and mri_label2vol

2012-12-06 Thread José Ángel Pineda
Thanks Doug,

now it works!!


 for mac use

 ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/mri_label2vol.mac
 
 ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/mri_label2vol.linux32
 
 doug

 On 12/05/2012 05:11 AM, Jos? ?ngel Pineda wrote:
  Hi again,
 
  Sure I did set the permissions for execution, and also for this new
  one I am still having the same error. /Exec format error. Binary file
  not executable/. I tried this on two macs (OSX Snow Leopard). I am
  still thinking that this is a compilation issue of the script, that is
  just compiled for linux.
 
  Thanks for your help
 
  Try this one
 
 ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/mri_label2vol.linux32
 
  On 12/04/2012 12:13 PM, Sarosh, Cyrus wrote:
   Doug,
  
   I am unsure if Jose did this in his attempts to get it to work,
  but I ran this command after downloading and receiving this error
  initially and even after running this command I still receive the
  same error in the Windows virtual machine version of FreeSurfer.
  Any other ideas?
  
   Thanks,
  
   Cyrus
  
   -Original Message-
   From: freesurfer-boun...@nmr.mgh.harvard.edu
  mailto:freesurfer-boun...@nmr.mgh.harvard.edu
  [mailto:freesurfer-boun...@nmr.mgh.harvard.edu
  mailto:freesurfer-boun...@nmr.mgh.harvard.edu] On Behalf Of
  Douglas N Greve
   Sent: Tuesday, December 04, 2012 11:58 AM
   To: freesurfer@nmr.mgh.harvard.edu
  mailto:freesurfer@nmr.mgh.harvard.edu
   Subject: Re: [Freesurfer] (no subject)
  
   Hi Jose, did you set the permissions to be executable?
   chmod a+x mri_label2vol
   doug
  
  
   On 12/04/2012 11:34 AM, Sarosh, Cyrus wrote:
   Doug,
  
   I am also curious about this mri_label2vol upgrade. Will this
  work on
   the Windows virtual machine version of FreeSurfer? I downloaded
 and
   placed it in the FREESURFER/bin directory, but when trying to
  run it I
   receive an error that states: Exec format error. Binary file not
   executable. Thanks for your help.
  
   Cyrus
  
   *From:*freesurfer-boun...@nmr.mgh.harvard.edu
  mailto:freesurfer-boun...@nmr.mgh.harvard.edu
   [mailto:freesurfer-boun...@nmr.mgh.harvard.edu
  mailto:freesurfer-boun...@nmr.mgh.harvard.edu] *On Behalf Of *Jos?
   ?ngel Pineda
   *Sent:* Tuesday, December 04, 2012 9:07 AM
   *To:* freesurfer@nmr.mgh.harvard.edu
  mailto:freesurfer@nmr.mgh.harvard.edu
   *Subject:* [Freesurfer] (no subject)
  
   Thanks Doug,
  
   I already downloaded the new script for mri_label2vol, but it
  seems it
   is just compiled for linux, as I cannot execute it in my Mac.
  If it is
   so, could you please upload another compiled for mac, or source.
   Thanks
  
   Jose
  
For the missing insula problem, try using a newer version of
mri_label2vol
  
  
 
 ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/mri_labe
   l2vol
  
The 2nd problem is not so easy to fix. You might be better
  off using
aparc+aseg.mgz as input to mri_label2vol instead of the
  surface
annotation.
doug
  
  
On 12/3/12 10:35 AM, Jos? ?ngel Pineda wrote:
 Dear experts,

 I am registering cortical labels from Talairach
  coordinates to my
 native T1. For doing this, I have run the next script
 lines:


 tkregister --targ brainmask.mgz --mov
  highres_brain.nii.gz --reg
 T1FS2Highres.dat --regheader --noedit

 mri_label2vol --annot rh.aparc.annot --temp
  highres_brain.nii.gz
--reg
 T1FS2Highres.dat --o rh_aparc.nii.gz --hemi rh --subject
  FS --proj
 frac 0 1 .1 --fillthresh .3

 and the same for the left hemi.

 However I am finding two problems at the result. First
  Insula is
 missing for both hemispheres, and second the cortical
  ROIs have the
 shape of the figure attached, e.g. there are many voxels
  empty

 Im?genes integradas 1

 I found in previous topics, that the mri_label2vol, was
  updated
as it
 left last volume from the list out of the conversion. I
  tried to
 download it, but it is just compiled for linux, and
  since Im working
 with mac I am not able to run it. Could you please give
  me any
 comments to solve the problem with the missing voxels.
 About the problem with the insula, the other option is
  to just
extract
 it with mri_annotation2label, but 

[Freesurfer] Hippocampus volume

2012-12-06 Thread Antonella Kis
Dear FS team,

After I ran the recon-all to get the total cortical thickness, the volume  of
the left hypocampus ( = the number of voxels) equals to 2166 which I
thought should be the total hippocampal volume. But if we add all the
voxel numbers from the hippocampal subfield I will get a much larger
number so I wonder which one represents the true total  volume in terms
of number of voxels. 

Can you also please advise how  can I get differentiated hipocampus 
segmentation in form of head and body.

Thank you.
Antonella___
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] Running recon-all on a series of scans

2012-12-06 Thread Natasha Jawa
Hi,

Is it possible to run recon-all on a series of scans?

I have multiple scans that I want to process longitudinally. The .nii files 
have all been converted to .mgz files and labelled sequentially (i.e., 001.mgz, 
002.mgz, etc.) in /Applications/freesurfer/subjects/subjid/mri. I've tried 
running recon-all on this whole folder with the command line: recon-all -subjid 
subjid -all, but it does not execute properly.

Do I have to run each of these scans separately using recon-all (i.e., do I 
need to use a separate terminal for each scan)?

Thank you in advance for your time and help.
___
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] Longitudinal analysis - contrast

2012-12-06 Thread Martin Reuter
Yes, 

in 5.2 there should be the two new options --qdec and --qdec-long

to allow passing qdec tables both in the regular cross sectional and in
the longitudinal format in addition to the existing other ways of
passing subjects lists (--s or --fsgd or --f ).

Now care needs to be taken in the longitudinal setting. What you want is
to get the files (e.g. thickness) from the *.long.base directories
into the target (e.g fsaverage space). Not from the cross sectional
directories!

For this you will be able to use the longitudinal qdec file (with a
column of 'fsid' and 'fsid-base' to group time points into subjects, see
wiki).

In 5.1 you should do the following:
create a text file with each longitudinal id (containing
the .long.base ) per line and pass it using the --f flag.
So in the example below you'd write:
002.long.002_base
003.long.003_base
003_m6.long.003_base

You can use a simple shell command to get such a list from a
longitudinal qdec file:
cat long.qdec.table.txt | awk '{if ($1 != fsid  substr($1,0,1) !=
#) printf(%s.long.%s\n, $1, $2)}'  outsubjectsfile.txt

Then preproc will do its job. The order of subjects needs to be
identical to the qdec file that you use to run the LME matlab tools to
ensure thickenss maps are stacked in the same order as you pass the
covariates.

Best, Martin



On Thu, 2012-12-06 at 04:27 +, jorge luis wrote:
 Hi Alex
 
 
 I think that Martin added the flag --qdec to mris_preproc for version
 5.2. Martin, could you confirm this please?
 
 
 The code for building the study design matrix X that is in the wiki is
 just an example of how lme tools can be used for that purpose but the
 actual instance of your code will depend on your particular Qdec
 table. For instance, usually, Freesurfer's longitudinal Qdec tables
 are of the form:
 
 
 fsidfsid-base  sIDtime   group...
 002002_base 0020 0
 003003_base0030 1
 003_m6003_base0030.56   1 
 003_m12  003_base0031.121
 003_m24  003_base0032.2  1
 005005_base00500
 005_m6005_base0050.45   0
 005_m12  005_base 0051.2 0
 
 
 were “fsid” is the Freesurfer's ID, “fsid-base” is the name of the
 subject's specific template, sID is the subject-specific ID uniquely
 identifying each subject, “time” is the time covariate and group is
 the group membership covariate (there can be more covariates of
 course). I suppose that you processed your longitudinal MRI scans
 using a Qdec table similar to that. 
 
 
 You can read that Qdec table into Matlab:
 
 
 Qdec = fReadQdec('qdec.table.dat');
 
 
 Now you need to build your numeric design matrix X from the cell
 string array Qdec to represent a specific longitudinal design. Here
 you don't need the columns fsid and fsid-base in Qdec so you simply
 remove them:
 
 
 Qdec = rmQdecCol(Qdec,1); 
 Qdec = rmQdecCol(Qdec,1); 
 
 
 The you can grab the subject-specific ID:
 
 
 sID = Qdec(:,1); 
 
 
 and then remove that column:
 
 
 Qdec = rmQdecCol(Qdec,1); 
 
 
 You can now convert your cell string array Qdec to a numeric matrix:
 
 
 M = Qdec2num(Qdec); 
 
 
 Here, the data in M is already ordered according to time for each
 subject, otherwise, you can order the data using:
 
 
 [M,Y,ni] = sortData(M,1,Y,sID); 
 
 
 where Y is the cortical thickness data matrix that you read with
 fs_read_Y. Please take a look at the help of sortData. Note that
 matrix M only have two columns and you need to build your design
 matrix from it. In your case it is quite simple:
 
 
 X = [ones(length(M),1) M M(:,1).*M(:,2)];
 
 
 That is to say X contains a column of 1s (the intercept), a column
 with the time covariate, a column with the group membership and a
 column with the interaction term.
 
 
 Now, you are ready for fitting the lme model:
 
 
 stats = lme_mass_fit_vw(X,1,Y,ni,cortex);
 
 
 The 1 here (second input) means that you are using a single random
 effect for the intercept term which is located in column 1 of  X. Then
 you can test the interaction term using:
 
 
 CM.C = [0 0 0 1];
 
 
 F_stats = lme_mass_F(stats,CM); 
 
 
 and write the significance map for visualization and FDR correction in
 tksurfer
 
 
 fs_write_fstats(F_stats,mri,'sig.mgh','sig');
 
 
 It must be recognized that some basic Matlab knowledge is required to
 apply the lme tools. But the gain in flexibility for building your
 design matrix and analysis is significant. As you see, the relatively
 difficult part is how to get from the Qdec variable to your design
 matrix X. It requires some study-specific Matlab code. Sorry, but this
 is what he have at this point.
 
 
 Best
 -Jorge
 
 
 
 
 
 
 
 
 __
 De: Alex Hanganu al.hang...@yahoo.ca
 Para: FS Mailing List Freesurfer@nmr.mgh.harvard.edu; Jorge
 Luis Bernal-Russiel jbernal0...@yahoo.es 
 Enviado: Miércoles 5 de 

Re: [Freesurfer] Hippocampus volume

2012-12-06 Thread Juan Eugenio Iglesias
Hi again,
like I said in my previous emails, the measurements from the subfield
tools are based on .5x.5x.5 voxels, so you have to divide them by 8 to
convert them to cubic milliliters. Then, if you add up the volumes from
the subfields (without including the hippocampal fissure), you should get
something close to the measurement based on aseg.mgz (2166).
Kind regards,
Eugenio


On Thu, December 6, 2012 10:41 am, Antonella Kis wrote:
 Dear FS team,

 After I ran the recon-all to get the total cortical thickness, the volume 
 of
 the left hypocampus ( = the number of voxels) equals to 2166 which I
 thought should be the total hippocampal volume. But if we add all the
 voxel numbers from the hippocampal subfield I will get a much larger
 number so I wonder which one represents the true total  volume in terms
 of number of voxels.

 Can you also please advise how  can I get differentiated hipocampus
 segmentation in form of head and body.

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


-
Juan Eugenio Iglesias, PhD
http://www.jeiglesias.com
igles...@nmr.mgh.harvard.edu
Athinoula A. Martinos Center for Biomedical Imaging
149 Thirteenth Street, Suite 2301
Charlestown, Massachusetts 2129
U.S.A.
___
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] mri_glmfit-sim for interhemispheric comparison

2012-12-06 Thread Shigetoshi Takaya
Hi Doug,

 

I did surface-based inter-hemispheric comparison.

I used an arbitrary surface data (.mgz) resampled from a volume data (.nii),
otherwise I follow the instruction.

 http://surfer.nmr.mgh.harvard.edu/fswiki/Xhemi
http://surfer.nmr.mgh.harvard.edu/fswiki/Xhemi

 

I got a good result for mri_glmfit. But when I run mri_glmfit-sim, the
following error messeage popped up.

 

ERROR: cannot find 

$FRESURFER_HOME/average/mult-comp-cor/fsaverage_sym/lh/cortex/fwhm00/abs/th2
0/mc-z.csd

 

I did not find fwhm00anywhere in the downloaded file mult-comp-cor,
although I found fwhm01-30 directories. Am I missing somethine?

 

 

Thank you very much in advance,

Shige

___
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] question retinotopic mapping

2012-12-06 Thread Douglas N Greve
Julia, what version of FS are you using? It looks like pre-5.0. Can you 
upgrade to 5.1? There were a lot of changes in going from 4 to 5, and it 
is becoming increasingly hard to support version 4.

doug



On 12/06/2012 02:45 AM, Julia Foecker wrote:
 thanks.
 attached the info file.

 When I run the surf-sess command after that, it shows the functional on a
 surface (see attached but the values at the occip regions show inf. (see
 figure 1 attached).
 Moreover, when I try to load the occipital patch it shows me the attached file
 (fig.3) and I cannot use the command - configure - overlay to change
 settings.

 I have used fake ecc. runs (I have recorded only polar runs).

 Would you have any further suggestions?
 Thanks,
 Julia

 On Wed, 05 Dec 2012 17:03:31 -0500 Douglas N Greve gr...@nmr.mgh.harvard.edu
 wrote

 It should automatically detect that this was a retinotopy analysis and
 then load the polar and eccen. Was this configured as a retinotopy
 analysis? Can you send me the

 $ANALYSIS_PHASE/analysis.info file?

 doug



 On 12/05/2012 04:12 PM, Julia Foecker wrote:
 Hi Doug,

 I tried now several ways to get the maps on the surface:

 1. When I am deleting -retinotopy flag and type in:


 tksurfer-sess -debug -s $SESSIONNAME -hemi lh -d $SESSIONDIRECTORY
 -analysis $ANALYSIS_PHASE
 I got the message:no contrast has been specified

 (I do not have any contrasts in the analysis, just use polar angle maps)


 2. I tried to use the commands on the website you referred to, but I do not
 have -surface in the preproc-sess (see attached)
 The other commands depend on this preproc-sess command.


 3. I tried the following command
 paint-sess -s $SESSIONNAME -d $SESSIONDIRECTORY -analysis $ANALYSIS_PHASE


 and I got the errors listed below...

 I am not sure how to procede. Would you have any further suggestions?
 Many thanks,
 Julia

 Thanks,
 Julia



 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: 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] mri_glmfit-sim for interhemispheric comparison

2012-12-06 Thread Douglas N Greve
Shige, it is looking for tables of cluster p-values (the csd files). 
When you followed the wiki instructions, did you tell it to use 
fsaverage_sym as the target subject? You must have used a subject called 
average.

doug


On 12/06/2012 11:53 AM, Shigetoshi Takaya wrote:

 Hi Doug,

 I did surface-based inter-hemispheric comparison.

 I used an arbitrary surface data (.mgz) resampled from a volume data 
 (.nii), otherwise I follow the instruction.

 http://surfer.nmr.mgh.harvard.edu/fswiki/Xhemi

 I got a good result for mri_glmfit. But when I run mri_glmfit-sim, the 
 following error messeage popped up.

 ERROR: cannot find

 $FRESURFER_HOME/average/mult-comp-cor/fsaverage_sym/lh/cortex/fwhm00/abs/th20/mc-z.csd

 I did not find “fwhm00”anywhere in the downloaded file 
 “mult-comp-cor”, although I found fwhm01-30 directories. Am I missing 
 somethine?

 Thank you very much in advance,

 Shige


-- 
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: 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] Running recon-all on a series of scans

2012-12-06 Thread Douglas N Greve
Hi Natasha, yes, you have to run recon-all separately for each scan.
doug


On 12/06/2012 11:14 AM, Natasha Jawa wrote:
 Hi,

 Is it possible to run recon-all on a series of scans?

 I have multiple scans that I want to process longitudinally. The .nii 
 files have all been converted to .mgz files and labelled sequentially 
 (i.e., 001.mgz, 002.mgz, etc.) in 
 /Applications/freesurfer/subjects/subjid/mri. I've tried running 
 recon-all on this whole folder with the command line: recon-all 
 -subjid subjid -all, but it does not execute properly.

 Do I have to run each of these scans separately using recon-all (i.e., 
 do I need to use a separate terminal for each scan)?

 Thank you in advance for your time and help.


 ___
 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: 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] image flip after use of mri_vol2surf/mri_surf2vol

2012-12-06 Thread Douglas N Greve
Hi Hubert,
The physical side of the image in fslview is not indicative of the 
actual side. You have to look at the little letters on the side to see 
what side it is actually on. When you do this, do you see an R or an L? 
BTW, you might want to use mris_volsmooth which was written to do this 
kind of thing. Also, I would not use the .w file format. That format is 
pretty old and does not support multiple frames. Just use mgh format.

doug


On 12/05/2012 05:40 PM, Fonteijn, H.M.J. (H.) wrote:
 Hello,

 I'm relatively new to Freesurfer so chances are that this is a pretty basic 
 error on my side but here goes anyhow.
 I'm trying to use mri_vol2surf for surface-based smoothing of functional MRI 
 data. I would then like to extract time courses from the surface with spm 
 functions by converting the surface to a volume again with mri_surf2vol.

 Specifically the commands I'm using are:
 bbregister --s subject0016 --mov volume0001.nii.gz --reg epi2T1.dat 
 --init-spm --bold
 mri_vol2surf --mov volume0001.nii.gz --reg epi2T1.dat --surf-fwhm 8 --hemi lh 
 --projdist-avg 0 1 0.1 --o ./volume0001Surf_lh.w --out_type paint
 mri_surf2vol --surfval volume0001Surf_lh.w paint --hemi lh --projfrac 0.5 
 --reg epi2T1.dat --o volume0001Surf2Vol_lh.nii --template volume0001.nii.gz

 Registration looks allright with tkregister2. I'm only using one volume 
 (volume0001.nii.gz) to test this set of commands. However if I now view 
 volume0001Surf2Vol_lh.nii in fslview, it shows the hemisphere on the right. 
 I'm pretty sure that this is actually the left hemisphere but now flipped. I 
 wonder how this can be solved.

 All the best,
 Hubert
 ___
 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: 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.



[Freesurfer] how is fsnr computed?

2012-12-06 Thread Alex Kell
freesurfers,

i've been using my own scripts to compute tSNR for data i was running
through FSL, but i'm now running the data through freesurfer and i wanted
to better understand what the fsnr volumes spit out by selxavg3-sess are.
 i poked around the wiki and mailing archives and couldn't find answers to
the following questions:

1. how is fsnr computed?  tsnr is
mean_of_vox_time_course/std_of_vox_time_course -- is fsnr the same
thing with a different name?
2. what kind of preprocessing is done on the data before fsnr is computed?
 since freesurfer removes linear trends at the modeling stage, not the
preprocessing stage, are linear trends removed from the data going into
fsnr calculations?  is anything else regressed out before fsnr is computed
(e.g., other nuisance regressors)?
3. what's the difference between raw.fsnr.nii.gz, fsnr.nii.gz, and
fsnr2.nii.gz?
4. is fsnr.dat the mean in the whole brain mask (i.e., gm and wm)?

separately, random other question: what are the h.dat, h.nii.gz, and
h-offset.nii.gz file/volumes?

thanks in advance!


alex kell
___
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] how is fsnr computed?

2012-12-06 Thread Douglas N Greve

Hi Alex,

On 12/06/2012 12:21 PM, Alex Kell wrote:
 freesurfers,

 i've been using my own scripts to compute tSNR for data i was running 
 through FSL, but i'm now running the data through freesurfer and i 
 wanted to better understand what the fsnr volumes spit out by 
 selxavg3-sess are.  i poked around the wiki and mailing archives and 
 couldn't find answers to the following questions:

 1. how is fsnr computed?  tsnr is 
 mean_of_vox_time_course/std_of_vox_time_course -- is fsnr the same 
 thing with a different name?
Pretty close, though maybe a little different. It is the 
offset/std_of_residuals. This all happens after the model is fit. The 
offset here is close to the mean but technically it is the regression 
coefficient of the regressor of all 1s. After the full model is fit, the 
estimated time course is subtracted from the actual time course to give 
the residuals. So this is the Function SNR after removing task signal 
and nuisance regressors.

 2. what kind of preprocessing is done on the data before fsnr is 
 computed?  since freesurfer removes linear trends at the modeling 
 stage, not the preprocessing stage, are linear trends removed from the 
 data going into fsnr calculations?  is anything else regressed out 
 before fsnr is computed (e.g., other nuisance regressors)?
The full model is regressed out.
 3. what's the difference between raw.fsnr.nii.gz, fsnr.nii.gz, and 
 fsnr2.nii.gz?
The raw fsnr does not regress out anything just mean/std
 4. is fsnr.dat the mean in the whole brain mask (i.e., gm and wm)?
Yes

 separately, random other question: what are the h.dat, h.nii.gz, and 
 h-offset.nii.gz file/volumes?
these are somewhat redundant with the beta volume. In the pre-5.0 
version, these were the only files produced. They are created for 
compatibility with some of the older tools.

doug

 thanks in advance!


 alex kell






 ___
 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: 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] mri_glmfit-sim for interhemispheric comparison

2012-12-06 Thread Shigetoshi Takaya
Thanks for your reply, Doug

After inter-hemispheric registration onto fsaverage_sym using surfreg, I did
not use mris_preproc in my analysis because of the following two reasons:
(i) I thought I can't use --meas because the input is an arbitrary surface
data.
(ii) I don't want to use --paired-diff because I don't want the input
pruned before taking the difference.

Instead, I took the following steps:
(1) resample the data onto fsaverage_sym using mri_surf2surf
(2) take the difference in each subject using fscalc
 $fscalc lh.lh_subj1.mgz -sub lh.rh_subj1.mgz --o lh.lh-rh_subj1.mgz
(3) concatenate the subjects together
 $mri_concat lh-rh_subj1 lh-rh_subj2  --o 
(4) smooth (mris_fwhm) and analyze (mri_glmfit).

Are these steps not good for mri_glmfit-sim?


Best,
Shige


-Original Message-
From: Douglas N Greve [mailto:gr...@nmr.mgh.harvard.edu] 
Sent: Thursday, December 06, 2012 11:59 AM
To: Shigetoshi Takaya
Cc: freesurfer@nmr.mgh.harvard.edu
Subject: Re: mri_glmfit-sim for interhemispheric comparison

Shige, it is looking for tables of cluster p-values (the csd files). 
When you followed the wiki instructions, did you tell it to use
fsaverage_sym as the target subject? You must have used a subject called
average.

doug


On 12/06/2012 11:53 AM, Shigetoshi Takaya wrote:

 Hi Doug,

 I did surface-based inter-hemispheric comparison.

 I used an arbitrary surface data (.mgz) resampled from a volume data 
 (.nii), otherwise I follow the instruction.

 http://surfer.nmr.mgh.harvard.edu/fswiki/Xhemi

 I got a good result for mri_glmfit. But when I run mri_glmfit-sim, the 
 following error messeage popped up.

 ERROR: cannot find

 $FRESURFER_HOME/average/mult-comp-cor/fsaverage_sym/lh/cortex/fwhm00/a
 bs/th20/mc-z.csd

 I did not find fwhm00anywhere in the downloaded file 
 mult-comp-cor, although I found fwhm01-30 directories. Am I missing 
 somethine?

 Thank you very much in advance,

 Shige


--
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: 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] question retinotopic mapping

2012-12-06 Thread Douglas N Greve


The problem is that you have a version 4 analysis that you are trying to 
view with version 5 tools. To use version 5 visualization, you'll need 
to remake the analysis in version 5 and then reanalyze. Otherwise, 
you'll have to use the version 4 stream (instructions attached). It is 
somewhat difficult for me to support the version 4 stream because it is 
so old.


doug



On 12/06/2012 03:27 PM, Julia Foecker wrote:
 I have the two versions 4 and 5 , but I am receiving the same error 
messages with 5.1

For example when I type in preproc-see there is no -surface as well.
Isn't there any other possibility to solve that issue?

It may have also sth. to do with the computer. I have a new Mac, not 
sure if this may be the reason.
As I said, I do not think this is due to the version...I just tried 
that and similar requirements are missing when I am doing that with 5.1


Thanks again for further advices,
Julia



On 12/6/12 11:56 AM, Douglas N Greve wrote:
Julia, what version of FS are you using? It looks like pre-5.0. Can 
you upgrade to 5.1? There were a lot of changes in going from 4 to 5, 
and it is becoming increasingly hard to support version 4.


doug



On 12/06/2012 02:45 AM, Julia Foecker wrote:

thanks.
attached the info file.

When I run the surf-sess command after that, it shows the functional 
on a
surface (see attached but the values at the occip regions show 
inf. (see

figure 1 attached).
Moreover, when I try to load the occipital patch it shows me the 
attached file

(fig.3) and I cannot use the command - configure - overlay to change
settings.

I have used fake ecc. runs (I have recorded only polar runs).

Would you have any further suggestions?
Thanks,
Julia

On Wed, 05 Dec 2012 17:03:31 -0500 Douglas N Greve 
gr...@nmr.mgh.harvard.edu

wrote


It should automatically detect that this was a retinotopy analysis and
then load the polar and eccen. Was this configured as a retinotopy
analysis? Can you send me the

$ANALYSIS_PHASE/analysis.info file?

doug



On 12/05/2012 04:12 PM, Julia Foecker wrote:

Hi Doug,

I tried now several ways to get the maps on the surface:

1. When I am deleting -retinotopy flag and type in:



tksurfer-sess -debug -s $SESSIONNAME -hemi lh -d $SESSIONDIRECTORY
-analysis $ANALYSIS_PHASE

I got the message:no contrast has been specified

(I do not have any contrasts in the analysis, just use polar angle 
maps)



2. I tried to use the commands on the website you referred to, but 
I do not

have -surface in the preproc-sess (see attached)
The other commands depend on this preproc-sess command.


3. I tried the following command
paint-sess -s $SESSIONNAME -d $SESSIONDIRECTORY -analysis 
$ANALYSIS_PHASE



and I got the errors listed below...

I am not sure how to procede. Would you have any further suggestions?
Many thanks,
Julia

Thanks,
Julia




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: www.nmr.mgh.harvard.edu/facility/filedrop/index.html
Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/

Retinotopy analysis in FS-FAST


For each session, create retinotopy paradigm files in each of the run
directories.  These paradigm files are different than an event-related
or block paradigm (which list which stimulus was presented when).  A
retinotopy paradigm file has information about whether the run was an
eccentricity or polar stimulus and in what direction the stimulus was
presented.

For polar, the direction is indicates whether the spoke was traveling
clockwise or counter-clockwise.  For eccen, the direction is indicates
whether the ring was expanding or contracting.  The definition of
what's positive and what's negative is arbitrary, though it must be
consistent.  If you don't have both directions, just use positive.

For example, if there were four runs (001, 002, 003, 004), two eccen
and two polar, both in the positive and negative directions.  Create a
file (eg, rtopy.par) in each run.  Assuming run 001 was eccen in the
negative direction, then the rtopy.par for run 001 would look like:

cut here 
stimtype  eccen
direction neg
cut here 

If needed, create a run-list file with the all retinotopy runs
(regardless of whether it was eccen or polar).

Create the analysis:

mkanalysis-sess \
 -a rtopy   \
 -TR 2   \
 -designtype retinotopy  \
 -paradigm rtopy.par  \
 -funcstem fmcsm5  \
 -ncycles 8


Preprocess
  preproc-sess -s avdk -fwhm 8

Run the 

[Freesurfer] update mri_glmfit

2012-12-06 Thread Knut J Bjuland
Hi

I saw an updated version of mri_glmfit in 
ftp://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/misc/linux-centos4_x86_64/.
 

Should I update this file in my freesurfer installation.
What do this fix? Is is not in the release notes?



Knut J
___
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] How can I get 300 dpi resolution or about when saving tiff files in tksurfer?

2012-12-06 Thread Knut J Bjuland

   How can I get 300 dpi resolution or about when saving tiff files in 
tksurfer?
___
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] How can I get 300 dpi resolution or about when saving tiff files in tksurfer?

2012-12-06 Thread Bruce Fischl
Hi Knut
the tiffs written by tksurfer are 600x600 regardless of what DPI you set. 
You can change the dpi with convert (or photoshop), but it won't change the 
# of pixels.

cheers
Bruce


On Thu, 6 Dec 2012, Knut J Bjuland wrote:


   How can I get 300 dpi resolution or about when saving tiff files in
 tksurfer?
 ___
 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] How can I get 300 dpi resolution or about when saving tiff files in tksurfer?

2012-12-06 Thread Matt Glasser
Perhaps you can maximize the tksurfer window on a large monitor, take a
whole screen screenshot, and then in a photo editing program: decrease the
physical size of the image (in mm or inches) while not decreasing the
matrix size.  You can do this in photoshop in Image  Image Size  And
then change the document size until the resolution is 300.  This will
increase the DPI to make nice figures.  What Bruce suggests will just
upsample the image (without adding detail), which is not what journals
have in mind when they ask for 300dpi figures.  Keep in mind that the
document size is the printable size, so your image will get smaller on the
printed page when you do this.  Often, figures have multiple panels and if
you take each panel as a full screen image on a large monitor and then
reduce the size you will have more than 300dpi to spare in the end result.
 

Peace,

Matt.

On 12/6/12 3:22 PM, Bruce Fischl fis...@nmr.mgh.harvard.edu wrote:

Hi Knut
the tiffs written by tksurfer are 600x600 regardless of what DPI you set.
You can change the dpi with convert (or photoshop), but it won't change
the 
# of pixels.

cheers
Bruce


On Thu, 6 Dec 2012, Knut J Bjuland wrote:


   How can I get 300 dpi resolution or about when saving tiff files in
 tksurfer?
 ___
 Freesurfer mailing list
 Freesurfer@nmr.mgh.harvard.edu
 https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer



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


The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in
error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.



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


Re: [Freesurfer] Longitudinal analysis - contrast

2012-12-06 Thread Alex Hanganu

Hello Martin,

Thanks for your confirmation. I downloaded the last version of 
FreeSurfer: the dev5-20120624, from the ..fswiki/LMEModels page, but 
there is the old mris_preproc, so I will use the fsgd file.


Thanks for pointing out about the long.base - files!! That was a mistake 
of mine. And thanks for the shell command line !
So the fsgd file was created /only/ with long subjects, then I created 
the lh.thickness_sm10.mgh file and went further ! OK.

===


Hi Jorge,

Thanks for showing clearly the steps ! Everything went fine. The X 
contains those columns as you said.

our stats command is:

/stats = lme_mass_fit_vw(X,1,Y,144,cortex);

/where 144 is the 2*ones. We have 36 subjects and 2 time points, so we 
have 72 ones * 2 - 144. (but I also tried with 72, 36, 2)


Unfortunately, there is again an error:

/File: lme_mass_fit.m Line: 162 Column: 14//
//The variable stats in a parfor cannot be classified.
Error in == lme_mass_fit_vw at 73
[stats1,st1] = lme_mass_fit(X,[],Xrows,Zcols,Y,ni,prs,e);
/
Also when applying:
/[M,Y,144] = sortData(M,1,Y,sID);
/there is an error:/An array for multiple LHS assignment cannot contain 
numeric value.


/Our M contains: 72x2 double value
The X: 72x4 double value
but the sID contains: 73x1 cell

so we thought that might be the problem and we removed the cell sID , 
and we got and sID: 72x1 cell. The error persisted.


did we miss something ?

Thank you !

Sincerely,
Alex.





Le 06/12/2012 11:15 AM, Martin Reuter a écrit :

Yes,

in 5.2 there should be the two new options --qdec and --qdec-long

to allow passing qdec tables both in the regular cross sectional and in
the longitudinal format in addition to the existing other ways of
passing subjects lists (--s or --fsgd or --f ).

Now care needs to be taken in the longitudinal setting. What you want is
to get the files (e.g. thickness) from the *.long.base directories
into the target (e.g fsaverage space). Not from the cross sectional
directories!

For this you will be able to use the longitudinal qdec file (with a
column of 'fsid' and 'fsid-base' to group time points into subjects, see
wiki).

In 5.1 you should do the following:
create a text file with each longitudinal id (containing
the .long.base ) per line and pass it using the --f flag.
So in the example below you'd write:
002.long.002_base
003.long.003_base
003_m6.long.003_base

You can use a simple shell command to get such a list from a
longitudinal qdec file:
cat long.qdec.table.txt | awk '{if ($1 != fsid  substr($1,0,1) !=
#) printf(%s.long.%s\n, $1, $2)}'  outsubjectsfile.txt

Then preproc will do its job. The order of subjects needs to be
identical to the qdec file that you use to run the LME matlab tools to
ensure thickenss maps are stacked in the same order as you pass the
covariates.

Best, Martin



On Thu, 2012-12-06 at 04:27 +, jorge luis wrote:

Hi Alex


I think that Martin added the flag --qdec to mris_preproc for version
5.2. Martin, could you confirm this please?


The code for building the study design matrix X that is in the wiki is
just an example of how lme tools can be used for that purpose but the
actual instance of your code will depend on your particular Qdec
table. For instance, usually, Freesurfer's longitudinal Qdec tables
are of the form:


fsidfsid-base  sIDtime   group...
002002_base 0020 0
003003_base0030 1
003_m6003_base0030.56   1
003_m12  003_base0031.121
003_m24  003_base0032.2  1
005005_base00500
005_m6005_base0050.45   0
005_m12  005_base 0051.2 0


were fsid is the Freesurfer's ID, fsid-base is the name of the
subject's specific template, sID is the subject-specific ID uniquely
identifying each subject, time is the time covariate and group is
the group membership covariate (there can be more covariates of
course). I suppose that you processed your longitudinal MRI scans
using a Qdec table similar to that.


You can read that Qdec table into Matlab:


Qdec = fReadQdec('qdec.table.dat');


Now you need to build your numeric design matrix X from the cell
string array Qdec to represent a specific longitudinal design. Here
you don't need the columns fsid and fsid-base in Qdec so you simply
remove them:


Qdec = rmQdecCol(Qdec,1);
Qdec = rmQdecCol(Qdec,1);


The you can grab the subject-specific ID:


sID = Qdec(:,1);


and then remove that column:


Qdec = rmQdecCol(Qdec,1);


You can now convert your cell string array Qdec to a numeric matrix:


M = Qdec2num(Qdec);


Here, the data in M is already ordered according to time for each
subject, otherwise, you can order the data using:


[M,Y,ni] = sortData(M,1,Y,sID);


where Y is the cortical thickness data matrix that you read with
fs_read_Y. Please take a look at the help of sortData. Note that
matrix M only have two columns and you need to build your design
matrix from it. In your case it 

Re: [Freesurfer] How can I get 300 dpi resolution or about when saving tiff files in tksurfer?

2012-12-06 Thread Martin Luessi
If you want to get a figure with arbitrarily high resolution regardless 
of the screen size, have a look at PySurfer*. It's not an official part 
of freesurfer but can display many of the freesurfer files. It can 
produce high resolution figures by moving the camera, taking screenshots 
and then assembling them.

*http://pysurfer.github.com/index.html

Best,

Martin

On 12/06/12 16:40, Matt Glasser wrote:
 Perhaps you can maximize the tksurfer window on a large monitor, take a
 whole screen screenshot, and then in a photo editing program: decrease the
 physical size of the image (in mm or inches) while not decreasing the
 matrix size.  You can do this in photoshop in Image  Image Size  And
 then change the document size until the resolution is 300.  This will
 increase the DPI to make nice figures.  What Bruce suggests will just
 upsample the image (without adding detail), which is not what journals
 have in mind when they ask for 300dpi figures.  Keep in mind that the
 document size is the printable size, so your image will get smaller on the
 printed page when you do this.  Often, figures have multiple panels and if
 you take each panel as a full screen image on a large monitor and then
 reduce the size you will have more than 300dpi to spare in the end result.


 Peace,

 Matt.

 On 12/6/12 3:22 PM, Bruce Fischl fis...@nmr.mgh.harvard.edu wrote:

 Hi Knut
 the tiffs written by tksurfer are 600x600 regardless of what DPI you set.
 You can change the dpi with convert (or photoshop), but it won't change
 the
 # of pixels.

 cheers
 Bruce


 On Thu, 6 Dec 2012, Knut J Bjuland wrote:


How can I get 300 dpi resolution or about when saving tiff files in
 tksurfer?
 ___
 Freesurfer mailing list
 Freesurfer@nmr.mgh.harvard.edu
 https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer



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


 The information in this e-mail is intended only for the person to whom it
 is
 addressed. If you believe this e-mail was sent to you in error and the
 e-mail
 contains patient information, please contact the Partners Compliance
 HelpLine at
 http://www.partners.org/complianceline . If the e-mail was sent to you in
 error
 but does not contain patient information, please contact the sender and
 properly
 dispose of the e-mail.



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




-- 
Martin Luessi, Ph.D.

Research Fellow

Department of Radiology
Athinoula A. Martinos Center for Biomedical Imaging
Massachusetts General Hospital
Harvard Medical School
149 13th Street
Charlestown, MA 02129

Fax: +1 617 726-7422
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


[Freesurfer] winkler surf data with qdec ?

2012-12-06 Thread Gregory Kirk
Hi ,

I have winkler variety surface area data that is already smoothed and
converted to vertex wise data on my average subject. Each subject has
a file rh.ico7.fwhm10.mgh, lh... and Doug gave me a way with mri_concat
to assemble the data into a single file so i can run command line mri_glmfit
type analysis and that worked out fine.

I would like if i can to use qdec so our non command line unix oriented
postdoc could easily run a lot of models of interest.

the LGI page says you can do 

recon-all -s my_subject_id -qcache -measure pial_lgi

and then add a file .Qdecrc
with MEASURE1 = pial_lgi

but recon-all -qcache will do smoothing and
smoothing has already been done by his fancy specially designed method
for the surface interpolated data and also my data is in .mgh format
and not curv format like thickness or lgi.

is there a way i can cook this goose ?

thanks

greg
___
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] Longitudinal analysis - contrast

2012-12-06 Thread jorge luis
Hi Alex
 
Sorry, my bad. You are right. To grab the subjects'ID the correct code is:
 
sID = Qdec(2:end,1); 
 
I'm going to fix that in the wiki. The new error is due to the numeric value on 
the left hand side of
 
[M,Y,144] = sortData(M,1,Y,sID);

You cannot assign any value to 144. Just change that code by this:
 [M,Y,ni] = sortData(M,1,Y,sID);
 
and use ni instead of 144 everywhere.  Note that ni must be a vector of the 
same size as the number of subjects in your study (36), not a single numeric 
value. 
 
Best
-Jorge
 



 De: Alex Hanganu al.hang...@yahoo.ca
Para: Martin Reuter mreu...@nmr.mgh.harvard.edu 
CC: FS Mailing List Freesurfer@nmr.mgh.harvard.edu; Jorge Luis Bernal-Rusiel 
jbernal0...@yahoo.es 
Enviado: Jueves 6 de diciembre de 2012 16:45
Asunto: Re: Re: [Freesurfer] Longitudinal analysis - contrast
  

Hello Martin,

Thanks for your confirmation. I downloaded the last version of
  FreeSurfer: the dev5-20120624, from the ..fswiki/LMEModels page,
  but there is the old mris_preproc, so I will use the fsgd file.

Thanks for pointing out about the long.base - files!! That was a
  mistake of mine. And thanks for the shell command line !
So the fsgd file was created only with long subjects, then I created the 
lh.thickness_sm10.mgh file and went further ! OK.
===


Hi Jorge,

Thanks for showing clearly the steps ! Everything went fine. The X
  contains those columns as you said.
our stats command is:

stats = lme_mass_fit_vw(X,1,Y,144,cortex);

where 144 is the 2*ones. We have 36 subjects and 2 time points, so we have 
72 ones * 2 - 144. (but I also tried with 72, 36, 2)

Unfortunately, there is again an error:

File: lme_mass_fit.m Line: 162 Column: 14
The variable stats in a parfor cannot be classified.
Error in == lme_mass_fit_vw at 73
[stats1,st1] = lme_mass_fit(X,[],Xrows,Zcols,Y,ni,prs,e);

Also when applying:
[M,Y,144] = sortData(M,1,Y,sID);
there is an error:An array for multiple LHS assignment cannot contain numeric 
value.

Our M contains: 72x2 double value
The X: 72x4 double value
but the sID contains: 73x1 cell

so we thought that might be the problem and we removed the cell
  sID , and we got and sID: 72x1 cell. The error
  persisted.

did we miss something ?

Thank you !

Sincerely,
Alex.





Le 06/12/2012 11:15 AM, Martin Reuter a écrit :
 
Yes,  in 5.2 there should be the two new options --qdec and --qdec-long to 
allow passing qdec tables both in the regular cross sectional and in
the longitudinal format in addition to the existing other ways of
passing subjects lists (--s or --fsgd or --f ). Now care needs to be taken in 
the longitudinal setting. What you want is
to get the files (e.g. thickness) from the *.long.base directories
into the target (e.g fsaverage space). Not from the cross sectional
directories! For this you will be able to use the longitudinal qdec file (with a
column of 'fsid' and 'fsid-base' to group time points into subjects, see
wiki). In 5.1 you should do the following:
create a text file with each longitudinal id (containing
the .long.base ) per line and pass it using the --f flag.
So in the example below you'd write:
002.long.002_base
003.long.003_base
003_m6.long.003_base You can use a simple shell command to get such a list from 
a
longitudinal qdec file:
cat long.qdec.table.txt | awk '{if ($1 != fsid  substr($1,0,1) !=
#) printf(%s.long.%s\n, $1, $2)}'  outsubjectsfile.txt Then preproc will 
do its job. The order of subjects needs to be
identical to the qdec file that you use to run the LME matlab tools to
ensure thickenss maps are stacked in the same order as you pass the
covariates. Best, Martin On Thu, 2012-12-06 at 04:27 +, jorge luis wrote:  
Hi Alex I think that Martin added the flag --qdec to mris_preproc for version
5.2. Martin, could you confirm this please? The code for building the study 
design matrix X that is in the wiki is
just an example of how lme tools can be used for that purpose but the
actual instance of your code will depend on your particular Qdec
table. For instance, usually, Freesurfer's longitudinal Qdec tables
are of the form: fsidfsid-base  sIDtime   group...
002002_base 0020 0
003003_base0030 1
003_m6003_base0030.56   1 
003_m12  003_base0031.121
003_m24  003_base0032.2  1
005005_base00500
005_m6005_base0050.45   0
005_m12  005_base 0051.2 0 were “fsid” is the Freesurfer's ID, 
“fsid-base” is the name of the
subject's specific template, sID is the subject-specific ID uniquely
identifying each subject, “time” is the time covariate and group is
the group membership covariate (there can be more covariates of
course). I suppose that you processed your longitudinal MRI scans
using a Qdec table similar to that.  You can read that Qdec table into Matlab: 
Qdec = 

[Freesurfer] De-trending resting state data

2012-12-06 Thread Chris McNorgan
I'm working with raw timeseries waveform data from a resting state 
dataset. There's one run per participant, so no between-run 
normalization is required. With Doug's help, I have mastered extracting 
the timeseries information from individual ROIs in surface space. The 
timeseries data is the product of the preproc-sess script, to which I 
additionally added the -inorm parameter to extract the mean timeseries 
for the entire volume. One concern I had was that correlations between 
timeseries from different ROIs might be artificially inflated by scanner 
drift. For example, if the overall signal increases or decreases as a 
function of time over the course of the run or fluctuates periodically, 
then for any two regions, their signals will go up or down together as a 
result. This should in turn make the timeseries from these two regions 
more correlated. I have no strong evidence that scanner drift is a 
particular problem in my dataset, but it seems likely enough in a 6 
minute run that I want to mitigate the problem.

I can't really put these data through selxavg, as I do not have a model 
to fit for resting state data, and in any case would like to work with 
the timeseries itself, rather than residuals or any other by-product of 
an HRF model. I was wondering if simply subtracting the global mean 
signal waveform from each ROI waveform would be a reasonable strategy 
for removing drift, or if there are any standalone commands that are 
called by some of the super-scripts that I can use without carrying out 
a first level analysis.

Thanks,
Chris
___
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] How can I get 300 dpi resolution or about when saving tiff files in tksurfer?

2012-12-06 Thread Knut J Bjuland
Hi Bruce,
Do you upsample the tiffs from tksurfer when making image for 
publications? Or do you use another program in FreeSurfer suite?


Knut J


On 12/06/2012 10:22 PM, Bruce Fischl wrote:
 Hi Knut
 the tiffs written by tksurfer are 600x600 regardless of what DPI you 
 set. You can change the dpi with convert (or photoshop), but it won't 
 change the # of pixels.

 cheers
 Bruce


 On Thu, 6 Dec 2012, Knut J Bjuland wrote:


   How can I get 300 dpi resolution or about when saving tiff files in
 tksurfer?
 ___
 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