[Freesurfer] nifti1Read(): unsupported slice timing pattern 5 -- mri_convert fix?

2015-10-23 Thread Alex Kell
Hi,

I'm analyzing data from a collaborator who used SPM to generate some
niftis, and freesurfer is unable to read these.  I get the following error:
nifti1Read(): unsupported slice timing pattern 5

Someone previously

had the same problem that I currently have, and Doug sent them a modified
version of mri_convert.

Could you send me the modified version of mri_convert?


Thanks,
Alex
___
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] fsfast: using an empirically derived HRF with mkanalysis-sess

2014-09-14 Thread Alex Kell
and one point of clarification: i only care about beta weights for each
condition of interest, so i don't care that -taskreg would only run an
F-test for significance maps and wouldn't give me t maps for each regressor
of interest.


thanks again,
alex

On Sun, Sep 14, 2014 at 1:55 PM, Alex Kell  wrote:

> hi freesurfers,
>
> i would like to use an empirically derived HRF with mkanalysis-sess.  i
> have derived the HRF i want [via an FIR model], but it's not obvious how i
> can use my custom HRF with mkanalysis-sess.
>
> one option, it seems, is to feed in my own regressors with the -taskreg
> flag and then not supply the model with any other regressors of interest.
>  i'd just convolve stick regressors that have the appropriate timing with
> my own HRF.  but this would only work if selxavg3-sess does NOT convolve
> task regressors with the HRF.
>
> so two questions:
>
> 1. is the -taskreg flag the best way to do this?  is there another, better
> way?
>
> 2. does selxavg3-sess convolve task regressors with the HRF?
>
>
> thanks,
> alex
>
>
___
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] fsfast: using an empirically derived HRF with mkanalysis-sess

2014-09-14 Thread Alex Kell
hi freesurfers,

i would like to use an empirically derived HRF with mkanalysis-sess.  i
have derived the HRF i want [via an FIR model], but it's not obvious how i
can use my custom HRF with mkanalysis-sess.

one option, it seems, is to feed in my own regressors with the -taskreg
flag and then not supply the model with any other regressors of interest.
 i'd just convolve stick regressors that have the appropriate timing with
my own HRF.  but this would only work if selxavg3-sess does NOT convolve
task regressors with the HRF.

so two questions:

1. is the -taskreg flag the best way to do this?  is there another, better
way?

2. does selxavg3-sess convolve task regressors with the HRF?


thanks,
alex
___
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] reading & writing surface files in python

2014-06-30 Thread Alex Kell
hi freesurfers,

i'm looking to read and write freesurfer surface files in python -- like
MRIread.m & MRIwrite.m but for surfaces and in python.  i'm happy to write
the code myself, but it seems like the kind of thing that has been done
before and i don't want to reinvent the wheel if i don't have to.

i poked around and found pyfsio, which reads but doesn't write surfaces.
 any suggestions?


thanks,
alex
___
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] segfault during rfx with mri_glmfit

2013-05-07 Thread Alex Kell
hi doug,

thanks for the quick response.

i got it to work -- apparently the 5.1.x developmental version i was using
had some problem in mri_glmfit.  when i switched to the stable 5.1 version
(build stamp: freesurfer-Linux-centos4_x86_64-stable-pub-v5.1.0) it ran
perfectly smoothly.

unfortunately, i'm not sure how useful it would be to others on this
listserv. :-)


alex



On Tue, May 7, 2013 at 2:06 PM, Douglas N Greve
wrote:

> Hi Alex, is it actually running out of memory? Otherwise, nothing comes
> to mind. If you tar up all the inputs and drop them at our file drop
> I'll take a look.
> doug
>
>
> On 05/07/2013 10:24 AM, Alex Kell wrote:
> > hi freesurfers,
> >
> > i am running into a segfault whenever i try to use mri_glmfit to run a
> > random effects analysis.  (this is in the volume, not on the surface.)
> >
> > here's my call:
> >
> > mri_glmfit  \
> >  --y $ces_fpath \
> >  --X $design_mat_fpath \
> >  --C $c1_fpath \
> >  --C $c2_fpath \
> >  --C $c3_fpath \
> >  --mask $mask_fpath \
> >  --glmdir $glmdir_fpath \
> >  --nii.gz
> >
> > i've tried a number of things to reduce the memory footprint of the call:
> > -- originally i was using WLS, but i was worried about the memory
> > demands of the cesvar, so i switched to OLS
> > -- i introduced a GM mask
> > -- i downsampled the ces and cesvar images (from 1 mm isotropic [cvs
> > space] to 2 mm isotropic)
> >
> > any thoughts on what could be going wrong here?
> >
> > thanks, guys!
> >
> >
> > alex
> >
> >
> > ps. below are my build stamp, my info dump from mri_glmfit, and an
> > example stderr & stdout.
> >
> > my fs build stamp:
> > freesurfer-Linux-centos4_x86_64-dev-20120104
> >
> >
> > the "all info" dump from mri_glmfit:
> > ProgramName: mri_glmfit  ProgramArguments: --all-info  ProgramVersion:
> > $Name:  $  TimeStamp: 2013/05/07-14:15:28-GMT  BuildTimeStamp: Jan  4
> > 2012 05:11:02  CVS: $Id: mri_glmfit.c,v 1.209 2011/12/16 19:02:28
> > greve Exp $  User: alexkell  Machine: ba7  Platform: Linux
> >  PlatformVersion: 2.6.38-16-generic  CompilerName: GCC
> >  CompilerVersion: 30400
> >
> >
> > an example stderr and stdout:
> >
> > $Id: mri_glmfit.c,v 1.209 2011/12/16 19:02:28 greve Exp $
> > cwd /mindhive/nklab2/ellison_on_nklab2/adultasd/vss/4_rfx/glm_output/F-O
> > cmdline mri_glmfit --y
> >
> /mindhive/nklab/projects/ellison/adultasd/vss/4_rfx/glm_input//cvs.all.ces.F-O.runs_1234.2x2x2.nii.gz
> > --wls
> >
> /mindhive/nklab/projects/ellison/adultasd/vss/4_rfx/glm_input//cvs.all.cesvar.F-O.runs_1234.2x2x2.nii.gz
> > --X
> >
> /mindhive/nklab/projects/ellison/adultasd/vss/4_rfx/glm_input//design_matrix.dat
> > --C
> > /mindhive/nklab/projects/ellison/adultasd/vss/4_rfx/glm_input//asd.mtx
> > --C
> > /mindhive/nklab/projects/ellison/adultasd/vss/4_rfx/glm_input//tc.mtx
> > --C
> > /mindhive/nklab/projects/ellison/adultasd/vss/4_rfx/glm_input//tc-asd.mtx
> > --mask
> >
> /mindhive/nklab/projects/ellison/adultasd/vss/4_rfx/glm_input/cvs.gmMask.2x2x2.nii.gz
> > --glmdir
> > /mindhive/nklab/projects/ellison/adultasd/vss/4_rfx/glm_output//F-O
> > --yhat-save --eres-save --save-cond --nii.gz
> > sysname  Linux
> > hostname ba7
> > machine  x86_64
> > user alexkell
> > FixVertexAreaFlag = 1
> > UseMaskWithSmoothing 1
> > OneSampleGroupMean 0
> > y
> >
>  
> /mindhive/nklab2/ellison_on_nklab2/adultasd/vss/4_rfx/glm_input/cvs.all.ces.F-O.runs_1234.2x2x2.nii.gz
> > logyflag 0
> > X
> >
>  
> /mindhive/nklab/projects/ellison/adultasd/vss/4_rfx/glm_input//design_matrix.dat
> > usedti  0
> > mask
> >
> /mindhive/nklab/projects/ellison/adultasd/vss/4_rfx/glm_input/cvs.gmMask.2x2x2.nii.gz
> > maskinv 0
> > glmdir
> /mindhive/nklab/projects/ellison/adultasd/vss/4_rfx/glm_output//F-O
> > IllCondOK 0
> > ReScaleX 1
> > DoFFx 0
> > wFile
> >
> /mindhive/nklab/projects/ellison/adultasd/vss/4_rfx/glm_input//cvs.all.cesvar.F-O.runs_1234.2x2x2.nii.gz
> > weightinv  1
> > weightsqrt 1
> > Creating output directory
> > /mindhive/nklab/projects/ellison/adultasd/vss/4_rfx/glm_output//F-O
> > Loading y from
> >
> /mindhive/nklab2/ellison_on_nklab2/adultasd/vss/4_rfx/glm_input/cvs.all.ces.F-O.runs_1234.2x2x2.nii.gz
> > Saving design matrix to
> >
> /mindhive/nklab/projects/ellison/adultasd/vss/4_rfx/glm_output//F-O/Xg.dat
> > Normalized matrix conditio

[Freesurfer] segfault during rfx with mri_glmfit

2013-05-07 Thread Alex Kell
hi freesurfers,

i am running into a segfault whenever i try to use mri_glmfit to run a
random effects analysis.  (this is in the volume, not on the surface.)

here's my call:

mri_glmfit  \
 --y $ces_fpath \
 --X $design_mat_fpath \
 --C $c1_fpath \
 --C $c2_fpath \
 --C $c3_fpath \
 --mask $mask_fpath \
 --glmdir $glmdir_fpath \
 --nii.gz

i've tried a number of things to reduce the memory footprint of the call:
-- originally i was using WLS, but i was worried about the memory demands
of the cesvar, so i switched to OLS
-- i introduced a GM mask
-- i downsampled the ces and cesvar images (from 1 mm isotropic [cvs space]
to 2 mm isotropic)

any thoughts on what could be going wrong here?

thanks, guys!


alex


ps. below are my build stamp, my info dump from mri_glmfit, and an example
stderr & stdout.

my fs build stamp:
freesurfer-Linux-centos4_x86_64-dev-20120104


the "all info" dump from mri_glmfit:
ProgramName: mri_glmfit  ProgramArguments: --all-info  ProgramVersion:
$Name:  $  TimeStamp: 2013/05/07-14:15:28-GMT  BuildTimeStamp: Jan  4 2012
05:11:02  CVS: $Id: mri_glmfit.c,v 1.209 2011/12/16 19:02:28 greve Exp $
 User: alexkell  Machine: ba7  Platform: Linux  PlatformVersion:
2.6.38-16-generic  CompilerName: GCC  CompilerVersion: 30400


an example stderr and stdout:

$Id: mri_glmfit.c,v 1.209 2011/12/16 19:02:28 greve Exp $
cwd /mindhive/nklab2/ellison_on_nklab2/adultasd/vss/4_rfx/glm_output/F-O
cmdline mri_glmfit --y
/mindhive/nklab/projects/ellison/adultasd/vss/4_rfx/glm_input//cvs.all.ces.F-O.runs_1234.2x2x2.nii.gz
--wls
/mindhive/nklab/projects/ellison/adultasd/vss/4_rfx/glm_input//cvs.all.cesvar.F-O.runs_1234.2x2x2.nii.gz
--X
/mindhive/nklab/projects/ellison/adultasd/vss/4_rfx/glm_input//design_matrix.dat
--C /mindhive/nklab/projects/ellison/adultasd/vss/4_rfx/glm_input//asd.mtx
--C /mindhive/nklab/projects/ellison/adultasd/vss/4_rfx/glm_input//tc.mtx
--C
/mindhive/nklab/projects/ellison/adultasd/vss/4_rfx/glm_input//tc-asd.mtx
--mask
/mindhive/nklab/projects/ellison/adultasd/vss/4_rfx/glm_input/cvs.gmMask.2x2x2.nii.gz
--glmdir
/mindhive/nklab/projects/ellison/adultasd/vss/4_rfx/glm_output//F-O
--yhat-save --eres-save --save-cond --nii.gz
sysname  Linux
hostname ba7
machine  x86_64
user alexkell
FixVertexAreaFlag = 1
UseMaskWithSmoothing 1
OneSampleGroupMean 0
y
 
/mindhive/nklab2/ellison_on_nklab2/adultasd/vss/4_rfx/glm_input/cvs.all.ces.F-O.runs_1234.2x2x2.nii.gz
logyflag 0
X
 
/mindhive/nklab/projects/ellison/adultasd/vss/4_rfx/glm_input//design_matrix.dat
usedti  0
mask
/mindhive/nklab/projects/ellison/adultasd/vss/4_rfx/glm_input/cvs.gmMask.2x2x2.nii.gz
maskinv 0
glmdir /mindhive/nklab/projects/ellison/adultasd/vss/4_rfx/glm_output//F-O
IllCondOK 0
ReScaleX 1
DoFFx 0
wFile
/mindhive/nklab/projects/ellison/adultasd/vss/4_rfx/glm_input//cvs.all.cesvar.F-O.runs_1234.2x2x2.nii.gz
weightinv  1
weightsqrt 1
Creating output directory
/mindhive/nklab/projects/ellison/adultasd/vss/4_rfx/glm_output//F-O
Loading y from
/mindhive/nklab2/ellison_on_nklab2/adultasd/vss/4_rfx/glm_input/cvs.all.ces.F-O.runs_1234.2x2x2.nii.gz
Saving design matrix to
/mindhive/nklab/projects/ellison/adultasd/vss/4_rfx/glm_output//F-O/Xg.dat
Normalized matrix condition is 1
Matrix condition is 2.21429
Pruning voxels by thr: 0.00
Found 115353 voxels in mask
Saving mask to
/mindhive/nklab/projects/ellison/adultasd/vss/4_rfx/glm_output//F-O/mask.nii.gz
search space = 922824.00
Segmentation fault
___
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] denominator of the t-test in fsfast?

2013-03-31 Thread Alex Kell
freesurfers,

i have a question about how t-tests are computed in fsfast.

so t = ces/sqrt(cesvar), but how exactly is cesvar calculated?

i thought it would be:
cesvar = variance_of_residual *c*(X' * X)^-1*c'
  where X is the stim matrix and c is the contrast vector and ' denotes
transpose

two questions:

1. i tried computing cesvar myself, but it is not the equation above (for
the one subject i was playing with, cesvar was ~1.5x the above equation).
 what is the equation that is used?

2. intuitively, the second half of that [ c*(X' * X)^-1*c ] penalizes for
correlations in your stimulus matrix, particularly for those relevant to
your contrast.  is that a good way to think about it?


thanks in advance!


alex
___
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] Two questions: autocorrelation correction and vertex distance

2013-01-25 Thread Alex Kell
Whoops, I just saw your response in your response.  My bad -- please ignore.


Alex

On Fri, Jan 25, 2013 at 10:37 AM, Alex Kell  wrote:

> Hi Doug,
>
> Thanks for the information about how FS whitens the data.  Is there a way
> to temporally whiten data without running a GLM (i.e., without running
> selxavg3-sess)?
>
>
> Alex
>
>
>
> On Tue, Jan 22, 2013 at 9:58 AM, Douglas N Greve <
> gr...@nmr.mgh.harvard.edu> wrote:
>
>>
>> On 01/19/2013 03:18 PM, Alex Kell wrote:
>> > Hi Freesurfers,
>> >
>> > I have two unrelated questions.
>> >
>> > 1. I want to pre-whiten some functional data without running a GLM on
>> > them (we're going to run the GLM in matlab).  It looks like fsfast
>> > does autocorrelation correction as a part of the selxavg3-sess
>> > wrapper.  I tried poking around on the wiki and mailing archives, but
>> > I can't find how to pre-whiten the data without running a GLM.  Is
>> > there a straightforward way?  If not, I guess we could just do it in
>> > matlab.
>> FSFAST uses an AR1 model. It computes the AR1 from the residuals (thus
>> needing to run the GLM first). The voxel-wise AR1 is spatially smoothed,
>> then binned into 10 bins. All the voxels in each bin are then analyzed
>> in the same way.
>>
>> >
>> > 2. Separately, we're bringing some volume masks to the surface and are
>> > preprocessing them with dilation and erosion to clean them up.  We're
>> > trying to get a sense of how much is a reasonable amount to dilate and
>> > erode by, and it would be helpful to know about how far apart the
>> > adjacent surface vertices are.  Roughly, what's the mean distance
>> > between adjacent vertices?
>> About 1mm
>> doug
>> >
>> > Thanks in advance.
>> >
>> >
>> > Best,
>> > Alex
>> >
>> >
>> >
>> >
>> > ___
>> > 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 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] Two questions: autocorrelation correction and vertex distance

2013-01-25 Thread Alex Kell
Hi Doug,

Thanks for the information about how FS whitens the data.  Is there a way
to temporally whiten data without running a GLM (i.e., without running
selxavg3-sess)?


Alex



On Tue, Jan 22, 2013 at 9:58 AM, Douglas N Greve
wrote:

>
> On 01/19/2013 03:18 PM, Alex Kell wrote:
> > Hi Freesurfers,
> >
> > I have two unrelated questions.
> >
> > 1. I want to pre-whiten some functional data without running a GLM on
> > them (we're going to run the GLM in matlab).  It looks like fsfast
> > does autocorrelation correction as a part of the selxavg3-sess
> > wrapper.  I tried poking around on the wiki and mailing archives, but
> > I can't find how to pre-whiten the data without running a GLM.  Is
> > there a straightforward way?  If not, I guess we could just do it in
> > matlab.
> FSFAST uses an AR1 model. It computes the AR1 from the residuals (thus
> needing to run the GLM first). The voxel-wise AR1 is spatially smoothed,
> then binned into 10 bins. All the voxels in each bin are then analyzed
> in the same way.
>
> >
> > 2. Separately, we're bringing some volume masks to the surface and are
> > preprocessing them with dilation and erosion to clean them up.  We're
> > trying to get a sense of how much is a reasonable amount to dilate and
> > erode by, and it would be helpful to know about how far apart the
> > adjacent surface vertices are.  Roughly, what's the mean distance
> > between adjacent vertices?
> About 1mm
> doug
> >
> > Thanks in advance.
> >
> >
> > Best,
> > Alex
> >
> >
> >
> >
> > ___
> > 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 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] Two questions: autocorrelation correction and vertex distance

2013-01-19 Thread Alex Kell
Hi Freesurfers,

I have two unrelated questions.

1. I want to pre-whiten some functional data without running a GLM on them
(we're going to run the GLM in matlab).  It looks like fsfast does
autocorrelation correction as a part of the selxavg3-sess wrapper.  I tried
poking around on the wiki and mailing archives, but I can't find how to
pre-whiten the data without running a GLM.  Is there a straightforward way?
 If not, I guess we could just do it in matlab.

2. Separately, we're bringing some volume masks to the surface and are
preprocessing them with dilation and erosion to clean them up.  We're
trying to get a sense of how much is a reasonable amount to dilate and
erode by, and it would be helpful to know about how far apart the adjacent
surface vertices are.  Roughly, what's the mean distance between adjacent
vertices?

Thanks in advance.


Best,
Alex
___
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
/ -- 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] moving volumetric masks to surface labels within subject

2012-08-17 Thread Alex Kell
ah, thanks -- i didn't realize the distinction.

also, i think i've figured out what was wrong.  i shouldn't sample to the
inflated surface -- i should sample to the white surface.

the call that lead to misplacement:
mri_vol2surf --mov  --regheader  --hemi rh
--inflated --o 

the call that lead to correct placement:
mri_vol2surf --mov  --regheader  --hemi rh --surf
white --o 

thanks a bunch for your guys' help!


alex


On Fri, Aug 17, 2012 at 2:30 PM, Douglas N Greve
wrote:

> Ah, I did not see that you had used inflated in your original vol2surf
> command. That is definitely the source of the misplaced label. The
> surf_name.mgz file is not a surface, it is an overlay. If you are trying to
> load it as a surface in tksurfer (or getting info from mris_info), then it
> will try to read it as a surface and fail. To look at it in tksurfer, load
> it as an overlay, eg tksurfer subject lh inflated -overlay surf_name.mgz
>
> doug
>
>
> On 08/17/2012 02:26 PM, Alex Kell wrote:
>
>> hi doug,
>>
>> i can't visualize it.  when i try to use tksurfer (or even mris_info) i
>> get the following error messages repeatedly (like >100 times and keeps
>> going until i interrupt the call).
>>
>> freadFloat: fread failed
>> No such file or directory
>>
>> i tried mri_vol2surf using the white surface instead of the inflated and
>> i get the same fread errors.
>>
>> the white call is: mri_vol2surf --mov  --regheader
>>  --hemi rh --surf white --o .mgz
>>
>>
>> alex
>>
>> On Fri, Aug 17, 2012 at 1:18 PM, Douglas N Greve <
>> gr...@nmr.mgh.harvard.edu 
>> <mailto:gr...@nmr.mgh.harvard.**edu>>
>> wrote:
>>
>> Hi Alex, does the output of mri_vol2surf look ok on the surface? When
>> you run mri_cor2label, you should use the white or pial surface
>> instead
>> of inflated, but I don't think that is the problem here. Another thing
>> to look at is
>>     tkregister2 --mov volumetric-mask --regheader --reg junk.dat --s
>> subjectname
>> and make sure that the label is in the right place (hit the compare
>> button to flip back and forth).
>> doug
>>
>> On 08/17/2012 11:02 AM, Alex Kell wrote:
>> > hi freesurfers,
>> >
>> > i'm trying to move a volume from a subject's native anatomical space
>> > to that subject's surface space, and i'm running into some
>> difficulty.
>> >
>> > we have binary masks in each subject's native anatomical space and
>> > we'd like to move these to be labels in that subject's surface
>> space.
>> > there we'd edit them (either manually or with dilation and erosion)
>> > and extract some simple anatomical measures (like thickness)
>> from that
>> > region in the surface space.  to do this, i am using mri_vol2surf to
>> > get the volume in the subject's surface space, and then using
>> > mri_cor2label to convert this surface file to a label.  the
>> problem is
>> > that when i look at the label in the surface space, it is in clearly
>> > the wrong position -- even though when i look at the volumetric mask
>> > as an overlay in tksurfer it looks like it's in the position
>> that it's
>> > supposed to be.  for instance, see the attached.  magenta is the
>> > volumetric mask overlay (in the correct position) and the blue-red
>> > circle is the label file (in the wrong position).
>> >
>> > my calls:
>> >
>> > mri_vol2surf --mov  --reg identity.dat --hemi rh
>> > --inflated --o
>> > mri_cor2label --i  --id 1 --l ./
>>  --surf
>> >   rh inflated
>> >
>> > "identity.dat" is a tkregister-style registration matrix where i
>> just
>> > put ones on the diagonal and zeros everywhere else.  i also tried
>> > mri_vol2surf where i used the --regheader flag.
>> >
>> > any thoughts?  what's going on here?
>> >
>> > thanks in advance.
>> >
>> >
>> > alex
>> >
>> >
>> > __**_
>> > Freesurfer mailing list
>> > Freesurfer@nmr.mgh.harvard.edu
>> <mailto:freesur...@nmr.mgh.**harvard.edu
>> >
>>
>> > 
>> https://mail.nmr.mgh.harvard.**edu/mailman/list

Re: [Freesurfer] moving volumetric masks to surface labels within subject

2012-08-17 Thread Alex Kell
hi doug,

i can't visualize it.  when i try to use tksurfer (or even mris_info) i get
the following error messages repeatedly (like >100 times and keeps going
until i interrupt the call).

freadFloat: fread failed
No such file or directory

i tried mri_vol2surf using the white surface instead of the inflated and i
get the same fread errors.

the white call is: mri_vol2surf --mov  --regheader
 --hemi rh --surf white --o .mgz


alex

On Fri, Aug 17, 2012 at 1:18 PM, Douglas N Greve
wrote:

> Hi Alex, does the output of mri_vol2surf look ok on the surface? When
> you run mri_cor2label, you should use the white or pial surface instead
> of inflated, but I don't think that is the problem here. Another thing
> to look at is
> tkregister2 --mov volumetric-mask --regheader --reg junk.dat --s
> subjectname
> and make sure that the label is in the right place (hit the compare
> button to flip back and forth).
> doug
>
> On 08/17/2012 11:02 AM, Alex Kell wrote:
> > hi freesurfers,
> >
> > i'm trying to move a volume from a subject's native anatomical space
> > to that subject's surface space, and i'm running into some difficulty.
> >
> > we have binary masks in each subject's native anatomical space and
> > we'd like to move these to be labels in that subject's surface space.
> > there we'd edit them (either manually or with dilation and erosion)
> > and extract some simple anatomical measures (like thickness) from that
> > region in the surface space.  to do this, i am using mri_vol2surf to
> > get the volume in the subject's surface space, and then using
> > mri_cor2label to convert this surface file to a label.  the problem is
> > that when i look at the label in the surface space, it is in clearly
> > the wrong position -- even though when i look at the volumetric mask
> > as an overlay in tksurfer it looks like it's in the position that it's
> > supposed to be.  for instance, see the attached.  magenta is the
> > volumetric mask overlay (in the correct position) and the blue-red
> > circle is the label file (in the wrong position).
> >
> > my calls:
> >
> > mri_vol2surf --mov  --reg identity.dat --hemi rh
> > --inflated --o
> > mri_cor2label --i  --id 1 --l ./  --surf
> >   rh inflated
> >
> > "identity.dat" is a tkregister-style registration matrix where i just
> > put ones on the diagonal and zeros everywhere else.  i also tried
> > mri_vol2surf where i used the --regheader flag.
> >
> > any thoughts?  what's going on here?
> >
> > thanks in advance.
> >
> >
> > alex
> >
> >
> > ___
> > 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
>
> ___
> 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] moving volumetric masks to surface labels within subject

2012-08-17 Thread Alex Kell
hi bruce,

the mask was generated by morphing a binary mask from CVS space back to the
subject's anatomical space.  the cvs mask was generated from a functional
parcellation algorithm our lab uses.

if it's useful -- the registration header in the anatomical-space mask is
identical to the orig.mgz's.


alex

On Fri, Aug 17, 2012 at 11:07 AM, Bruce Fischl
wrote:

> Hi Alex
>
> when you say it is in the native anatomical space can you elaborate? How
> did you create the mask?
>
> Bruce
>
> On Fri, 17 Aug 2012, Alex Kell wrote:
>
>  hi freesurfers,
>>
>> i'm trying to move a volume from a subject's native anatomical space
>> to that subject's surface space, and i'm running into some difficulty.
>>
>> we have binary masks in each subject's native anatomical space and
>> we'd like to move these to be labels in that subject's surface space.
>> there we'd edit them (either manually or with dilation and erosion)
>> and extract some simple anatomical measures (like thickness) from that
>> region in the surface space.  to do this, i am using mri_vol2surf to
>> get the volume in the subject's surface space, and then using
>> mri_cor2label to convert this surface file to a label.  the problem is
>> that when i look at the label in the surface space, it is in clearly
>> the wrong position -- even though when i look at the volumetric mask
>> as an overlay in tksurfer it looks like it's in the position that it's
>> supposed to be.  for instance, see the attached.  magenta is the
>> volumetric mask overlay (in the correct position) and the blue-red
>> circle is the label file (in the wrong position).
>>
>> my calls:
>>
>> mri_vol2surf --mov  --reg identity.dat --hemi rh
>> --inflated --o 
>> mri_cor2label --i  --id 1 --l ./ --surf
>>  rh inflated
>>
>> "identity.dat" is a tkregister-style registration matrix where i just
>> put ones on the diagonal and zeros everywhere else.  i also tried
>> mri_vol2surf where i used the --regheader flag.
>>
>> any thoughts?  what's going on here?
>>
>> thanks in advance.
>>
>>
>> alex
>>
>>
>
> 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<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] "Smart" concatenation in selxavg3-sess?

2012-03-07 Thread Alex Kell
Hi Freesurfers,

The selxavg3-sess's help and Freesurfer documentation say
that selxavg3-sess creates a design matrix for each run, fits the glm for
each run, and then combines the runs together to give summary data for the
subject's whole session.  Some of the fsfast 5 slides say it uses "smart"
concatenation to combine each run's data -- what is "smart" concatenation?
 How does are the runs brought into alignment?

Thanks!


Alex

Kanwisher Lab Manager
McGovern Institute for Brain Research
MIT
___
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] Flags to align per-run motion-corrected functional volumes?

2012-03-06 Thread Alex Kell
Hi Freesurfers,

I am using preproc-sess in Freesurfer/Fsfast 5 with per-run motion
correction (these subjects have a lot of between-run motion), and I want to
analyze the volumes in each subject's individual space (I'd prefer native
functional space, but I am happy to do it in each subject's anatomical
space).  Do preproc-sess, mkanalysis-sess, or selxavg3-sess have any
built-in flags that would automatically align the functional volumes using
the 6 rigid parameters generated from bbregister?  Or do they have a
built-in way to align and to upsample the functional volumes to the
subject's anatomical space (not the surface)?  I am happy to upsample each
run's functional volume to anatomical space with an mri_vol2vol call, and
then to estimate my glm with selxavg3-sess on these volumes.  But I figure
there may be some flags that do this automatically.  I've looked through
the documentation and I haven't found these flags.  Is this possible to do
automatically?

Thanks, guys!


Alex

Kanwisher Lab Manager
McGovern Institute for Brain Research
MIT
___
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_vol2vol not downsampling when applying a morph and a rigid registration matrix

2012-02-22 Thread Alex Kell
Hi Freesurfers,

I am struggling to get mri_vol2vol to downsample when I apply an inverse
morph and an inverse registration matrix.

Specifically, I am bringing a volume in cvs_avg35 space back into an
individual subject's functional space.  I have already registered the
subject's functional to their anatomical using bbregister and registered
the subject's anatomical to cvs_avg35 space using mri_cvs_normalize.  Here
is the mri_vol2vol call that I am using to move a volume from cvs space to
native functional space:

mri_vol2vol --targ $roi_in_cvs_space\
--mov $func_vol_file\
--reg-final $bbreg_file   \
--inv   \
--inv-morph \
--m3z $morph_file   \
--o $roi_in_native_func_space  \
--interp nearest\
--noDefM3zPath

This call seems to register the cvs space to the native functional
space accurately -- the mask that I am projecting is in a reasonable
position in the functional space.  However, the voxel size for this output
volume is not the same size as the functional voxels.  The voxel size is
still the same as the size in cvs space.  (Or it could be the anatomical
space, since both are 1 mm isotropic.)

My question: How do I get mri_vol2vol to downsample?  I have no problem
getting mri_vol2vol to downsample from native anatomical to native
functional by applying the inverse of the bbregister-generated matrix, but
I am struggling to get the appropriate downsampling here.  Any suggestions?

And FYI: I'm using this version of
freesurfer: freesurfer-Linux-centos4_x86_64-dev-20120104.

Thanks in advance!


Best,

Alex Kell
Kanwisher Lab Manager
___
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.