and when you say it is "way off" what do you mean? Is the intensity volume 
conformed in the same way?

On Thu, 6 Sep 2012, Jeff 
Thompson wrote:

>
> 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 <[email protected]> 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: [email protected]
>>>> To: [email protected]
>>>> CC: [email protected]; [email protected]
>>>> 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: [email protected]
>>>>> From: [email protected]
>>>>> Subject: Re: [Freesurfer] creating a gca file from .mgz files
>>>>> Date: Tue, 28 Aug 2012 20:12:45 -0400
>>>>> To: [email protected]
>>>>>
>>>>> 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
>>>>> <[email protected]> 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: [email protected]
>>>>>> To: [email protected]
>>>>>> CC: [email protected]
>>>>>> 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: [email protected]
>>>>>>>> To: [email protected]
>>>>>>>> CC: [email protected]
>>>>>>>> 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: [email protected]
>>>>>>>>>> To: [email protected]
>>>>>>>>>> CC: [email protected]
>>>>>>>>>> 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: [email protected]
>>>>>>>>>>>> To: [email protected]
>>>>>>>>>>>> CC: [email protected]
>>>>>>>>>>>> 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
>>>>> [email protected]
>>>>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>>>>
>>>>
>
>
>
_______________________________________________
Freesurfer mailing list
[email protected]
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Reply via email to