Message: 14 Date: Mon, 30 Nov 2015 09:32:54 -0500 From: Martin Reuter mreuter@nmr.mgh.harvard.edu Subject: Re: [Freesurfer] long run fails for new time-point when removing a tpt that was added with -addtp option To: Freesurfer support list freesurfer@nmr.mgh.harvard.edu Message-ID: 565C5E16.3060301@nmr.mgh.harvard.edu Content-Type: text/plain; charset="windows-1252"
Hi Bishesh,
Disclaimer up front: You probably know that adding time points without re-creating the base is dangerous (as you bias you analysis, because not all time points are treated the same).
Thanks Martin. Yes I understand that but I'm trying to use recon-all in a
different setting. For e.g. if I want to compare FreeSurfer results on repeat scans: new1 and new2 both taken on the same day, I understand that ideally one would do two different long runs by including new1 and new2 separately during the creation of base template and then compare the results. However, in my case instead of just new1 and new2, I have several of them that are simulated using different methods and these simulated images will be very close to the images that were already used during the base template creation. So I did not want to recreate the base template for each of these several cases. I want to analyse results on these new1, new2, new3, ..., newN simulated scans of the "same time-point" image but with different methods without recreating the base-template and providing the identical scenario for each of these new1, new2, ..., newN images in long-run.
Now here is why you see the error. The way a new time points get added to an existing base is this:
- register the new time point's norm.mgz to the base norm.mgz (using
mri_robust_register and creates the lta files in mri/transforms) 2. create a new temporary base norm.mgz from all time points and diff with existing base norm.mgz 3. report difference (the idea is to decide if the difference is small then everything is fine and if it is large, recommend to re-run the base from scratch, this is not implemented yet and you only see output and it will always go through) 4. add the new time point id to the list in base/base-tps
So for step 3 it needs the norm.mgz from all other time points, to re-create a temporary norm in the base.
Now, how can you achieve what you want. I can think of two options:
- edit the base-tps and remove the line with new1 this should work, the additional transforms to and from new1 (in
base/mri/transforms) can be left behind as they will not be used (you can also delete those if you like)
- create two copies of the original base (before adding any time
points), then add each time point to each of the two copies. This is absolutely safe as you make sure that new1 does not affect anything when adding new2.
Yes if I had only two tpts, copying could be reasonable too, but I have few more, so I'm now considering the first option. Or a quicker way for me could be to temporarily comment out steps 2 and 3 you mentioned above. Could you tell me where in recon-all I could do that ?
Thanks, Bishesh
Anyway, I don't see why anyone would want to do what you are trying to do, but good luck.
Best, Martin
On 11/30/2015 05:53 AM, Bishesh Khanal wrote:
Hello, I had run a longitudinal run by creating a base template with a set of time-point scans (tpts). I wanted to add a new tpt (say new1) without recreating the base template, hence I used the option -addtp in the recon-all -long run. Later on, I no longer needed the results of the long run for new1. So I removed the relevant directories for new1 (i.e. new1 and new1.long.baseid).
Now I have another tpt (say new2) for which I want a -long run without recreating the base template. So I did the same thing as before i.e. first a cross run for new2 (which worked fine) and then a long-run with -addtp option. However, the long-run for new2 failed with an error that it cannot find $SUBJECTS_DIR/new1/mri/norm.mgz
I realize that although I had removed the relevant directories of new1, it is still listed in the file $SUBJECTS_DIR/baseid/base-tps. However, I do not understand why norm.mgz of new1 is needed by recon-all for a long run on new2 when I did not want FreeSurfer to use either of new1 or new2 to recreate the base. Ideally, I would want to run long run on new1 and new2 under identical conditions. In other words, I do not want long-run on new2 tpt to require results from long run on new1 tpt. Should it not be the expected behaviour when I am not using new1 and/or new2 to create the base template ? And, is there a way to do achieve what I want to without manually deleting the new1 from the list in the file $SUBJECTS_DIR/baseid/base-tps ?
P.S. Initially, the -addtp option had not worked and I had to do the following to make it work:
The FreeSurfer version: 5.3.0. Getting around a know bug. in recon-all in the following block (around line 6148)
if ( ! $found_tpNid ) then echo "ERROR: $tpNid is not in${longbasedir}/${BaseSubjsListFname}" echo "" exit 1 endif
replaced the first line (if statement) with:
if ( ! $found_tpNid && ! $DoAddTp ) then
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
-- Martin Reuter, PhD Assistant Professor of Radiology, Harvard Medical School Assistant Professor of Neurology, Harvard Medical School A.A.Martinos Center for Biomedical Imaging Massachusetts General Hospital Research Affiliate, CSAIL, MIT Phone: +1-617-724-5652 Web : http://reuter.mit.edu
freesurfer@nmr.mgh.harvard.edu