Re: mris_surfglm

2002-10-10 Thread Doug Greve


Hi Darren,

the ico and average7 are about the same computationally. However, it is
more convenient to use average7 it has a surface that you can directly
render the results on. With ico, you'd still have to run mri_surf2surf
to convert it to another surface.

I'm not sure what you're trying to do in terms of the surface
registration...

doug


Darren Weber wrote:
 
 Dear Doug et al,
 
 surfglm looks good.  I have processed 10 controls and 8 patients such that
 each surface contains a whole cortical surface, without the usual split
 through the corpus callosum.  How would I use the surface registration
 process?  Should I use 'ico' as the average or can I use one of the
 subjects?
 
 Take care, Darren
 
 --
 Darren Weber, PhD Student
 Cognitive Neuroscience, School of Psychology
 Flinders University of SA, GPO Box 2100, Adelaide, SA 5001, Aust.
 Ph:  (61 8) 8201 3889, Fax: (61 8) 8201 3877
 http://203.3.164.46/~dlw/homepages/index.html

-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
[EMAIL PROTECTED]
Phone Number: 617-724-2358 
Fax: 617-726-7422



Re: mri_surfglm!!!

2002-10-02 Thread Doug Greve


Hi Brian,

I just finished that program a few weeks ago. This program allows you to
do cross-subject/cross-group analysis of surface data by solving a GLM
with ordinary least-squares (OLS). It also allows you to pre-smooth the
surface values as well as include covariates (eg, age, gender, etc).
Look at the help page (using mri_surfglm --help) for more info. 

Since it just uses OLS, it cannot do more sophisticated modeling of the
variances (eg, modeling different groups with different variances),
though we hope to integrate it with FLAME, a program that will be in
FSL's next release.

Those who do not have mri_surfglm in their bin directory can download it
with the most recent snapshot from:

ftp://surfer.nmr.mgh.harvard.edu/pub/dist/snapshots/

Let me know how it goes.

doug


Brian Schweinsburg wrote:
 
 I was able to answer my own question regarding thickness parameter maps
 from the other day by poking through the Linux/bin directory. Looking
 forward to using it.
 
 brian

-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
[EMAIL PROTECTED]
Phone Number: 617-724-2358 
Fax: 617-726-7422



Re: mri_surfglm!!!

2002-10-02 Thread Doug Greve


Hi Brian,

you probably need to specify a target subject (--trgsubj). I've put a
newer version of mri_surfglm at
ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/FreeSurfer/. The
guts of it have not changed, but it does better command-line error
checking.

doug




Brian C. Schweinsburg wrote:
 
 Hi Doug,
 
 I was looking forward to a program like this. The help file is excellent! I
 used the info in it to run an analysis and everything ran okay except the
 very last part. It gave me an error message when the paint command was
 listed last (like the the gender-age example in the help file). It said
 something like it had no surface to paint to (I don't have the exact message
 because I am not in linux right now). So, I haven't seen the painted on
 results yet.
 
 thanks,
 brian
 
 - Original Message -
 From: Doug Greve [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, October 02, 2002 7:49 AM
 Subject: Re: mri_surfglm!!!
 
 
  Hi Brian,
 
  I just finished that program a few weeks ago. This program allows you to
  do cross-subject/cross-group analysis of surface data by solving a GLM
  with ordinary least-squares (OLS). It also allows you to pre-smooth the
  surface values as well as include covariates (eg, age, gender, etc).
  Look at the help page (using mri_surfglm --help) for more info.
 
  Since it just uses OLS, it cannot do more sophisticated modeling of the
  variances (eg, modeling different groups with different variances),
  though we hope to integrate it with FLAME, a program that will be in
  FSL's next release.
 
  Those who do not have mri_surfglm in their bin directory can download it
  with the most recent snapshot from:
 
  ftp://surfer.nmr.mgh.harvard.edu/pub/dist/snapshots/
 
  Let me know how it goes.
 
  doug
 
 
  Brian Schweinsburg wrote:
  
   I was able to answer my own question regarding thickness parameter maps
   from the other day by poking through the Linux/bin directory. Looking
   forward to using it.
  
   brian
 
  --
  Douglas N. Greve, Ph.D.
  MGH-NMR Center
  [EMAIL PROTECTED]
  Phone Number: 617-724-2358
  Fax: 617-726-7422
 

-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
[EMAIL PROTECTED]
Phone Number: 617-724-2358 
Fax: 617-726-7422



Re: spm_to_b

2002-08-01 Thread Doug Greve


Ah, that is a problem. The IRIX we use to build new binaries is down, so
I can't get a new version for you. One work-around (if you don't have a
Linux box handy) is to use matlab to read in as analyze and write out as
bfloat. If you have a version of FS-FAST (probably in
freesurfer_alpha/fsfast), use the fmri_svbfile function in the toolbox
to save a volume in bfloat format.

doug

Bradley Goodyear wrote:
 
 Thanks Doug.
 
 Those links don't seem to work. In any case, I am running Freesurfer on
 an SGI.
 
 -BRad
 
 On Wednesday, July 31, 2002, at 11:35 AM, Doug Greve wrote:
 
 
 
  Ah, I think you must have an old vesion. You can get a new Linux version
  of mri_convert from
 
  ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/FreeSurfer/
 
  Or an entirely new version of FreeSurfer from
 
  ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/FreeSurfer/fsa-20020724/
 
  maybe try the first first to make sure that's the problem. Copy
  mri_convert.linux into freesurfer_alpha/bin/Linux
 
  doug
 
 
 
  Bradley Goodyear wrote:
 
  unknown flag --in_nspmzeropad
 
  -Brad
 
  On Tuesday, July 30, 2002, at 03:51 PM, Doug Greve wrote:
 
 
 
  Try the following command-line:
 
  mri_convert --in_type spm --in_nspmzeropad 3 NS f_000.bshort
  --out_type
  bshort
 
  (This should also work for bfloat).
 
  doug
 
 
  Bradley Goodyear wrote:
 
  My files are NS_001.img, NS_002.img, ..., NS_209.img. Each contains
  12
  slices at 128x128.
 
  mri_convert --in_type spm --out_type bshort NS_001.img f.bshort
 
  The result is 12 bshort files, but only one time point per instead of
  209.
 
  I also tried combining all the .img files into one big spm files, but
  got the same result.
 
  using out_type as bfloat gives an error saying output type not
  supported
 
  -Brad
 
  --
  Douglas N. Greve, Ph.D.
  MGH-NMR Center
  [EMAIL PROTECTED]
  Phone Number: 617-724-2358
  Fax: 617-726-7422
 
  --
  Douglas N. Greve, Ph.D.
  MGH-NMR Center
  [EMAIL PROTECTED]
  Phone Number: 617-724-2358
  Fax: 617-726-7422

-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
[EMAIL PROTECTED]
Phone Number: 617-724-2358 
Fax: 617-726-7422



Re: spm_to_b

2002-07-31 Thread Doug Greve


Ah, I think you must have an old vesion. You can get a new Linux version
of mri_convert from

ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/FreeSurfer/

Or an entirely new version of FreeSurfer from

ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/FreeSurfer/fsa-20020724/

maybe try the first first to make sure that's the problem. Copy
mri_convert.linux into freesurfer_alpha/bin/Linux

doug



Bradley Goodyear wrote:
 
 unknown flag --in_nspmzeropad
 
 -Brad
 
 On Tuesday, July 30, 2002, at 03:51 PM, Doug Greve wrote:
 
 
 
  Try the following command-line:
 
  mri_convert --in_type spm --in_nspmzeropad 3 NS f_000.bshort --out_type
  bshort
 
  (This should also work for bfloat).
 
  doug
 
 
  Bradley Goodyear wrote:
 
  My files are NS_001.img, NS_002.img, ..., NS_209.img. Each contains 12
  slices at 128x128.
 
  mri_convert --in_type spm --out_type bshort NS_001.img f.bshort
 
  The result is 12 bshort files, but only one time point per instead of
  209.
 
  I also tried combining all the .img files into one big spm files, but
  got the same result.
 
  using out_type as bfloat gives an error saying output type not
  supported
 
  -Brad
 
  --
  Douglas N. Greve, Ph.D.
  MGH-NMR Center
  [EMAIL PROTECTED]
  Phone Number: 617-724-2358
  Fax: 617-726-7422

-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
[EMAIL PROTECTED]
Phone Number: 617-724-2358 
Fax: 617-726-7422



Re: spm_to_b

2002-07-26 Thread Doug Greve


Use mri_convert. Here's an example for an spm functional volume
spm001.img, spm002.img ...

mri_convert spm001.img --in_type spm spm_000.bfloat 

This should create the spm bfloat volume.

doug


Bradley Goodyear wrote:
 
 Which parameter from the .HDR file does spm_to_b use as the number of
 volumes (i.e., time points)?
 whenever I try running spm_to_b it only outputs 1 volumes per slice.
 
 -Brad

-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
[EMAIL PROTECTED]
Phone Number: 617-724-2358 
Fax: 617-726-7422



Re: Matlab window problems with FS-FAST

2002-07-16 Thread Doug Greve



Hi Nick,

what does the -tty do? Is that new to version 6? Will it work for
version 5?

doug


Nicholas Knouf wrote:
 
 Hi there,
 
 I've got a question, this time about FS-FAST (if this isn't the
 appropriate place to ask these questions, feel free to let me know).
 
 I'm running the latest version of the FS-FAST software (with fsfast
 directory fsfast-20020510).  When running commands that use Matlab (such
 as selxavg-sess), the script runs matlab and opens up a command window,
 instead of running within the terminal window.  I found that by modifying
 the script file to run $MATALB -tty instead of $MATLAB -display
 iconic, matlab ran as expected in the terminal window.  Unfortunately,
 there are a ton of scripts that I would have to change to get this to work
 correctly with my hack, and I'm sure that that is not the desired effect.
 What can I do to get matlab to start properly?
 
 I'm running matlab version 6.1.0.450 (R12.1) and the sawfish window
 manager on a modified version of RedHat linux, if that's of any help.
 
 Thanks for your help,
 
 Nick Knouf
 Lab Manager, Kanwisher Lab

-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
[EMAIL PROTECTED]
Phone Number: 617-724-2358 
Fax: 617-726-7422



Re: SPM and Freesurfer

2002-05-02 Thread Doug Greve


It looks like mri_convert cannot find information about the orientation
of the volume. The analyze format does not have fields in the header for
this information, but SPM usually adds a .mat file. It does not look
like fs_sub.img has a fs_sub.mat, so mri_convert is guessing
(incorrectly) what the direction cosines are.  

You can fix this in multiple ways:

(1) get the proper .mat file
(2) get a new copy of mri_convert from 
ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/FreeSurfer, and
re-run mri_convert specifying the direction cosines on the command-line
using the --in_X_direction, where X is i, j, or k corresponding to col,
row, and slice

doug


Felix Blankenburg wrote:
 
 Dear Bruce, Doug and Xiangchuan and others,
 
 First of all thank you very much for your help. The processing of the
 surfaces works now very well. But I got a few problems with the overlay of
 the SPM99 results. After conversion of the 'analyze' data (t-maps and epis)
 with mri_convert the bshort and bfloat images looked very warped. It seems
 that the program is not able to compute the correct dimensions i. e. does
 not read the header information's. After making a functional directory,
 creating the analyse.dat, register.dat in the image subdirectory and the SPM
 t-map (changing the write filtered to float type) it seems that the
 conversion of the functional data leads to the described problem. Enclosed
 is the log-file for the conversion of the data:
 
 mri_convert fs_sub.img sub --out_type bfloat
 
 reading from fs_sub.img...
 
 INFO: analyzeRead(): found 1 files for fs_sub.img
 
 INFO: analyzeRead(): min = 0, max = 4.3109
 
 TR=0.00, te=0.00, flip angle=0.00
 
 warning: volume may be incorrectly oriented
 
 warning: input volume axes are not orthogonal
 
 i_ras = (1, 1, 1)
 
 j_ras = (0, 0.5, 0)
 
 k_ras = (0, 0, 0.5)
 
 warning: output volume axes are not orthogonal
 
 i_ras = (1, 1, 1)
 
 j_ras = (0, 0.5, 0)
 
 k_ras = (0, 0, 0.5)
 
 writing to sub...
 
 INFO: bvolumeWrite: stem = sub
 
 Does anyone know the problem and have a solution for this or could help me
 with a step to step documentation how to overlay SPM results onto the brain
 surfaces. Thank you very much in advance,
 
 Felix
 
 Dr. med. Felix Blankenburg
 Dept. of Neurology
 Charité, Humboldt-University
 Schumannstr. 20/21
 10117 Berlin, Germany
 
 Phone: ++49-30-450 560 194
 Fax: ++49-30-450 560 952
 http://www.charite.de/ch/neuro/forschung/teams/klinisch/index.html

-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
[EMAIL PROTECTED]
Phone Number: 617-724-2358 
Fax: 617-726-7422



Re: off-by-1/2s...

2002-03-14 Thread Doug Greve


Ahh, if this is true, then there may be no inconsistency between
mri_tesselate and the other routines!


Bruce Fischl wrote:
 
 it's not just for historical reasons. The orig surface is generated by
 covering the faces of each white matter voxel (that doesn't neighbor white)
 with vertices, so their natural location is between slices.
 
 Bruce
 
 On Thu, 14 Mar 2002, Doug Greve
 wrote:
 
 
  Hi Blaise,
 
  the problem may be that the vertex is between slices. When you use the
  goto vertex option in tkmedit, the cursor will go to the closest point
  to that vertex. If the vertex is between slices, it won't interpolate.
  The RAS reported in the control panel will then be that of the cursor.
  For historical reasons, all the orig vertices are placed between slices
  (ie, they will all have 0.5 in the x,y, and z coords).
 
  doug
 
 
  Blaise YVERT wrote:
  
   I am refering to the Volume RAS prompted in tkmedit.
   Blaise.
  
   How are you measuring the RAS coords?
   
   doug
   
   Blaise YVERT wrote:
   
 Dear All,
   
 First of all, I'd like to thank the whole team of Harvard NMR center
 for making available freesurfer. Indeed, although this mailing list
 is mostly used to report bugs and problems, please know that fs is a
 great tool !
   
 Now, to follow up the discussion introduced by Al Kim, it seems that
 the coordinates in *.asc files are slightly shifted with respect to
 the RAS coordinates, namely :
   
 Xras = Xasc - 0.5
 Yras = Yasc + 0.5
 Zras = Zasc - 0.5
   
 Could anyone confirm this ?
   
 Best wishes,
 Blaise.
 --
   
 --
 INSERM U280
 151 Cours Albert Thomas,
 F-69424 Lyon cedex 03, France.
 Tel : +33 4 72 68 19 27
 Fax : +33 4 72 68 19 02
 URL : http://www.lyon151.inserm.fr/unites/280_tout.html
 --
   
   --
   Douglas N. Greve, Ph.D.
   MGH-NMR Center
   [EMAIL PROTECTED]
   Phone Number: 617-724-2358
   Fax: 617-726-7422
 
 

-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
[EMAIL PROTECTED]
Phone Number: 617-724-2358 
Fax: 617-726-7422



Re: mri_convert -- GET NEW VERSION!!

2001-11-01 Thread Doug Greve



Hi All,

thanks to Al's diligence, I have tracked down a bug in the most recent
version of mri_convert, the one that I mentioned a few weeks ago that
could be downloaded from 
ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/FreeSurfer.
There was a problem with the way it was reading the SPM mat file. This
does not apply to older versions, only the one that was on the FTP site
above. I have placed new Linux and SunOS versions at the FTP site with
which you should immediate replace the previous version.

let me know how it goes

doug



Albert Kim wrote:
 
 Dear all,
 
 I'm having trouble with the use of mri_convert to convert my SPM/Analyse
 structural volume to COR format.
 (mri_convert foo.img /Subjects/E12246/mri/orig/)
 The resulting orig image, when viewed in MEDIT, is flipped:
 the second volume index increases from posterior to anterior
 the third volume index increases from inferior to superior
 (i'm not sure whether the first index is flipped, bcs it is
 left-right)
 
 This problem does not occur when I use Setup Structural Scan
 Parameters from the GUI to read the iamge, and then CONVERT/AVERAGE.
 
 Does anybody know if there is a problem here?
 
 Here is a copy of the output from mri_convert
 
 mri_convert Subjects/E12246C/mri/orig/SPM/E12246_struct124O.img 
Subjects/E12246C/mri/orig/
 # mri_convert Subjects/E12246C/mri/orig/SPM/E12246_struct124O.img 
Subjects/E12246C/mri/orig/
 mri_convert
 Subjects/E12246C/mri/orig/SPM/E12246_struct124O.img
 Subjects/E12246C/mri/orig/
 reading from
 Subjects/E12246C/mri/orig/SPM/E12246_struct124O.img...
 INFO: analyzeRead(): found 1 files for
 Subjects/E12246C/mri/orig/SPM/E12246_struct124O.img
 INFO: analyzeRead(): min = 0, max = 258
 TR=0.00, te=0.00, flip angle=0.00
 warning: volume may be incorrectly oriented
 warning: input volume axes are not orthogonal
 i_ras = (1, 0.613839, 0.613839)
 j_ras = (0, 0, 1.16364)
 k_ras = (0, 1.16364, 0)
 changing data type...
 reslicing (interpolate)...
 writing to Subjects/E12246C/mri/orig/...
 
 Thanks
 Al Kim
 Department of Psychology
 University of Washington, Box 351525
 Seattle, WA. 98195, USA
 E-Mail:  [EMAIL PROTECTED];  Tel: (206)543-2395

-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
[EMAIL PROTECTED]
Phone Number: 617-724-2358 
Fax: 617-726-7422