oh, I see what is happening now. wow, I had no idea that it deleted the existing xfm and reran the tal if the check failed. sorry, it should not be that way. I'll change it for the next version. In the meantime, you can proceed with -notal-check as you suggest.

On 2/16/2022 1:33 PM, Goeckner, Bryna wrote:

        External Email - Use Caution

It looks like the corrections we’ve made to the talairach are still resulting in a failed talairach QA check, which then causes it to overwrite the talairach.xfm (when the permissions on this file were changed to prohibit overwrite, the program ended at this step).

I think we will proceed with using -notal-check for the talairachs we’ve fixed to prevent this overwrite while hopefully still allowing downstream steps to use the fixed talairach.

If you have any different recommendations, please let me know.  Thanks for your help with this!

*Bryna Goeckner* (she/her)

Graduate Student

Medical College of Wisconsin

Neuroscience Doctoral Program

*From: *Douglas N. Greve <dgr...@mgh.harvard.edu>
*Date: *Monday, February 14, 2022 at 10:27 AM
*To: *Goeckner, Bryna <bgoeck...@mcw.edu>, Freesurfer support list <freesurfer@nmr.mgh.harvard.edu> *Subject: *Re: FW: [Freesurfer] Problems with recon for manually fixed Talairach

ATTENTION: This email originated from a sender outside of MCW. Use caution when clicking on links or opening attachments.
________________________________

Yes, I still don't understand. That snippet of code that you point out
is embedded in an if statement:
  if($DoCleanTal || ! -e $xfm) then
    Copy
  endif

! -e $xfm means that the file must not already exist. So, as long as
that file exists, it will not copy over it ($DoCleanTal is a special
flag that you are not using).
So I think I understand what you are doing, but I just don't understand
why the xfm is changing. One thing you can do is to just change the
permissions on the file, eg,
chmod a-w talairach.xfm
This will remove write permissions so that the file cannot change.

On 2/14/2022 11:18 AM, Goeckner, Bryna wrote:
>          External Email - Use Caution
>
> Hi Dr. Greve,
>
> Thanks again for your help on this.  I will try to explain things a bit better, but please let me know if you have additional questions.
>
> I used tkregister2 to fix a bad talairach and then tried to redo the recon-all.  Since we had used a few special flags in our recon-all, I tried to repeat those by running this command:
> recon-all -subject $1 \
>      -T2 $2/rawT2.ORIG.nii.gz \
>      -T2pial \
>      -parallel -openmp 12 \
>      -3T \
>      -all
>
> When this was used, the fixed talairach was overwritten.  I believe this is shown by the following line in recon-all.log:    cp transforms/talairach.auto.xfm transforms/talairach.xfm > When I would check the talariach after the recon, the talairach.xfm file would again be the original bad talairach.
>
> In order to avoid this overwrite, I tried running two separate processes (same subject, same fixed talairach): one with -notal-check, and one with -notalairach.  These both preserved the fixed talairach but produced slightly different results (different aparc & aseg values).
> The exact code I used is here:
> #1st process
> recon-all -subject $1 \
>      -T2 $2/rawT2.ORIG.nii.gz \
>      -T2pial \
>      -parallel -openmp 12 \
>      -3T \
>      -all \
>      -notal-check
>
> #2nd process
> recon-all -subject $1 \
>      -T2 $2/rawT2.ORIG.nii.gz \
>      -T2pial \
>      -parallel -openmp 12 \
>      -3T \
>      -all \
>      -notalairach
>
> I am not sure what happens within recon-all to make these two processes generate different values.
>
> Ultimately, what I want to determine is after we fix a talairach, how should we redo the recon to ensure the fixed talairach is being used for all downstream recon-all steps.  Do you have a recommendation about using either -notal-check or -notalairach  (or is there another preferred way to do this)?
>
> Thanks again for your help with this!
>
> Bryna Goeckner (she/her)
> Graduate Student
> Medical College of Wisconsin
> Neuroscience Doctoral Program
>
> -----Original Message-----
> From: Douglas N. Greve <dgr...@mgh.harvard.edu>
> Sent: Sunday, February 13, 2022 4:30 PM
> To: Goeckner, Bryna <bgoeck...@mcw.edu>; Freesurfer support list <freesurfer@nmr.mgh.harvard.edu> > Subject: Re: FW: [Freesurfer] Problems with recon for manually fixed Talairach
>
> ATTENTION: This email originated from a sender outside of MCW. Use caution when clicking on links or opening attachments.
> ________________________________
>
> I'm a bit puzzled by this. Are you saving the xfm file to talairach.xfm?
> In the log file, it clearly says:
>
> INFO: transforms/talairach.xfm already exists!
> The new transforms/talairach.auto.xfm will not be copied to transforms/talairach.xfm This is done to retain any edits made to transforms/talairach.xfm Add the -clean-tal flag to recon-all to overwrite transforms/talairach.xfm
>
> and there is no command in the log that indicates that it was overwritten, and I cannot replicate this behavior here
>
> On 1/31/2022 10:33 AM, Goeckner, Bryna wrote:
>>           External Email - Use Caution
>>
>> Sorry - Sending these directly since I tried to send these earlier, but they were blocked by the list-serve.
>>
>> Bryna Goeckner (she/her)
>> Graduate Student
>> Medical College of Wisconsin
>> Neuroscience Doctoral Program
>>
>> -----Original Message-----
>> From: Goeckner, Bryna
>> Sent: Friday, January 28, 2022 11:36 AM
>> To: freesurfer@nmr.mgh.harvard.edu
>> Subject: Re: [Freesurfer] Problems with recon for manually fixed
>> Talairach
>>
>> I'm attaching the two recon-all.logs. Both were generated for same subject using the same corrected talairach.xfm file, one with -notal-check and the other with -notalairach. Please let me know if you have any other questions. Thanks!
>>
>> Bryna Goeckner (she/her)
>> Graduate Student
>> Medical College of Wisconsin
>> Neuroscience Doctoral Program
>>
>> Subject: Re: [Freesurfer] Problems with recon for manually fixed
>> To: freesurfer@nmr.mgh.harvard.edu
>> Message-ID: <95652ab6-b36a-c708-edd7-b8734c1c7...@mgh.harvard.edu>
>> Content-Type: text/plain; charset=UTF-8; format=flowed
>>
>> Can you send the recon-all.log?
>>
>> On 1/27/2022 9:34 AM, Goeckner, Bryna wrote:
>>>            External Email - Use Caution
>>>
>>> We are using FS 7.2
>>>
>>> Bryna Goeckner (she/her)
>>> Graduate Student
>>> Medical College of Wisconsin
>>> Neuroscience Doctoral Program
>>>
>>> Date: Wed, 26 Jan 2022 16:43:44 -0500
>>> From: "Douglas N. Greve" <dgr...@mgh.harvard.edu>
>>> Subject: Re: [Freesurfer] Problems with recon for manually fixed
>>>            Talairach
>>> To: freesurfer@nmr.mgh.harvard.edu
>>> Message-ID: <8e0752c5-13fa-755e-c416-4253ce504...@mgh.harvard.edu>
>>> Content-Type: text/plain; charset="utf-8"
>>>
>>> what version of FS are you using?
>>>
>>> On 1/21/2022 2:21 PM, Goeckner, Bryna wrote:
>>>> ????????External Email - Use Caution
>>>>
>>>> Hi,
>>>>
>>>> I am trying to decide how to proceed after manually updating a
>>>> talairach since various ways I?ve tried the recon process give me
>>>> different results.
>>>>
>>>> Our group used Freesurfer 7.2 for processing data with the T2 and 3T
>>>> flags as follows:
>>>>
>>>> recon-all -subject $1 -i $2/rawT1.ORIG.nii.gz -T2
>>>> $2/rawT2.ORIG.nii.gz -T2pial -parallel -openmp 12 -3T -all
>>>>
>>>> After visual inspection, I made adjustments to the talairach using
>>>> tkregister2 and then used the code below to rerun the recon:
>>>>
>>>> recon-all -subject $1 -T2 $2/rawT2.ORIG.nii.gz -T2pial -parallel
>>>> -openmp 12 -3T? -all
>>>>
>>>> When this was done, the talairach.xfm file was restored to the
>>>> talairach from the original recon, while the talairach.xfm~ was
>>>> still the fixed version. At no point in this entire process did the
>>>> talairach (fixed or original) generate an error.
>>>>
>>>> To avoid the overwriting of the talairach.xfm file, I tried using
>>>> (separately) the -notalairach and -notal-check flags. For both, the
>>>> talairach.xfm file stayed as the fixed talairach, but I got
>>>> different aseg and aparc results.
>>>>
>>>> I?d like to know more about how these to flags differ and if you
>>>> have a recommendation on which process is best.? The plan is to
>>>> eventually use this data in TRACULA.
>>>>
>>>> Thanks for your help,
>>>>
>>>> *Bryna Goeckner*?(she/her)
>>>>
>>>> Graduate Student
>>>>
>>>> Medical College of Wisconsin
>>>>
>>>> Neuroscience Doctoral Program

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

Reply via email to