Re: [Freesurfer] problem with mri_label2vol

2018-12-06 Thread Mareike Grotheer
External Email - Use Caution

Hi Greve,

It is a volume label that is supposed to be on the cortical ribbon. I want
to perform surface-based dilation.

Thank you,
Mareike

On Thu, Dec 6, 2018 at 9:11 AM Greve, Douglas N.,Ph.D. <
dgr...@mgh.harvard.edu> wrote:

>
> Is this a volume label that is supposed to be on the cortical ribbon? An
> you wan to do a surface-based dilation? Or do you just want to dilate it
> in 3D?
>
>
> On 12/04/2018 08:28 PM, Mareike Grotheer wrote:
> >
> > External Email - Use Caution
> >
> > Hello FreeSurfer Developers,
> >
> > I am trying to bring functional ROIs defined in a different program
> > into FreeSurfer, so that I can dilate them into the white matter with
> > –proj abs, but I am running into a problem I was hoping you could help
> > me with. Here are the steps I am taking:
> >
> > 1)I am converting my ROIs, which are in nifti format, to FreeSurfer
> > labels using:
> >
> > cmd = ['mri_vol2label --c ' outFile{1} ' --id ' num2str(roiVal(roi)) '
> > --l ' saveLabel{1} ' --surf ' subject ' ' hemi ];
> > unix(cmd);
> >
> > 2)Next, I want to dilate the labels using this:
> >
> > cmd = sprintf('!mri_label2vol --subject %s --label %s --o %s.nii.gz
> > --hemi %s --reg %s.dat --temp %s --proj abs -7 0 .1 --fillthresh
> > .001', fs_subject,labelFileName,niftiRoiName,hemisphere, tmpRegFile,
> > regMgzFile);
> > eval(cmd);
> >
> > This does not work, I get the following Error Message: ERROR: label
> > my_label.label is not a surface label.
> >
> > I can circumvent this error by manually opening the label in tksurfer
> > and saving it again. After that mri_label2vol runs without error. I
> > assume that tksurfer automatically converts the label to a surface
> > label. While this solves my problem in principle, I have many labels
> > and am hoping that there may be a better way. Do you have any ideas
> > how one could do this automatically? I am running the above code in
> > Matlab R2015a. I am using FreeSurfer version 6.0.0 on Ubuntu 12.04 LTS.
> >
> > Thank you very much,
> >
> > Mareike
> >
> >
> >
> > ___
> > 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
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] problem with mri_label2vol

2018-12-06 Thread Greve, Douglas N.,Ph.D.

Is this a volume label that is supposed to be on the cortical ribbon? An 
you wan to do a surface-based dilation? Or do you just want to dilate it 
in 3D?


On 12/04/2018 08:28 PM, Mareike Grotheer wrote:
>
> External Email - Use Caution
>
> Hello FreeSurfer Developers,
>
> I am trying to bring functional ROIs defined in a different program 
> into FreeSurfer, so that I can dilate them into the white matter with 
> –proj abs, but I am running into a problem I was hoping you could help 
> me with. Here are the steps I am taking:
>
> 1)I am converting my ROIs, which are in nifti format, to FreeSurfer 
> labels using:
>
> cmd = ['mri_vol2label --c ' outFile{1} ' --id ' num2str(roiVal(roi)) ' 
> --l ' saveLabel{1} ' --surf ' subject ' ' hemi ];
> unix(cmd);
>
> 2)Next, I want to dilate the labels using this:
>
> cmd = sprintf('!mri_label2vol --subject %s --label %s --o %s.nii.gz 
> --hemi %s --reg %s.dat --temp %s --proj abs -7 0 .1 --fillthresh 
> .001', fs_subject,labelFileName,niftiRoiName,hemisphere, tmpRegFile,  
> regMgzFile);
> eval(cmd);
>
> This does not work, I get the following Error Message: ERROR: label 
> my_label.label is not a surface label.
>
> I can circumvent this error by manually opening the label in tksurfer 
> and saving it again. After that mri_label2vol runs without error. I 
> assume that tksurfer automatically converts the label to a surface 
> label. While this solves my problem in principle, I have many labels 
> and am hoping that there may be a better way. Do you have any ideas 
> how one could do this automatically? I am running the above code in 
> Matlab R2015a. I am using FreeSurfer version 6.0.0 on Ubuntu 12.04 LTS.
>
> Thank you very much,
>
> Mareike
>
>
>
> ___
> 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

[Freesurfer] problem with mri_label2vol

2018-12-04 Thread Mareike Grotheer
   External Email - Use Caution


Hello FreeSurfer Developers,

I am trying to bring functional ROIs defined in a different program into 
FreeSurfer, so that I can dilate them into the white matter with –proj 
abs, but I am running into a problem I was hoping you could help me 
with. Here are the steps I am taking:


1)I am converting my ROIs, which are in nifti format, to FreeSurfer 
labels using:


cmd = ['mri_vol2label --c ' outFile{1} ' --id ' num2str(roiVal(roi)) ' 
--l ' saveLabel{1} ' --surf ' subject ' ' hemi ];

unix(cmd);

2)Next, I want to dilate the labels using this:

cmd = sprintf('!mri_label2vol --subject %s --label %s --o %s.nii.gz 
--hemi %s --reg %s.dat --temp %s --proj abs -7 0 .1 --fillthresh .001', 
fs_subject,labelFileName,niftiRoiName,hemisphere, tmpRegFile,  regMgzFile);

eval(cmd);

This does not work, I get the following Error Message: ERROR: label 
my_label.label is not a surface label.


I can circumvent this error by manually opening the label in tksurfer 
and saving it again. After that mri_label2vol runs without error. I 
assume that tksurfer automatically converts the label to a surface 
label. While this solves my problem in principle, I have many labels and 
am hoping that there may be a better way. Do you have any ideas how one 
could do this automatically? I am running the above code in Matlab 
R2015a. I am using FreeSurfer version 6.0.0 on Ubuntu 12.04 LTS.


Thank you very much,

Mareike

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

Re: [Freesurfer] problem with mri_label2vol for aseg

2018-04-17 Thread Douglas Greve
something strange is going on because that mri_vol2vol command has 
worked for years. Can you upload your subject's dir to our filedrop? 
https://gate.nmr.mgh.harvard.edu/filedrop2



On 4/16/18 5:40 PM, Michelle VanTieghem wrote:

Hi Bruce,
If I *just run the mri_convert command that you provided, it did not work. The 
result is the same, with randomly labeled voxels along the boundaries of GM.
*Am I supposed to run mri_convert and then also run the mri_vol2vol command?
I don't understand what you mean by trilinear sampling; because freesurfer 
recon-all resampled the data automatically, I did not control how it was done.
For mri_vol2vol, I just followed the instructions exactly as stated on the FsAnat-to-NativeAnat webpage. Can you please provide more detail as to what exactly I would need to modify in this command to alter the resampling? I have not found this website to be helpful either.https://surfer.nmr.mgh.harvard.edu/fswiki/mri_vol2vol#RequiredFlaggedArguments  
Thank you,

Michelle

Hi Michelle

from the mri dir I think you can run:
mri_convert -rl rawavg.mgz -rt nearest aseg.mgz aseg.rawavg.mgz

-rl = "reslice like"
-rt = "resample type"

cheers
Bruce

p.s. I think your problem is probably that you used trilinear 
resampling.YOu could change the resampling in mri_vol2vol and it would 
work as well


On Sun, Apr 15, 2018 at 8:30 PM, Michelle VanTieghem 
> 
wrote:


Hi Freesurfer experts,

I am trying to convert the aseg back into native space of the
anatomical T1 image. I followed the instructions as in the webpage:
https://surfer.nmr.mgh.harvard.edu/fswiki/FsAnat-to-NativeAnat


specifically this line of code:

cd $SUBJECTS_DIR//mri
mri_label2vol --seg aseg.mgz --temp rawavg.mgz --o aseg-in-rawavg.mgz 
--regheader aseg.mgz

However, the result is very odd. The aseg boundaries appear
correct in the subcortical regions. however, at the gray mater
boundaries, there are single voxels incorrectly labeled as
different subcortical-regions. As a result, in the viewer, the
gray matter boundaries look multicolored.

This is problematic, as I would like to extract a mask of specific
ROIs (e.g. right amygdala) but there are many other voxels labeled
'54' in addition to the right amygdala.

See attached images. I would greatly appreciate your assistance!!

Thank you,
Michelle


-- 
Michelle VanTieghem

PhD student in Psychology
Developmental Affective Neuroscience Lab
Columbia University
mrv2...@columbia.edu 




--
Michelle VanTieghem
PhD student in Psychology
Developmental Affective Neuroscience Lab
Columbia University
mrv2...@columbia.edu 


___
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] problem with mri_label2vol for aseg

2018-04-16 Thread Michelle VanTieghem
Hi Bruce,


If I *just run the mri_convert command that you provided, it did not
work. The result is the same, with randomly labeled voxels along the
boundaries of GM.


*Am I supposed to run mri_convert and then also run the mri_vol2vol command?

I don't understand what you mean by trilinear sampling; because
freesurfer recon-all resampled the data automatically, I did not
control how it was done.


For mri_vol2vol, I just followed the instructions exactly as stated on
the FsAnat-to-NativeAnat webpage. Can you please provide more detail
as to what exactly I would need to modify in this command to alter the
resampling? I have not found this website to be helpful either.
https://surfer.nmr.mgh.harvard.edu/fswiki/mri_vol2vol#RequiredFlaggedArguments



Thank you,

Michelle



Hi Michelle

from the mri dir I think you can run:

mri_convert -rl rawavg.mgz -rt nearest aseg.mgz aseg.rawavg.mgz

-rl = "reslice like"
-rt = "resample type"

cheers
Bruce


p.s. I think your problem is probably that you used trilinear resampling. YOu
could change the resampling in mri_vol2vol and it would work as well

On Sun, Apr 15, 2018 at 8:30 PM, Michelle VanTieghem <
michelle.vantieg...@gmail.com> wrote:

> Hi Freesurfer experts,
>
> I am trying to convert the aseg back into native space of the anatomical
> T1 image. I followed the instructions as in the webpage:
> https://surfer.nmr.mgh.harvard.edu/fswiki/FsAnat-to-NativeAnat
>
> specifically this line of code:
>
> cd $SUBJECTS_DIR//mri
> mri_label2vol --seg aseg.mgz --temp rawavg.mgz --o aseg-in-rawavg.mgz 
> --regheader aseg.mgz
>
> However, the result is very odd. The aseg boundaries appear correct in the
> subcortical regions. however, at the gray mater boundaries, there are
> single voxels incorrectly labeled as different subcortical-regions. As a
> result, in the viewer, the gray matter boundaries look multicolored.
>
> This is problematic, as I would like to extract a mask of specific ROIs
> (e.g. right amygdala) but there are many other voxels labeled '54' in
> addition to the right amygdala.
>
> See attached images. I would greatly appreciate your assistance!!
>
> Thank you,
> Michelle
>
>
> --
> Michelle VanTieghem
> PhD student in Psychology
> Developmental Affective Neuroscience Lab
> Columbia University
> mrv2...@columbia.edu
>



-- 
Michelle VanTieghem
PhD student in Psychology
Developmental Affective Neuroscience Lab
Columbia University
mrv2...@columbia.edu
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


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


Re: [Freesurfer] problem with mri_label2vol for aseg

2018-04-15 Thread Bruce Fischl

Hi Michelle

from the mri dir I think you can run:

mri_convert -rl rawavg.mgz -rt nearest aseg.mgz aseg.rawavg.mgz

-rl = "reslice like"
-rt = "resample type"

cheers
Bruce

p.s. I think your problem is probably that you used trilinear resampling. 
YOu could change the resampling in mri_vol2vol and it would work as well
On 
Sun, 15 Apr 2018, Michelle 
VanTieghem wrote:



Hi Freesurfer experts, 

I am trying to convert the aseg back into native space of the anatomical T1 
image. I followed the
instructions as in the webpage:
https://surfer.nmr.mgh.harvard.edu/fswiki/FsAnat-to-NativeAnat

specifically this line of code:

cd $SUBJECTS_DIR//mri
mri_label2vol --seg aseg.mgz --temp rawavg.mgz --o aseg-in-rawavg.mgz 
--regheader aseg.mgz
However, the result is very odd. The aseg boundaries appear correct in the 
subcortical regions.
however, at the gray mater boundaries, there are single voxels incorrectly 
labeled as different
subcortical-regions. As a result, in the viewer, the gray matter boundaries 
look multicolored. 

This is problematic, as I would like to extract a mask of specific ROIs (e.g. 
right amygdala) but
there are many other voxels labeled '54' in addition to the right amygdala. 

See attached images. I would greatly appreciate your assistance!! 

Thank you, 
Michelle 


--
Michelle VanTieghem
PhD student in Psychology
Developmental Affective Neuroscience Lab
Columbia University 
mrv2...@columbia.edu

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


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


[Freesurfer] problem with mri_label2vol for aseg

2018-04-15 Thread Michelle VanTieghem
Hi Freesurfer experts,

I am trying to convert the aseg back into native space of the anatomical T1
image. I followed the instructions as in the webpage:
https://surfer.nmr.mgh.harvard.edu/fswiki/FsAnat-to-NativeAnat

specifically this line of code:

cd $SUBJECTS_DIR//mri
mri_label2vol --seg aseg.mgz --temp rawavg.mgz --o aseg-in-rawavg.mgz
--regheader aseg.mgz

However, the result is very odd. The aseg boundaries appear correct in the
subcortical regions. however, at the gray mater boundaries, there are
single voxels incorrectly labeled as different subcortical-regions. As a
result, in the viewer, the gray matter boundaries look multicolored.

This is problematic, as I would like to extract a mask of specific ROIs
(e.g. right amygdala) but there are many other voxels labeled '54' in
addition to the right amygdala.

See attached images. I would greatly appreciate your assistance!!

Thank you,
Michelle


-- 
Michelle VanTieghem
PhD student in Psychology
Developmental Affective Neuroscience Lab
Columbia University
mrv2...@columbia.edu
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


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