Re: [Freesurfer] THANKS

2012-01-18 Thread Lilla Zollei


Yes, that is right.


On Wed, 18 Jan 2012, Antonella Kis wrote:


Thanks so much now I more clear. So based on my understanding when resampling 
on CVS space we will use the nears interpolation if instead of the 
fa-masked.mgz we have a segmentation volume such as wmparc.mgz or the 
aparc+aseg.mgz but if I have fa-masked.mgz no matter
how I defined my mask I will have use the --interp trilin while resampling 
since the fa-masked.mgz is not a segmentation file.

Is this right?

Sorry for asking so many silly questions.

Thanks.
Antonella

___
From: Lilla Zollei 
To: Antonella Kis 
Cc: freesurfer@nmr.mgh.harvard.edu
Sent: Wednesday, January 18, 2012 3:46 PM
Subject: Re: [Freesurfer] How to define the FA-mask


fa-masked is a masked volume and not a segmentation file. A segmentation file 
contains labels that correspond to certain anatomical areas. The fa-masked file 
is the same as your fa volume but some background regions are eliminated from 
it using the mask volume.


On Wed, 18 Jan 2012, Antonella Kis wrote:

> Thank you Lilla, this is very helpful. Just one more question please: why it 
says it is not a segmented volume the input volume which in fact you mentioned is 
the fa-masked.mgz if this was defined using the wmparc?
>
> THANKS and have a great day!
> Antonella
>
>__
_
> From: Lilla Zollei 
> To: Antonella Kis 
> Cc: freesurfer@nmr.mgh.harvard.edu
> Sent: Wednesday, January 18, 2012 3:38 PM
> Subject: Re: [Freesurfer] How to define the FA-mask
>
>
> Hi,
>
> > Many thanks for your reply. Can ypu please advise me how  I should 
calculate the mask if I want to do the masking based upon intensity values found in 
the fa image?
> >
> > I tried to run (without wmparc) but it gave me error:
> >
> > mri_mask $TUTORIAL_DIR/$subj/dtrecon/fa.nii \
> >          $TUTORIAL_DIR/$subj/dtrecon/fa-masked.mgz
> >
>
> Sorry, you should use mri_threshold if you want to do intensity
> thresholding and mri_mask if you want to use a mask. In the above the
> second argument, the mask, is missing.
>
>
> > On the tutorial site which is the input volume that it says is not a 
segmented volume during resampling on the CVS:
> >
> > > mri_vol2vol --targ $FREESURFER_HOME/subjects/cvs_avg35/mri/norm.mgz \
> > >            --m3z 
$SUBJECTS_DIR/$subj/cvs/combined_tocvs_avg35_elreg_afteraseg-norm.m3z \
> > >            --noDefM3zPath --reg $TUTORIAL_DIR/$subj/dtrecon/register.dat \
> > >            --mov $TUTORIAL_DIR/$subj/dtrecon/fa-masked.mgz \
> > >            --o 
$TUTORIAL_DIR/$subj/dtrecon/fa-masked.ANAT+CVS-to-avg35.mgz \
> > >            --interp trilin --no-save-reg
>
> It is "$TUTORIAL_DIR/$subj/dtrecon/fa-masked.mgz"
>
> > Based on your experience What will be the best to use when I define my 
voxels the parcellation map or an intensity threshol? 
>
> It really depends on your data. You might want to look at both outputs on
> a couple of data sets and then decide.
>
> --Lilla
>
>
> > From: Lilla Zollei 
> > To: Antonella Kis 
> > Cc: "freesurfer@nmr.mgh.harvard.edu" 
> > Sent: Wednesday, January 18, 2012 2:34 PM
> > Subject: Re: [Freesurfer] How to define the FA-mask
> >
> >
> > > mri_mask $TUTORIAL_DIR/$subj/dtrecon/fa.nii \
> > >          $SUBJECTS_DIR/$subj/mri/wmparc2diff.mgz \
> > >          $TUTORIAL_DIR/$subj/dtrecon/fa-masked.mgz
> > > and when it follows the resampling on the CVS space I see:
> > >
> > > mri_vol2vol --targ $FREESURFER_HOME/subjects/cvs_avg35/mri/norm.mgz \
> > >            --m3z 
$SUBJECTS_DIR/$subj/cvs/combined_tocvs_avg35_elreg_afteraseg-norm.m3z \
> > >            --noDefM3zPath --reg $TUTORIAL_DIR/$subj/dtrecon/register.dat \
> > >            --mov $TUTORIAL_DIR/$subj/dtrecon/fa-masked.mgz \
> > >            --o 
$TUTORIAL_DIR/$subj/dtrecon/fa-masked.ANAT+CVS-to-avg35.mgz \
> > >            --interp trilin --no-save-reg
> > > with the following explanation: The '--interp' flag indicates the type of 
interpolation we want to use for our resampling. We are not using a segmented volume as 
an input so we use the default trilinear (trilin) interpolation option. If you wanted to 
resample a
> > > segmentation volume (such as wmparc or aseg) in CVS space, you would want 
to use the nearest neighbor (nearest) interpolation option.
> > >
> > > I don't understand what exactly means: "We are not using a segmented volume as 
an input" since the fa-masked is defined using the wmparc2diff?
> >
> > When you masked the FA volume, you eliminated some values that are outside 
of the mask

Re: [Freesurfer] THANKS

2011-09-28 Thread Douglas N Greve
*By default, FreeSurfer compputes and uses a two-tailed p-value. When 
you specify a sign, it lowers the threshold that you give it to reflect 
a one-tailed test. Probably what happened was that you had two clusters 
close to each other that merged together with the lower threshold.
doug
*
Antonella Kis wrote:
> Dear Doug,
>
> Finally I've got it. But there is one more problem: when I run the 
> QDEC with Min threshold 2 neg, I am getting 2  clusters, while when I 
> am running the results from QDEC(under Untitled.glmdir) with the -sim:
>
> mri_glmfit-sim \
> --glmdir Untitled.glmdir \
> --cache 2 pos \
> --overwrite
>
> I am getting only one of the clusters. Can you please advise me what 
> is going on or what should I correct?
>
> Many thanks,
> AK
> 
> *From:* Douglas N Greve 
> *To:* Antonella Kis ; freesurfer 
> 
> *Sent:* Wednesday, September 28, 2011 1:33 PM
> *Subject:* Re: [Freesurfer] Error with mri_glmfit-sim
>
> again, FDR should have nothing to do with it. If you want a voxel-wise 
> threshold at 2, just set that threshold when you run mri_glmfit-sim 
> with "--cache 2 sign" where sign is pos, neg, or abs
> doug
>
> Antonella Kis wrote:
> > Hi Doug,
> >
> > Thanks again for helping. I am trying to use QDEC but there are no 
> clusters surviving after FDR (it says statics cannot be done so gives 
> me error by running FDR). So I am trying  to get the thickness values 
> only for the clusters that are formed in QDEC after setting up a 
> threshold = 2 (before running FDR). In order to do this you suggested 
> me to run mri_glmfit-sim on the QDEC results. The only problem is that 
> I cannot run the -sim if there is no FDR data (stats) so I cannot 
> cache the clusters formed only by thresh 2 in QDEC. Is theer a way to 
> do it?
> >
> > Many thanks,
> > AK
> >
> > 
> > *From:* Douglas N Greve  >
> > *To:* Antonella Kis mailto:ator...@yahoo.com>>
> > *Cc:* "freesurfer@nmr.mgh.harvard.edu 
> " 
> mailto:freesurfer@nmr.mgh.harvard.edu>>
> > *Sent:* Wednesday, September 28, 2011 12:06 PM
> > *Subject:* Re: [Freesurfer] Error with mri_glmfit-sim
> >
> > What does FDR have to do with it? FDR should not come into play in this.
> > doug
> >
> > Antonella Kis wrote:
> > > Good morning Doug,
> > >
> > > I tried running the -sim on my QDEC output (as you recommended me last
> > > days) but for some data the FDR gives me error (cannot calculate
> > > clusters statistics) so mri_glmfit-sim is not working either since the
> > > corrections by multiple comparisons is not working. What should I do
> > > in this case so I can get as output my cortical thickness values for
> > > the formed clusters at threshold 2, before multiple comparison?
> > >
> > > Many thanks,
> > > AK
> >
> > -- 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.
> >
> >
> >
>
> -- 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
>
>
>

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


Re: [Freesurfer] THANKS

2011-09-28 Thread Douglas N Greve
The change in threshold is always 0.3. Eg, to go from a two-tailed 
threshold of 2.0 to a one-tailed threshold, you would subtract .3 from 
2.0 (and so 1.7). Is this what you mean?

Antonella Kis wrote:
> I see. Is there a way that I can get/read both clusters sin other 
> words can I eliminate this inconvenient of two-tailed p-value?
>
> Thanks,
> AK
>
> 
> *From:* Douglas N Greve 
> *To:* Antonella Kis ; freesurfer 
> 
> *Sent:* Wednesday, September 28, 2011 2:59 PM
> *Subject:* Re: [Freesurfer] THANKS
>
> *By default, FreeSurfer compputes and uses a two-tailed p-value. When
> you specify a sign, it lowers the threshold that you give it to reflect
> a one-tailed test. Probably what happened was that you had two clusters
> close to each other that merged together with the lower threshold.
> doug
> *
> Antonella Kis wrote:
> > Dear Doug,
> >
> > Finally I've got it. But there is one more problem: when I run the
> > QDEC with Min threshold 2 neg, I am getting 2  clusters, while when I
> > am running the results from QDEC(under Untitled.glmdir) with the -sim:
> >
> > mri_glmfit-sim \
> > --glmdir Untitled.glmdir \
> > --cache 2 pos \
> > --overwrite
> >
> > I am getting only one of the clusters. Can you please advise me what
> > is going on or what should I correct?
> >
> > Many thanks,
> > AK
> > 
> > *From:* Douglas N Greve  <mailto:gr...@nmr.mgh.harvard.edu>>
> > *To:* Antonella Kis mailto:ator...@yahoo.com>>; 
> freesurfer
> > mailto:freesurfer@nmr.mgh.harvard.edu>>
> > *Sent:* Wednesday, September 28, 2011 1:33 PM
> > *Subject:* Re: [Freesurfer] Error with mri_glmfit-sim
> >
> > again, FDR should have nothing to do with it. If you want a voxel-wise
> > threshold at 2, just set that threshold when you run mri_glmfit-sim
> > with "--cache 2 sign" where sign is pos, neg, or abs
> > doug
> >
> > Antonella Kis wrote:
> > > Hi Doug,
> > >
> > > Thanks again for helping. I am trying to use QDEC but there are no
> > clusters surviving after FDR (it says statics cannot be done so gives
> > me error by running FDR). So I am trying  to get the thickness values
> > only for the clusters that are formed in QDEC after setting up a
> > threshold = 2 (before running FDR). In order to do this you suggested
> > me to run mri_glmfit-sim on the QDEC results. The only problem is that
> > I cannot run the -sim if there is no FDR data (stats) so I cannot
> > cache the clusters formed only by thresh 2 in QDEC. Is theer a way to
> > do it?
> > >
> > > Many thanks,
> > > AK
> > >
> > > 
> 
> > > *From:* Douglas N Greve  <mailto:gr...@nmr.mgh.harvard.edu>
> > <mailto:gr...@nmr.mgh.harvard.edu <mailto:gr...@nmr.mgh.harvard.edu>>>
> > > *To:* Antonella Kis mailto:ator...@yahoo.com> 
> <mailto:ator...@yahoo.com <mailto:ator...@yahoo.com>>>
> > > *Cc:* "freesurfer@nmr.mgh.harvard.edu 
> <mailto:freesurfer@nmr.mgh.harvard.edu>
> > <mailto:freesurfer@nmr.mgh.harvard.edu 
> <mailto:freesurfer@nmr.mgh.harvard.edu>>"
> >  <mailto:freesurfer@nmr.mgh.harvard.edu> 
> <mailto:freesurfer@nmr.mgh.harvard.edu 
> <mailto:freesurfer@nmr.mgh.harvard.edu>>>
> > > *Sent:* Wednesday, September 28, 2011 12:06 PM
> > > *Subject:* Re: [Freesurfer] Error with mri_glmfit-sim
> > >
> > > What does FDR have to do with it? FDR should not come into play in 
> this.
> > > doug
> > >
> > > Antonella Kis wrote:
> > > > Good morning Doug,
> > > >
> > > > I tried running the -sim on my QDEC output (as you recommended 
> me last
> > > > days) but for some data the FDR gives me error (cannot calculate
> > > > clusters statistics) so mri_glmfit-sim is not working either 
> since the
> > > > corrections by multiple comparisons is not working. What should I do
> > > > in this case so I can get as output my cortical thickness values for
> > > > the formed clusters at threshold 2, before multiple comparison?
> > > >
> > > > Many thanks,
> > > > AK
> > >
> > > -- Douglas N. Greve, Ph.D.
> > > MGH-NMR Center
> > > gr...@nmr.mgh.harvard.edu <mailto:gr...@nmr.mgh.harvard.edu> 
> 

Re: [Freesurfer] THANKS

2011-09-28 Thread Douglas N Greve
Oh, sorry, I precompute the tables with certain fixed voxel-wise 
thresholds. But it seems like you may want to use 2.3. Why 1.7? If you 
want it to match what you see in QDEC at a threshold of 2.0, then you 
should spec 2.3.

Antonella Kis wrote:
> I am not sure but I tried that and it gives me error:
>
>
> ? --glmdir Untitled.glmdir \
> ? --cache 1.7 neg\
> ? --overwrite
> ERROR: thresh = 1.7, must be 1.3, 2.0, 2.3, 3.0, 3.3, 4.0
> So how should I fix that?
>
> Many thanks!
> AK
> 
> *From:* Douglas N Greve 
> *To:* Antonella Kis ; freesurfer 
> 
> *Sent:* Wednesday, September 28, 2011 4:07 PM
> *Subject:* Re: [Freesurfer] THANKS
>
> The change in threshold is always 0.3. Eg, to go from a two-tailed 
> threshold of 2.0 to a one-tailed threshold, you would subtract .3 from 
> 2.0 (and so 1.7). Is this what you mean?
>
> Antonella Kis wrote:
> > I see. Is there a way that I can get/read both clusters sin other 
> words can I eliminate this inconvenient of two-tailed p-value?
> >
> > Thanks,
> > AK
> >
> > 
> > *From:* Douglas N Greve  <mailto:gr...@nmr.mgh.harvard.edu>>
> > *To:* Antonella Kis mailto:ator...@yahoo.com>>; 
> freesurfer  <mailto:freesurfer@nmr.mgh.harvard.edu>>
> > *Sent:* Wednesday, September 28, 2011 2:59 PM
> > *Subject:* Re: [Freesurfer] THANKS
> >
> > *By default, FreeSurfer compputes and uses a two-tailed p-value. When
> > you specify a sign, it lowers the threshold that you give it to reflect
> > a one-tailed test. Probably what happened was that you had two clusters
> > close to each other that merged together with the lower threshold.
> > doug
> > *
> > Antonella Kis wrote:
> > > Dear Doug,
> > >
> > > Finally I've got it. But there is one more problem: when I run the
> > > QDEC with Min threshold 2 neg, I am getting 2  clusters, while when I
> > > am running the results from QDEC(under Untitled.glmdir) with the -sim:
> > >
> > > mri_glmfit-sim \
> > > --glmdir Untitled.glmdir \
> > > --cache 2 pos \
> > > --overwrite
> > >
> > > I am getting only one of the clusters. Can you please advise me what
> > > is going on or what should I correct?
> > >
> > > Many thanks,
> > > AK
> > > 
> 
> > > *From:* Douglas N Greve  <mailto:gr...@nmr.mgh.harvard.edu> <mailto:gr...@nmr.mgh.harvard.edu 
> <mailto:gr...@nmr.mgh.harvard.edu>>>
> > > *To:* Antonella Kis mailto:ator...@yahoo.com> 
> <mailto:ator...@yahoo.com <mailto:ator...@yahoo.com>>>; freesurfer
> > >  <mailto:freesurfer@nmr.mgh.harvard.edu> 
> <mailto:freesurfer@nmr.mgh.harvard.edu 
> <mailto:freesurfer@nmr.mgh.harvard.edu>>>
> > > *Sent:* Wednesday, September 28, 2011 1:33 PM
> > > *Subject:* Re: [Freesurfer] Error with mri_glmfit-sim
> > >
> > > again, FDR should have nothing to do with it. If you want a voxel-wise
> > > threshold at 2, just set that threshold when you run mri_glmfit-sim
> > > with "--cache 2 sign" where sign is pos, neg, or abs
> > > doug
> > >
> > > Antonella Kis wrote:
> > > > Hi Doug,
> > > >
> > > > Thanks again for helping. I am trying to use QDEC but there are no
> > > clusters surviving after FDR (it says statics cannot be done so gives
> > > me error by running FDR). So I am trying  to get the thickness values
> > > only for the clusters that are formed in QDEC after setting up a
> > > threshold = 2 (before running FDR). In order to do this you suggested
> > > me to run mri_glmfit-sim on the QDEC results. The only problem is that
> > > I cannot run the -sim if there is no FDR data (stats) so I cannot
> > > cache the clusters formed only by thresh 2 in QDEC. Is theer a way to
> > > do it?
> > > >
> > > > Many thanks,
> > > > AK
> > > >
> > > > 
> 
> > > > *From:* Douglas N Greve  <mailto:gr...@nmr.mgh.harvard.edu> <mailto:gr...@nmr.mgh.harvard.edu 
> <mailto:gr...@nmr.mgh.harvard.edu>>
> > > <mailto:gr...@nmr.mgh.harvard.edu 
> <mailto:gr...@nmr.mgh.harvard.edu> <mailto:gr...@nmr.mgh.harvard.edu 
> <mailto:gr...@nmr.mgh.harvard.edu>>

Re: [Freesurfer] Thanks so much!

2012-01-18 Thread Lilla Zollei


Yes, but then you would not use --reg 
$TUTORIAL_DIR/$subj/dtrecon/register.dat

with mri_vol2vol.

--Lilla


On Wed, 18 Jan 2012, Antonella Kis wrote:


Finally I understood! THANKS so much Lilla!

So I can use the nearst interp if while resampling in the CVS space  my input 
(--mov) volume  is replaced from --mov 
$TUTORIAL_DIR/$subj/dtrecon/fa-masked.mgz \
with for example 
/media/2Tra/Antonella_2011/DTI_FS/dtrecon_cvs/P04_cvs/P04/mri/wmparc.mgz?


THANKS SO MUCH!
Antonella

___
From: Lilla Zollei 
To: Antonella Kis 
Cc: freesurfer@nmr.mgh.harvard.edu
Sent: Wednesday, January 18, 2012 4:02 PM
Subject: Re: [Freesurfer] THANKS


Yes, that is right.


On Wed, 18 Jan 2012, Antonella Kis wrote:

> Thanks so much now I more clear. So based on my understanding when resampling 
on CVS space we will use the nears interpolation if instead of the fa-masked.mgz 
we have a segmentation volume such as wmparc.mgz or the aparc+aseg.mgz but if I 
have fa-masked.mgz no
matter
> how I defined my mask I will have use the --interp trilin while resampling 
since the fa-masked.mgz is not a segmentation file.
>
> Is this right?
>
> Sorry for asking so many silly questions.
>
> Thanks.
> Antonella
>
>__
_
> From: Lilla Zollei 
> To: Antonella Kis 
> Cc: freesurfer@nmr.mgh.harvard.edu
> Sent: Wednesday, January 18, 2012 3:46 PM
> Subject: Re: [Freesurfer] How to define the FA-mask
>
>
> fa-masked is a masked volume and not a segmentation file. A segmentation file 
contains labels that correspond to certain anatomical areas. The fa-masked file is 
the same as your fa volume but some background regions are eliminated from it 
using the mask volume.
>
>
> On Wed, 18 Jan 2012, Antonella Kis wrote:
>
> > Thank you Lilla, this is very helpful. Just one more question please: why 
it says it is not a segmented volume the input volume which in fact you mentioned is 
the fa-masked.mgz if this was defined using the wmparc?
> >
> > THANKS and have a great day!
> > Antonella
> >
>>_
_
> _
> > From: Lilla Zollei 
> > To: Antonella Kis 
> > Cc: freesurfer@nmr.mgh.harvard.edu
> > Sent: Wednesday, January 18, 2012 3:38 PM
> > Subject: Re: [Freesurfer] How to define the FA-mask
> >
> >
> > Hi,
> >
> > > Many thanks for your reply. Can ypu please advise me how  I should 
calculate the mask if I want to do the masking based upon intensity values found in the 
fa image?
> > >
> > > I tried to run (without wmparc) but it gave me error:
> > >
> > > mri_mask $TUTORIAL_DIR/$subj/dtrecon/fa.nii \
> > >          $TUTORIAL_DIR/$subj/dtrecon/fa-masked.mgz
> > >
> >
> > Sorry, you should use mri_threshold if you want to do intensity
> > thresholding and mri_mask if you want to use a mask. In the above the
> > second argument, the mask, is missing.
> >
> >
> > > On the tutorial site which is the input volume that it says is not a 
segmented volume during resampling on the CVS:
> > >
> > > > mri_vol2vol --targ $FREESURFER_HOME/subjects/cvs_avg35/mri/norm.mgz \
> > > >            --m3z 
$SUBJECTS_DIR/$subj/cvs/combined_tocvs_avg35_elreg_afteraseg-norm.m3z \
> > > >            --noDefM3zPath --reg 
$TUTORIAL_DIR/$subj/dtrecon/register.dat \
> > > >            --mov $TUTORIAL_DIR/$subj/dtrecon/fa-masked.mgz \
> > > >            --o 
$TUTORIAL_DIR/$subj/dtrecon/fa-masked.ANAT+CVS-to-avg35.mgz \
> > > >            --interp trilin --no-save-reg
> >
> > It is "$TUTORIAL_DIR/$subj/dtrecon/fa-masked.mgz"
> >
> > > Based on your experience What will be the best to use when I define my 
voxels the parcellation map or an intensity threshol? 
> >
> > It really depends on your data. You might want to look at both outputs on
> > a couple of data sets and then decide.
> >
> > --Lilla
> >
> >
> > > From: Lilla Zollei 
> > > To: Antonella Kis 
> > >

[Freesurfer] Thanks for the answers

2008-12-22 Thread Yunjie Tong

Hi Doug and Bruce,

Thanks for your answers. One more question, why the vertex RAS of the  
same spot on the brain given in TkSurfer is not the ones I read by  
Matlab program freesurfer_read_surf?


The commands I am using are:

[vertex_coords, faces] = freesurfer_read_surf('tutorial_subjs/subject/ 
surf/lh.inflated');


tksurfer subject lh inflated

Thanks,


YJ



if you have the voxel index (col, row, slice) then you can:

V2R = [
-1.00.00.0  128.0
 0.00.01.0 -128.0
 0.0   -1.00.0  128.0
 0.00.00.01.0 ]

crs = [col row slice]';

xyz = V2R[crs+1; 1];

then find the vertex whose xyz coors are closest to xyz



Yunjie Tong wrote:


Hi freesurfer experts,

I have a single subject anatomical data in freesurfer. If I know  
the  volume index of a point on the surface of the cortex ( from  
T1.mgz in  TkMedit), how can I find out the corresponding vertex  
index or the  vertex RAS in TkSurfer. Thanks. BTW, I am using matlab.


Thanks,

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

In order to help us help you, please follow the steps in:
surfer.nmr.mgh.harvard.edu/fswiki/BugReporting

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

Re: [Freesurfer] Thanks for the answers

2008-12-22 Thread Doug Greve

make sure you're not using a 0-based index with matlab

Yunjie Tong wrote:


Hi Doug and Bruce,

Thanks for your answers. One more question, why the vertex RAS of the 
same spot on the brain given in TkSurfer is not the ones I read by 
Matlab program freesurfer_read_surf?


The commands I am using are:

[vertex_coords, faces] = 
freesurfer_read_surf('tutorial_subjs/subject/surf/lh.inflated');


tksurfer subject lh inflated

Thanks,


YJ



if you have the voxel index (col, row, slice) then you can:

V2R = [
-1.00.00.0  128.0
 0.00.01.0 -128.0
 0.0   -1.00.0  128.0
 0.00.00.01.0 ]

crs = [col row slice]';

xyz = V2R[crs+1; 1];

then find the vertex whose xyz coors are closest to xyz



Yunjie Tong wrote:


Hi freesurfer experts,




I have a single subject anatomical data in freesurfer. If I know the 
 volume index of a point on the surface of the cortex ( from T1.mgz 
in  TkMedit), how can I find out the corresponding vertex index or 
the  vertex RAS in TkSurfer. Thanks. BTW, I am using matlab.




Thanks,




Yunjie



___



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

In order to help us help you, please follow the steps in:
surfer.nmr.mgh.harvard.edu/fswiki/BugReporting



___
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


In order to help us help you, please follow the steps in:
surfer.nmr.mgh.harvard.edu/fswiki/BugReporting


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

Re: [Freesurfer] Question about the orientation of input image in FreeSurfer. Thanks a lot!

2011-11-07 Thread Douglas N Greve

> On Nov 4, 2011, at 10:46 PM, yaping wang  > wrote:
>
>> Hi, Dear Dr Fischl,
>> Sorry to interrupt you.
>> I have a simple question to ask you. It's about the orientation of 
>> the input image for FreeSurfer. The version I used now is version 4.5.0.
>>
>> First I referred to the "README" in ${FreeSurfer_Dir}/subjects, but I 
>> didn't found the directory named "ernie".
>> So I referred the following images for the input image orientation: 
>> ${FreeSurfer_Dir}/subjects/bert/mri/orig/001.mgz (002.mgz and 003.mgz)
>> and
>> ${FreeSurfer_Dir}/subjects/bert/mri/rawavg.mgz
>> ${FreeSurfer_Dir}/subjects/bert/mri/orig.mgz
>>
>> I show them in "FreeSurfer_sample.JPG", the first row is the 001.mgz 
>> (the orientations of 002.mgz and 003.mgz are same with 001.mgz, so I 
>> just show 001.mgz), the second row is the the rawavg.mgz and the 
>> orig.mgz.
>> From http://surfer.nmr.mgh.harvard.edu/fswiki/ReconAllDevTable, I 
>> think 001.mgz (002.mgz and 003.mgz)  is the input image, and the 
>> rawavg.mgz and orig.mgz are the following two output images.
>>
>> I test out data with "RAS" orientation as input image, it also gets 
>> the following two output image, and the orig.mgz has the same 
>> orientation as the sample image of Freesurfer. I show them in 
>> "ourTestData.JPG". Same with the previous figure, the first row is 
>> our input image, and the second row is the following two output 
>> images. But the origin is so different. So I have the following 
>> questions:
>>
>> 1. What's the correct orientation FreeSurfer request? 
>> Is it correct for the orientation of the input image of our test 
>> data? 
>> I have found that it can applied to "RAS" and "LAS" direction for 
>> "mri_watershed". So the input image can beany orientation, is it 
>> correct?
FreeSurfer does not require any particular orientation. The orientation 
information needs to be correct. Inside of FreeSurfer, it will 
automatically be converted to LIA.
>>
>> 2. Will the "mri_robust_template" or "mri_add_xform_to_header" change 
>> the orientation of the input image to the orientation FreeSurfer request?
No.
>>
>> 3. What's the meaning of the origin shown in MRIcro? It comes from 
>> the template or ...? 
>>If the "orig.mgz" of our test data has reoriented to the 
>> orientation of FreeeSurfer, why the origin is different the 
>> "orig.mgz" of FreeSurfer sample data? 
>> And why it's changing for our test data (from the input data--> 
>> rawavg.mgz---> orig.mgz, it's always changing)?
I don't know what MRIcro is doing. The origin usually means the xyz of 
the first voxel. FS changes the orientation to LIA (and voxel size to 
1mm) because this is assumed in all subsequent processing.

doug
>>
>> Thank you so much!
>>
>> Best.
>> Yaping
>> 
>> 

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