Re: [Freesurfer] creating a gca file from .mgz files

2012-09-06 Thread Jeff Thompson

The command line to get the aseg was: 

Mri_convert -rt nearest -c file containing all valued label masks.nii.gz 
aseg.mgz

Fslmaths was used to match label values to the colour lut and combine them all 
into one file.

Thanks,

Jeff 

On 2012-09-05, at 1:05 PM, Bruce Fischl fis...@nmr.mgh.harvard.edu wrote:

 what is your mri_convert command line?
 
 On Wed, 5 Sep 2012, Jeff Thompson wrote:
 
 Hello,
 I got mri_ca_train to complete and to produce a .gca file, which looks to be
 what is expected after splitting it up into means/labels/priors files. 
 The problem was the norm.mgz file. I ended up copying and renaming the
 T1.mgz file to replace the norm.mgz file, and it seemed to work in
 mri_ca_train.
 I am now having trouble with the aseg.mgz file in mri_normalize. It states
 that the aseg.mgz file needs to be conformed. When I conform the image the
 label values are way off. I tried the mri_convert 
 conform with the rt nearest , but the label values seemed to still be off.
 The file I have has dimensions of : ~0.6 , 0.6 , 1.0 mm and 256x256x90.   
 Any recommendations to solve this problem?
 Thank you,
 Jeff Thompson
  Subject: Re: [Freesurfer] creating a gca file from .mgz files
  From: ni...@nmr.mgh.harvard.edu
  To: jeff_rthomp...@hotmail.com
  CC: fis...@nmr.mgh.harvard.edu; freesurfer@nmr.mgh.harvard.edu
  Date: Wed, 29 Aug 2012 19:56:09 -0400
 
  i think there should be an error log that outputs the errors that
  mri_ca_train found. or you can run mri_ca_train with the -check flag.
  it performs checks looking for voxels that are in the wrong hemisphere,
  based on the talairach registration.
 
  for mri_convert, be sure to include the flag
 
  -rt nearest
 
  which overrides the default resample type of 'interpolate', which is not
  appropriate for labeled volumes.
 
  n.
 
 
  On Wed, 2012-08-29 at 18:20 -0300, Jeff Thompson wrote:
   Hello,
  
  
   Still getting the bus error when running mri_ca_train. I tried running
   it after I conformed the manually labelled volume as well.
  
  
   I've been working on getting rebuild_gca_atlas.csh to work. I don't
   know how to get the labelled volume to conform when converting the
   labelled volume to .mgz with mri_convert without throwing all of the
   label values off.
  
  
   This resulted in a lot of errors when running rebuild_gca_atlas.csh
   and gave an error stating
  
  
   ERROR: mri_ca_train check found 1 subjects with bad labels!
  
  
  
  
   Thanks,
  
   Jeff Thompson
  
  
  
  
  
   __
   CC: freesurfer@nmr.mgh.harvard.edu
   From: fis...@nmr.mgh.harvard.edu
   Subject: Re: [Freesurfer] creating a gca file from .mgz files
   Date: Tue, 28 Aug 2012 20:12:45 -0400
   To: jeff_rthomp...@hotmail.com
  
   Oh, so you still got a bus error? I didn't realize that. Make sure the
   seg volumes are ok
  
  
  
  
   On Aug 28, 2012, at 6:10 PM, Jeff Thompson
   jeff_rthomp...@hotmail.com wrote:
  
  
  
   Hopefully that doesn't scale the values I will make sure it
   doesn't.
  
  
   When running mri_ca_train by itself after changing to float
   the next error was the Bus error.
  
  
   When running rebuild_gca_atlas.csh I was having problems with
   pbsubmit, but after avoiding that it seems to be stuck with
   mri_ca_train.
  
  
  
  
  
  
Date: Tue, 28 Aug 2012 17:02:51 -0400
From: fis...@nmr.mgh.harvard.edu
To: jeff_rthomp...@hotmail.com
CC: freesurfer@nmr.mgh.harvard.edu
Subject: RE: [Freesurfer] creating a gca file from .mgz
   files
   
does that scale the values? Hopefully not. It sounds like
   things don't fail
after you changed to float until you get the pbsubmit
   problem, correct?
   
On Tue, 28 Aug 2012, Jeff Thompson wrote:
   
 To change to type Float I used:
 fslmaths Alloybrain_mask_LUTComplete.nii.gz -thr 0
 Alloybrain_mask_LUTComplete_float.nii.gz -odt float

 I will try some other methods for changing the data type,
   but if that isn't
 the issue are there other cases of getting similar errors
   from mri_ca_train?

 thanks,

 Jeff






  Date: Tue, 28 Aug 2012 16:37:19 -0400
  From: fis...@nmr.mgh.harvard.edu
  To: jeff_rthomp...@hotmail.com
  CC: freesurfer@nmr.mgh.harvard.edu
  Subject: RE: [Freesurfer] creating a gca file from .mgz
   files
 
  how did you change the type to float? Make sure it
   doesn't scale the
  inputs if that is the segmentation volume.
   rebuild_gca_atlas.csh uses our
  compute cluster queueing system which is what the
   pbsubmit script is.
  You'll need to modify it to use whatever cluster you are
   using or to run
  them in series
 
  cheers
  Bruce
  On Tue, 28 Aug 2012, Jeff Thompson wrote:
 
  
   Hello,
   When running the mri_ca_train I am getting a Bus error
   near the
 beginning of
   it.
  
   'bash-3.2$ mri_ca_train

Re: [Freesurfer] creating a gca file from .mgz files

2012-08-29 Thread Jeff Thompson

Hello,
Still getting the bus error when running mri_ca_train. I tried running it after 
I conformed the manually labelled volume as well.
I've been working on getting rebuild_gca_atlas.csh to work. I don't know how to 
get the labelled volume to conform when converting the labelled volume to .mgz 
with mri_convert without throwing all of the label values off. 
This resulted in a lot of errors when running rebuild_gca_atlas.csh and gave an 
error stating 
ERROR: mri_ca_train check found 1 subjects with bad labels!

Thanks,
Jeff Thompson



CC: freesurfer@nmr.mgh.harvard.edu
From: fis...@nmr.mgh.harvard.edu
Subject: Re: [Freesurfer] creating a gca file from .mgz files
Date: Tue, 28 Aug 2012 20:12:45 -0400
To: jeff_rthomp...@hotmail.com

Oh, so you still got a bus error? I didn't realize that. Make sure the seg 
volumes are ok



On Aug 28, 2012, at 6:10 PM, Jeff Thompson jeff_rthomp...@hotmail.com wrote:





Hopefully that doesn't scale the values I will make sure it doesn't. 
When running mri_ca_train by itself after changing to float the next error was 
the Bus error.
When running rebuild_gca_atlas.csh I was having problems with pbsubmit, but 
after avoiding that it seems to be stuck with mri_ca_train.



 Date: Tue, 28 Aug 2012 17:02:51 -0400
 From: fis...@nmr.mgh.harvard.edu
 To: jeff_rthomp...@hotmail.com
 CC: freesurfer@nmr.mgh.harvard.edu
 Subject: RE: [Freesurfer] creating a gca file from .mgz files
 
 does that scale the values? Hopefully not. It sounds like things don't fail 
 after you changed to float until you get the pbsubmit problem, correct?
 
 On Tue, 28 Aug 2012, Jeff Thompson wrote:
 
  To change to type Float I used:  
  fslmaths Alloybrain_mask_LUTComplete.nii.gz -thr 0
  Alloybrain_mask_LUTComplete_float.nii.gz -odt float
  
  I will try some other methods for changing the data type, but if that isn't
  the issue are there other cases of getting similar errors from mri_ca_train?
  
  thanks,
  
  Jeff
  
  
  
  
  
  
   Date: Tue, 28 Aug 2012 16:37:19 -0400
   From: fis...@nmr.mgh.harvard.edu
   To: jeff_rthomp...@hotmail.com
   CC: freesurfer@nmr.mgh.harvard.edu
   Subject: RE: [Freesurfer] creating a gca file from .mgz files
  
   how did you change the type to float? Make sure it doesn't scale the
   inputs if that is the segmentation volume. rebuild_gca_atlas.csh uses our
   compute cluster queueing system which is what the pbsubmit script is.
   You'll need to modify it to use whatever cluster you are using or to run
   them in series
  
   cheers
   Bruce
   On Tue, 28 Aug 2012, Jeff Thompson wrote:
  
   
Hello,
When running the mri_ca_train I am getting a Bus error near the
  beginning of
it. 
   
'bash-3.2$ mri_ca_train -parc_dir Alloybrain_mask_LUTComplete_float.mgz
  -T1
norm.mgz Alloy single_oneAlloy.gcareading segmentation from subject's
mri/Alloybrain_mask_LUTComplete_float.mgz directory
reading T1 data from subject's mri/norm.mgz directory
training on 1 subject and writing results to single_oneAlloy.gca
gcaAllocMax: node dims 64 64 64
gcaAllocMax: prior dims 128 128 128
gcaAllocMax: max_labels 4
   ***
  
processing subject Alloy, 1 of 1...
   reading input 0: Desktop/freesurfer/subjects/Alloy/mri/norm.mgz
Bus error
'
Previously it was giving an error saying that :mri_ca_train:
  segmentation
file
   
  Desktop/freesurfer/subjects/Buddha/mri/Alloybrain_mask_LUTComplete.nii.gz is
not type UCHAR or FLOAT
   
So I changed the file type to float to get rid of that.
Any ideas?
   
When I run rebuild_gca_atlas.csh it gives a pbsubmit command not found
error. If I have a cluster to use, but am able to just load everything
  onto
it and then run it, can I comment out all of the pbsubmit lines?
   
Thank you for all the help,
   
Jeff
   
 Date: Mon, 27 Aug 2012 12:00:13 -0400
 From: fis...@nmr.mgh.harvard.edu
 To: jeff_rthomp...@hotmail.com
 CC: freesurfer@nmr.mgh.harvard.edu
 Subject: RE: [Freesurfer] creating a gca file from .mgz files

 Hi Jefff
 you can give mri_ca_normalize a flag to tell it to use a manual
 segmentation instead of the gca. Try -seg manual seg volume. Then
  the
 gca name won't matter - it should ignore it.

 You could use label2label I guess, although if it's accurate across
  brains
 then you probably don't need it and can just build the gca from a
  handful
 of brains instead of the dozens we need for humans

 cheers
 Bruce


 On Mon, 27 Aug 2012, Jeff
 Thompson wrote:

  Hello,
  Okay, but from looking at the recon-all pipeline it looks like to
generate
  the norm.mgz file the .gca atlas is needed first. If I create the
  seg_edited.mgz file from my manually labelled file can I use that in
  rebuild_gca_atlas.csh to generate the .gca atlas? This would
  incorporate

Re: [Freesurfer] creating a gca file from .mgz files

2012-08-28 Thread Jeff Thompson


Hello,
When running the mri_ca_train I am getting a Bus error near the beginning of 
it. 
'bash-3.2$ mri_ca_train -parc_dir Alloybrain_mask_LUTComplete_float.mgz -T1 
norm.mgz Alloy single_oneAlloy.gcareading segmentation from subject's 
mri/Alloybrain_mask_LUTComplete_float.mgz directoryreading T1 data from 
subject's mri/norm.mgz directorytraining on 1 subject and writing results to 
single_oneAlloy.gcagcaAllocMax: node dims 64 64 64gcaAllocMax: prior dims 128 
128 128gcaAllocMax: max_labels 
4***processing
 subject Alloy, 1 of 1...   reading input 0: 
Desktop/freesurfer/subjects/Alloy/mri/norm.mgzBus error'Previously it was 
giving an error saying that :mri_ca_train: segmentation file 
Desktop/freesurfer/subjects/Buddha/mri/Alloybrain_mask_LUTComplete.nii.gz is 
not type UCHAR or FLOAT
So I changed the file type to float to get rid of that.Any ideas?
When I run rebuild_gca_atlas.csh it gives a pbsubmit command not found error. 
If I have a cluster to use, but am able to just load everything onto it and 
then run it, can I comment out all of the pbsubmit lines?
Thank you for all the help,
Jeff
 Date: Mon, 27 Aug 2012 12:00:13 -0400
 From: fis...@nmr.mgh.harvard.edu
 To: jeff_rthomp...@hotmail.com
 CC: freesurfer@nmr.mgh.harvard.edu
 Subject: RE: [Freesurfer] creating a gca file from .mgz files
 
 Hi Jefff
 you can give mri_ca_normalize a flag to tell it to use a manual 
 segmentation instead of the gca. Try -seg manual seg volume. Then the 
 gca name won't matter - it should ignore it.
 
 You could use label2label I guess, although if it's accurate across brains 
 then you probably don't need it and can just build the gca from a handful 
 of brains instead of the dozens we need for humans
 
 cheers
 Bruce
 
 
 On Mon, 27 Aug 2012, Jeff 
 Thompson wrote:
 
  Hello,
  Okay, but from looking at the recon-all pipeline it looks like to generate
  the norm.mgz file the .gca atlas is needed first. If I create the
  seg_edited.mgz file from my manually labelled file can I use that in
  rebuild_gca_atlas.csh to generate the .gca atlas? This would incorporate the
  mri_ca_train, is that correct?
  
  The other question I have is regarding mri_label2label. If I have manually
  labelled one brain from my set, can I use mri_label2label to convert these
  labels to other dog brains in my set if they have been registered to the
  first brain used?
  
  Thank you,
  
  
  
  Jeff Thompson
  
  
  
   Date: Sat, 25 Aug 2012 11:11:46 -0400
   From: fis...@nmr.mgh.harvard.edu
   To: jeff_rthomp...@hotmail.com
   CC: freesurfer@nmr.mgh.harvard.edu
   Subject: Re: [Freesurfer] creating a gca file from .mgz files
  
   Hi Jeff
  
   it's more complicated than that. You need a .mgz volume for every subject
   you want to train on that contains the labels, and an accompanying
   intensity volume (we usually use the norm.mgz for this purpose). Then we
   extract statistics to create the .gca across these subjects using
   mri_ca_train
  
   cheers
   Bruce
  
  
   On Thu, 23
   Aug 2012, Jeff Thompson wrote:
  
From the gcaFormat freesurfer wiki page I know that: The .gca file is
composed of three volumes, which can be extracted like this:
   
mri_convert atlas.gca -nth 0 means.mgz
mri_convert atlas.gca -nth 1 labels.mgz
mri_convert atlas.gca -nth 2 priors.mgz
   
where:
   
*
   
means -- the mean intensity of the most likely label
   
*
   
labels -- indices of the most likely label at each voxel (indices refer
to '#No.' column of $FREESURFER_HOME/FreeSurferColorLUT.txt)
   
*
   
priors -- the probability that that label occurs at that voxel
   
   
Is it possible to go the other way? I want to create the labels.mgz file
  and
the others manually, and turn that into the .gca file with mri_convert.
   
Can this be done?
   
Thank you,
   
Jeff Thompson
   
   
   
   
  
  
   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

Re: [Freesurfer] creating a gca file from .mgz files

2012-08-28 Thread Jeff Thompson

To change to type Float I used:  fslmaths 
Alloybrain_mask_LUTComplete.nii.gz -thr 0 
Alloybrain_mask_LUTComplete_float.nii.gz -odt float

I will try some other methods for changing the data type, but if that isn't the 
issue are there other cases of getting similar errors from mri_ca_train?

thanks,
Jeff





 Date: Tue, 28 Aug 2012 16:37:19 -0400
 From: fis...@nmr.mgh.harvard.edu
 To: jeff_rthomp...@hotmail.com
 CC: freesurfer@nmr.mgh.harvard.edu
 Subject: RE: [Freesurfer] creating a gca file from .mgz files
 
 how did you change the type to float? Make sure it doesn't scale the 
 inputs if that is the segmentation volume. rebuild_gca_atlas.csh uses our 
 compute cluster queueing system which is what the pbsubmit script is. 
 You'll need to modify it to use whatever cluster you are using or to run 
 them in series
 
 cheers
 Bruce
 On Tue, 28 Aug 2012, Jeff Thompson wrote:
 
  
  Hello,
  When running the mri_ca_train I am getting a Bus error near the beginning of
  it. 
  
  'bash-3.2$ mri_ca_train -parc_dir Alloybrain_mask_LUTComplete_float.mgz -T1
  norm.mgz Alloy single_oneAlloy.gcareading segmentation from subject's
  mri/Alloybrain_mask_LUTComplete_float.mgz directory
  reading T1 data from subject's mri/norm.mgz directory
  training on 1 subject and writing results to single_oneAlloy.gca
  gcaAllocMax: node dims 64 64 64
  gcaAllocMax: prior dims 128 128 128
  gcaAllocMax: max_labels 4
  ***
  processing subject Alloy, 1 of 1...
 reading input 0: Desktop/freesurfer/subjects/Alloy/mri/norm.mgz
  Bus error
  '
  Previously it was giving an error saying that :mri_ca_train: segmentation
  file
  Desktop/freesurfer/subjects/Buddha/mri/Alloybrain_mask_LUTComplete.nii.gz is
  not type UCHAR or FLOAT
  
  So I changed the file type to float to get rid of that.
  Any ideas?
  
  When I run rebuild_gca_atlas.csh it gives a pbsubmit command not found
  error. If I have a cluster to use, but am able to just load everything onto
  it and then run it, can I comment out all of the pbsubmit lines?
  
  Thank you for all the help,
  
  Jeff
  
   Date: Mon, 27 Aug 2012 12:00:13 -0400
   From: fis...@nmr.mgh.harvard.edu
   To: jeff_rthomp...@hotmail.com
   CC: freesurfer@nmr.mgh.harvard.edu
   Subject: RE: [Freesurfer] creating a gca file from .mgz files
  
   Hi Jefff
   you can give mri_ca_normalize a flag to tell it to use a manual
   segmentation instead of the gca. Try -seg manual seg volume. Then the
   gca name won't matter - it should ignore it.
  
   You could use label2label I guess, although if it's accurate across brains
   then you probably don't need it and can just build the gca from a handful
   of brains instead of the dozens we need for humans
  
   cheers
   Bruce
  
  
   On Mon, 27 Aug 2012, Jeff
   Thompson wrote:
  
Hello,
Okay, but from looking at the recon-all pipeline it looks like to
  generate
the norm.mgz file the .gca atlas is needed first. If I create the
seg_edited.mgz file from my manually labelled file can I use that in
rebuild_gca_atlas.csh to generate the .gca atlas? This would incorporate
  the
mri_ca_train, is that correct?
   
The other question I have is regarding mri_label2label. If I have
  manually
labelled one brain from my set, can I use mri_label2label to convert
  these
labels to other dog brains in my set if they have been registered to the
first brain used?
   
Thank you,
   
   
   
Jeff Thompson
   
   
   
 Date: Sat, 25 Aug 2012 11:11:46 -0400
 From: fis...@nmr.mgh.harvard.edu
 To: jeff_rthomp...@hotmail.com
 CC: freesurfer@nmr.mgh.harvard.edu
 Subject: Re: [Freesurfer] creating a gca file from .mgz files

 Hi Jeff

 it's more complicated than that. You need a .mgz volume for every
  subject
 you want to train on that contains the labels, and an accompanying
 intensity volume (we usually use the norm.mgz for this purpose). Then
  we
 extract statistics to create the .gca across these subjects using
 mri_ca_train

 cheers
 Bruce


 On Thu, 23
 Aug 2012, Jeff Thompson wrote:

  From the gcaFormat freesurfer wiki page I know that: The .gca file
  is
  composed of three volumes, which can be extracted like this:
 
  mri_convert atlas.gca -nth 0 means.mgz
  mri_convert atlas.gca -nth 1 labels.mgz
  mri_convert atlas.gca -nth 2 priors.mgz
 
  where:
 
  *
 
  means -- the mean intensity of the most likely label
 
  *
 
  labels -- indices of the most likely label at each voxel (indices
  refer
  to '#No.' column of $FREESURFER_HOME/FreeSurferColorLUT.txt)
 
  *
 
  priors -- the probability that that label occurs at that voxel
 
 
  Is it possible to go the other way? I want to create the labels.mgz
  file
and
  the others manually, and turn

Re: [Freesurfer] creating a gca file from .mgz files

2012-08-28 Thread Jeff Thompson

Hopefully that doesn't scale the values I will make sure it doesn't. 
When running mri_ca_train by itself after changing to float the next error was 
the Bus error.
When running rebuild_gca_atlas.csh I was having problems with pbsubmit, but 
after avoiding that it seems to be stuck with mri_ca_train.



 Date: Tue, 28 Aug 2012 17:02:51 -0400
 From: fis...@nmr.mgh.harvard.edu
 To: jeff_rthomp...@hotmail.com
 CC: freesurfer@nmr.mgh.harvard.edu
 Subject: RE: [Freesurfer] creating a gca file from .mgz files
 
 does that scale the values? Hopefully not. It sounds like things don't fail 
 after you changed to float until you get the pbsubmit problem, correct?
 
 On Tue, 28 Aug 2012, Jeff Thompson wrote:
 
  To change to type Float I used:  
  fslmaths Alloybrain_mask_LUTComplete.nii.gz -thr 0
  Alloybrain_mask_LUTComplete_float.nii.gz -odt float
  
  I will try some other methods for changing the data type, but if that isn't
  the issue are there other cases of getting similar errors from mri_ca_train?
  
  thanks,
  
  Jeff
  
  
  
  
  
  
   Date: Tue, 28 Aug 2012 16:37:19 -0400
   From: fis...@nmr.mgh.harvard.edu
   To: jeff_rthomp...@hotmail.com
   CC: freesurfer@nmr.mgh.harvard.edu
   Subject: RE: [Freesurfer] creating a gca file from .mgz files
  
   how did you change the type to float? Make sure it doesn't scale the
   inputs if that is the segmentation volume. rebuild_gca_atlas.csh uses our
   compute cluster queueing system which is what the pbsubmit script is.
   You'll need to modify it to use whatever cluster you are using or to run
   them in series
  
   cheers
   Bruce
   On Tue, 28 Aug 2012, Jeff Thompson wrote:
  
   
Hello,
When running the mri_ca_train I am getting a Bus error near the
  beginning of
it. 
   
'bash-3.2$ mri_ca_train -parc_dir Alloybrain_mask_LUTComplete_float.mgz
  -T1
norm.mgz Alloy single_oneAlloy.gcareading segmentation from subject's
mri/Alloybrain_mask_LUTComplete_float.mgz directory
reading T1 data from subject's mri/norm.mgz directory
training on 1 subject and writing results to single_oneAlloy.gca
gcaAllocMax: node dims 64 64 64
gcaAllocMax: prior dims 128 128 128
gcaAllocMax: max_labels 4
   ***
  
processing subject Alloy, 1 of 1...
   reading input 0: Desktop/freesurfer/subjects/Alloy/mri/norm.mgz
Bus error
'
Previously it was giving an error saying that :mri_ca_train:
  segmentation
file
   
  Desktop/freesurfer/subjects/Buddha/mri/Alloybrain_mask_LUTComplete.nii.gz is
not type UCHAR or FLOAT
   
So I changed the file type to float to get rid of that.
Any ideas?
   
When I run rebuild_gca_atlas.csh it gives a pbsubmit command not found
error. If I have a cluster to use, but am able to just load everything
  onto
it and then run it, can I comment out all of the pbsubmit lines?
   
Thank you for all the help,
   
Jeff
   
 Date: Mon, 27 Aug 2012 12:00:13 -0400
 From: fis...@nmr.mgh.harvard.edu
 To: jeff_rthomp...@hotmail.com
 CC: freesurfer@nmr.mgh.harvard.edu
 Subject: RE: [Freesurfer] creating a gca file from .mgz files

 Hi Jefff
 you can give mri_ca_normalize a flag to tell it to use a manual
 segmentation instead of the gca. Try -seg manual seg volume. Then
  the
 gca name won't matter - it should ignore it.

 You could use label2label I guess, although if it's accurate across
  brains
 then you probably don't need it and can just build the gca from a
  handful
 of brains instead of the dozens we need for humans

 cheers
 Bruce


 On Mon, 27 Aug 2012, Jeff
 Thompson wrote:

  Hello,
  Okay, but from looking at the recon-all pipeline it looks like to
generate
  the norm.mgz file the .gca atlas is needed first. If I create the
  seg_edited.mgz file from my manually labelled file can I use that in
  rebuild_gca_atlas.csh to generate the .gca atlas? This would
  incorporate
the
  mri_ca_train, is that correct?
 
  The other question I have is regarding mri_label2label. If I have
manually
  labelled one brain from my set, can I use mri_label2label to convert
these
  labels to other dog brains in my set if they have been registered to
  the
  first brain used?
 
  Thank you,
 
 
 
  Jeff Thompson
 
 
 
   Date: Sat, 25 Aug 2012 11:11:46 -0400
   From: fis...@nmr.mgh.harvard.edu
   To: jeff_rthomp...@hotmail.com
   CC: freesurfer@nmr.mgh.harvard.edu
   Subject: Re: [Freesurfer] creating a gca file from .mgz files
  
   Hi Jeff
  
   it's more complicated than that. You need a .mgz volume for every
subject
   you want to train on that contains the labels, and an accompanying
   intensity volume (we usually use the norm.mgz for this purpose).
  Then
we

Re: [Freesurfer] creating a gca file from .mgz files

2012-08-27 Thread Jeff Thompson

Hello,
Okay, but from looking at the recon-all pipeline it looks like to generate the 
norm.mgz file the .gca atlas is needed first. If I create the seg_edited.mgz 
file from my manually labelled file can I use that in rebuild_gca_atlas.csh to 
generate the .gca atlas? This would incorporate the mri_ca_train, is that 
correct?
The other question I have is regarding mri_label2label. If I have manually 
labelled one brain from my set, can I use mri_label2label to convert these 
labels to other dog brains in my set if they have been registered to the first 
brain used?
Thank you,


Jeff Thompson



 Date: Sat, 25 Aug 2012 11:11:46 -0400
 From: fis...@nmr.mgh.harvard.edu
 To: jeff_rthomp...@hotmail.com
 CC: freesurfer@nmr.mgh.harvard.edu
 Subject: Re: [Freesurfer] creating a gca file from .mgz files
 
 Hi Jeff
 
 it's more complicated than that. You need a .mgz volume for every subject 
 you want to train on that contains the labels, and an accompanying 
 intensity volume (we usually use the norm.mgz for this purpose). Then we 
 extract statistics to create the .gca across these subjects using 
 mri_ca_train
 
 cheers
 Bruce
 
 
 On Thu, 23 
 Aug 2012, Jeff Thompson wrote:
 
  From the gcaFormat freesurfer wiki page I know that: The .gca file is
  composed of three volumes, which can be extracted like this:
  
  mri_convert atlas.gca -nth 0 means.mgz
  mri_convert atlas.gca -nth 1 labels.mgz
  mri_convert atlas.gca -nth 2 priors.mgz
  
  where:
 
   * 
 
  means -- the mean intensity of the most likely label
 
   * 
 
  labels -- indices of the most likely label at each voxel (indices refer
  to '#No.' column of $FREESURFER_HOME/FreeSurferColorLUT.txt)
 
   * 
 
  priors -- the probability that that label occurs at that voxel
  
  
  Is it possible to go the other way? I want to create the labels.mgz file and
  the others manually, and turn that into the .gca file with mri_convert.
  
  Can this be done?
  
  Thank you,
  
  Jeff Thompson
  
  
  
 
 
 
 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] creating labels, new atlas

2012-08-23 Thread Jeff Thompson

Hello,
How can tksurfer be used to create label files for the purpose of making a new 
atlas, if that atlas is needed to create the surface files needed to view the 
brain in tksurfer? Would people use FSL to create the masks, and convert them 
into what is needed for freesurfer or is there another way?
Thank you,

Jeff Thompson


  ___
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] creating labels, new atlas

2012-08-23 Thread Jeff Thompson

I found this info on the tksurfer webpage. 
The label file format is interchangable with TkMedit. You can create a label in 
TkSurfer, save it, and load it in TkMedit, or vice versa.



Jeff Thompson



From: jeff_rthomp...@hotmail.com
To: freesurfer@nmr.mgh.harvard.edu
Subject: creating labels, new atlas
Date: Thu, 23 Aug 2012 10:48:46 -0300





Hello,
How can tksurfer be used to create label files for the purpose of making a new 
atlas, if that atlas is needed to create the surface files needed to view the 
brain in tksurfer? Would people use FSL to create the masks, and convert them 
into what is needed for freesurfer or is there another way?
Thank you,

Jeff Thompson



  ___
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] creating a gca file from .mgz files

2012-08-23 Thread Jeff Thompson

From the gcaFormat freesurfer wiki page I know that: The .gca file is composed 
of three volumes, which can be extracted like this:mri_convert atlas.gca -nth 
0 means.mgz
mri_convert atlas.gca -nth 1 labels.mgz
mri_convert atlas.gca -nth 2 priors.mgzwhere:means -- the mean intensity of 
the most likely labellabels -- indices of the most likely label at each voxel 
(indices refer to '#No.' column of 
$FREESURFER_HOME/FreeSurferColorLUT.txt)priors -- the probability that that 
label occurs at that voxel
Is it possible to go the other way? I want to create the labels.mgz file and 
the others manually, and turn that into the .gca file with mri_convert.
Can this be done?
Thank you,
Jeff Thompson


  ___
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] GCA file for non-human recon-all use

2012-08-21 Thread Jeff Thompson

Hello, I have a few questions that I hope can be answered:
Q1:How can '.label' files be turned into the necessary '.gca' file needed for 
the recon-all pipeline. Starting for the first step in auto-recon2.What else 
other than the '.label' files  would be needed to create this '.gca' file?
Q2: How to get the seg_edited.mgz file? I would want to use this file in the 
rebuild_gca_atas.csh script.
Q3:Can the rebuild_gca_atlas.csh script be used to make a replacement for the 
RB_all_2008-03-26.gca file from the average folder?
Q4:Is there a way to avoid needing the .gca file if cortical thickness 
measurements is the only goal?Or could there be a limited number of labels 
needed incorporated into the .gca file for this goal. Ex. Just Cerebral cortex 
ROI's.

Thank you for any help,



Jeff Thompson


  ___
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] Creating and using an atlas from scratch‏

2012-08-14 Thread Jeff Thompson



Hi,I have run talairach_avi with the template I have made, and an input file 
that is manually skull stripped. I ran: talairach_avi --i input.nii.gz 
--atlas avgeragetemplate --xfm talairach_avitest.xfmI had put the 
averagetemplate.nii.gz file in the average folder in freesurfer for this to 
work.  I also have averagetemplate.4dfp.hdr  ,  averagetemplate.4dfp.img , 
averagetemplate.4dfp.mat in the average folder.Running this creates  
talsrcimg.hdr, talsrcimg.img, talsrcimg.mat in the folder where I ran the 
script. However in the talairach_avi log it gives an error saying 
/Applications/freesurfer/average/averagetemplate.4dfp.ifh does not exist! How 
can I create this file?I found a brief note in a mailing list that mentioned 
analyzeto4dfp talsrcimg -O0 -y:$Id: ifh2hdr.c,v 1.3 2007/05/05 10:45:03 nicks 
Exp $
Sat Dec 31 03:27:10 2011
Writing: talsrcimg.4dfp.hdr
$Id: analyzeto4dfp.c,v 1.2 2007/05/05 00:00:06 nicks Exp $
Reading: talsrcimg.hdr
header size 348 bytes
hdr.dime.datatype   offset=70   value=2
hdr.dime.bitpix offset=72   value=8
hdr.hist.orient offset=252  value=-1
dimensionality 4
dimensions   256   256   256 1
Reading: talsrcimg.img
Writing: talsrcimg.4dfp.img
Writing: talsrcimg.4dfp.ifh
ifh2hdr talsrcimg -r0to255
ori=2
However, I don't know what I need to run this. Will I need to install analyze 
and 4dfp to be able to run analyzeto4dfp? Or is there another way to get this 
averagetemplate.4dfp.ifh file?Thanks,-Jeff
  ___
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] analyzeto4dfp to get a talsrcimg.4dfp.ifh file

2012-08-14 Thread Jeff Thompson



Hi,I have run talairach_avi with the template I have made, and an input file 
that is manually skull stripped. I ran: talairach_avi --i input.nii.gz 
--atlas avgeragetemplate --xfm talairach_avitest.xfmI had put the 
averagetemplate.nii.gz file in the average folder in freesurfer for this to 
work.  I also have averagetemplate.4dfp.hdr  ,  averagetemplate.4dfp.img , 
averagetemplate.4dfp.mat in the average folder.Running this creates  
talsrcimg.hdr, talsrcimg.img, talsrcimg.mat in the folder where I ran the 
script. However in the talairach_avi log it gives an error saying 
/Applications/freesurfer/average/averagetemplate.4dfp.ifh does not exist! How 
can I create this file?I found a brief note in a mailing list that mentioned 
analyzeto4dfp talsrcimg -O0 -y:$Id: ifh2hdr.c,v 1.3 2007/05/05 10:45:03 nicks 
Exp $
Sat Dec 31 03:27:10 2011
Writing: talsrcimg.4dfp.hdr
$Id: analyzeto4dfp.c,v 1.2 2007/05/05 00:00:06 nicks Exp $
Reading: talsrcimg.hdr
header size 348 bytes
hdr.dime.datatype   offset=70   value=2
hdr.dime.bitpix offset=72   value=8
hdr.hist.orient offset=252  value=-1
dimensionality 4
dimensions   256   256   256 1
Reading: talsrcimg.img
Writing: talsrcimg.4dfp.img
Writing: talsrcimg.4dfp.ifh
ifh2hdr talsrcimg -r0to255
ori=2
However, I don't know what I need to run this. Will I need to install analyze 
and 4dfp to be able to run analyzeto4dfp? Or is there another way to get this 
averagetemplate.4dfp.ifh file?Thanks,-Jeff
  ___
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] MCSRCH ERROR

2012-06-06 Thread Jeff Thompson

Hi -

Was there ever a solution found for this? I am currently having the same 
problem.

Thanks,

Jeff Thompson

Can you send us e recon-all.log file?



On Aug 8, 2011, at 4:30 AM, Irwin, William WIrwin at memory.ucsf.edu wrote:

 Hi-
 
  
 
 I’m at a bit of a loss as to how to address and/or fix these errors.
 
  
 
 The native input images are very good quality; the conversion to T1.mgz is 
 fine; the brainmask.mgz is good, a bit of dura remained at the 
 parietal/occipital region (very common); otherwise, the skull stripping is 
 very clean.
 
  
 
 The recon-all “finished” but with errors as expected. Processing “continued” 
 to the end, but there is no output except in /mri and /touch.
 
  
 
 Doing: #@# Skull Stripping
 
  
 
 First under “Computing MAP estimate using 3481 samples...”
 
  
 
 IFLAG= -1  LINE SEARCH FAILED. SEE DOCUMENTATION OF ROUTINE MCSRCH ERROR 
 RETURN OF LINE SEARCH: INFO= 3 POSSIBLE CAUSES: FUNCTION OR GRADIENT ARE 
 INCORRECT OR INCORRECT TOLERANCESoutof QuasiNewtonEMA: 005: -log(p) = 10327.2 
  tol 0.10
 
  
 
 Then several of the same under “EM alignment process ...”
 
  
 
 IFLAG= -1  LINE SEARCH FAILED. SEE DOCUMENTATION OF ROUTINE MCSRCH ERROR 
 RETURN OF LINE SEARCH: INFO= 3 POSSIBLE CAUSES: FUNCTION OR GRADIENT ARE 
 INCORRECT OR INCORRECT TOLERANCESpass 2 through quasi-newton minimization...
 
  
 
 IFLAG= -1  LINE SEARCH FAILED. SEE DOCUMENTATION OF ROUTINE MCSRCH ERROR 
 RETURN OF LINE SEARCH: INFO= 3 POSSIBLE CAUSES: FUNCTION OR GRADIENT ARE 
 INCORRECT OR INCORRECT TOLERANCESpass 3 through quasi-newton minimization...
 
  
 
 IFLAG= -1  LINE SEARCH FAILED. SEE DOCUMENTATION OF ROUTINE MCSRCH ERROR 
 RETURN OF LINE SEARCH: INFO= 3 POSSIBLE CAUSES: FUNCTION OR GRADIENT ARE 
 INCORRECT OR INCORRECT TOLERANCESpass 4 through quasi-newton minimization...
 
  
 
 IFLAG= -1  LINE SEARCH FAILED. SEE DOCUMENTATION OF ROUTINE MCSRCH ERROR 
 RETURN OF LINE SEARCH: INFO= 3 POSSIBLE CAUSES: FUNCTION OR GRADIENT ARE 
 INCORRECT OR INCORRECT TOLERANCESpass 5 through quasi-newton minimization...
 
  
 
 IFLAG= -1  LINE SEARCH FAILED. SEE DOCUMENTATION OF ROUTINE MCSRCH ERROR 
 RETURN OF LINE SEARCH: INFO= 3 POSSIBLE CAUSES: FUNCTION OR GRADIENT ARE 
 INCORRECT OR INCORRECT TOLERANCESoutof QuasiNewtonEMA: 017: -log(p) = 
 1145822.4  tol 0.00
 
  
 
 Then again at “Computing MAP estimate using 2772 samples...”
 
  
 
 IFLAG= -1  LINE SEARCH FAILED. SEE DOCUMENTATION OF ROUTINE MCSRCH ERROR 
 RETURN OF LINE SEARCH: INFO= 3 POSSIBLE CAUSES: FUNCTION OR GRADIENT ARE 
 INCORRECT OR INCORRECT TOLERANCESoutof QuasiNewtonEMA: 009: -log(p) = 7006.0  
 tol 0.10
 
  
 
 IFLAG= -1  LINE SEARCH FAILED. SEE DOCUMENTATION OF ROUTINE MCSRCH ERROR 
 RETURN OF LINE SEARCH: INFO= 3 POSSIBLE CAUSES: FUNCTION OR GRADIENT ARE 
 INCORRECT OR INCORRECT TOLERANCESpass 2 through quasi-newton minimization...
 
  
 
 IFLAG= -1  LINE SEARCH FAILED. SEE DOCUMENTATION OF ROUTINE MCSRCH ERROR 
 RETURN OF LINE SEARCH: INFO= 3 POSSIBLE CAUSES: FUNCTION OR GRADIENT ARE 
 INCORRECT OR INCORRECT TOLERANCESoutof QuasiNewtonEMA: 013: -log(p) = 
 838978.4  tol 0.00
 
  
 
 Thanks,
 
 Wil
 
  
 
 
 William Irwin | Brain Imaging Coordinator
 UCSF | Memory and Aging Center
 350 Parnassus Avenue, Suite 905
 San Francisco  CA  94143-1207
 wirwin at memory.ucsf.edu | memory.ucsf.edu
 p: 415.476.1680 | f: 415.476.1816
 
  
  ___
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.