Differences between revisions 37 and 41 (spanning 4 versions)
Revision 37 as of 2011-03-26 16:25:36
Size: 4032
Editor: KhoaNguyen
Comment:
Revision 41 as of 2011-05-31 19:28:17
Size: 4409
Editor: KhoaNguyen
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
[[FsTutorial|top]] | [[FsTutorial/LongitudinalTutorial|previous]] [[FsTutorial|top]] | [[FsTutorial/LongitudinalTutorial|Longitudinal Tutorial]]
Line 6: Line 6:
As you can see, the skull strip for this subject is very poor for both timepoints MR1 and MR2, therefore affecting the results of the base and the longitudinals downstream. As you probably noticed, the skullstrip only failed at the first timepoint for this subject, OAS2_0088_MR1. There are quite a lot of skull left behind and that adversely affected the surfaces and the aseg. The image below is taken at slice 90. <<BR>>
{{attachment:0088_tp1_90_before.jpg}}
Line 8: Line 9:
If you look at the coronal slice 158 for OAS2_0004_MR1, you can see that the entire neck is still present.<<BR>>
{{attachment:0004MR1_158_2.jpg}}
Although the surfaces and the aseg look pretty bad for this timepoint, the surfaces in the base are correct, therefore the surfaces in the long is also correct (since surfaces are copied from the base to the long). However, notice that in OAS2_0088_MR1.long.OAS2_0088, the aseg for the cerebellum is still overlabeling to the dura. Image below at slice 100. <<BR>>
{{attachment:0088_long1_100_before.jpg}}
Line 11: Line 12:
If you scroll down to slice 45, you can see that part of the right hemisphere is missing in brainmask.mgz, but is present in T1.mgz. <<BR>>
{{attachment:0004MR1_45_1.jpg}} {{attachment:0004MR1_45_2.jpg}}
It is then good to correct this problem. You can simply correct this by adjusting the watershed parameter for timepoint 1. Because the default threshold is always 25, to remove more skull, we need to decrease it. This should only take a couple minutes to complete, so feel free to run the command.
{{{
recon-all -subjid OAS2_0088_MR1 -skullstrip -wsthresh 20 -clean-bm -no-wsgcaatlas
}}}
----
Line 14: Line 18:
The same happened to OAS2_0004_MR2. At slice 170, a large part of the brain is missing while the neck is still present.<<BR>>
{{attachment:0004MR2_170_1.jpg}} {{attachment:0004MR2_170_2.jpg}}

The best way to fix a problem like this is to adjust the watershed parameters. As mentioned earlier, this can only be done on the cross-sectionals, and you'll have to use the edited cross-sectionals to recreate the base and the longitudinals afterwards.

First, adjust the watershed parameters for both MR1 and MR2 using the following commands. Feel free to run these commands (separately) since this step is fairly quick.
If you ran the commands, take a look at your output volumes (directory w/o _fixed), or simply check our edited volumes, and verify that the result of the new skull stripping is correct:
Line 22: Line 21:
recon-all -skullstrip -wsthresh 20 -clean-bm -no-wsgcaatlas -subjid OAS2_0004_MR1
recon-all -skullstrip -wsthresh 20 -clean-bm -no-wsgcaatlas -subjid OAS2_0004_MR2
tkmedit OAS2_0088_MR1_fixed brainmask.mgz -aux T1.mgz -surfs
Line 25: Line 23:
----
Take a look at your output volumes (w/o _fixed), or our edited volumes below, and verify that the result of the new skull stripping is correct.

After you are satisfied with the results, remember to run the rest of the cross sectional recon-all steps. Notice that although the extra skull is stripped off, the surfaces and the aseg are still incorrect, you'll need to run the following command in order to recreate the surfaces and the aseg. (This step will take very long so you don't need to run it for this tutorial.)
Line 29: Line 27:
tkmedit OAS2_0004_MR1_fixed brainmask.mgz -aux T1.mgz -surfs
tkmedit OAS2_0004_MR2_fixed brainmask.mgz -aux T1.mgz -surfs
recon-all -subjid OAS2_0088_MR1 -autorecon2 -autorecon3
Line 33: Line 30:
After you are satisfied with the results, remember to run the rest of the cross sectional recon-all steps for all timepoints that you made an adjustment to:
To save time, you can check in with the recon-all-status.log in the scripts directory of these subjects to see if the normalization step is complete. Once that step is complete, you can start recreating your base (remove/rename the base dir if it existed, e.g. {{{mv OAS2_0004 OAS2_0004_old}}}, before running this). Or you can wait until the entire recon is done to check whether the surfaces and aseg are updated. They should. To check the corrected version:
Line 36: Line 32:
recon-all -autorecon2 -autorecon3 -subjid OAS2_0004_MR1
recon-all -autorecon2 -autorecon3 -subjid OAS2_0004_MR2
tkmedit OAS2_0088_MR1_fixed brainmask.mgz -aux T1.mgz -surfs
Line 40: Line 35:
To save time, you can check in with the recon-all-status.log in the scripts directory of these subjects to see if the normalization step is complete. Once that step is complete, you can start recreating your base. Notice the major improvement on the same slice 90 for OAS2_0088_MR1. <<BR>>
{{attachment:0088_tp1_90_after.jpg}}

In any case, to recreate the base using the newly created timepoint(s), use the following command:
Line 42: Line 40:
recon-all -base OAS2_0004 -tp OAS2_0004_MR1 -tp OAS2_0004_MR2 -all recon-all -base OAS2_0088 -tp OAS2_0088_MR1 -tp OAS2_0088_MR2 -all
Line 45: Line 43:
Then, the final step is to recreate the longitudinals once base and cross sectional runs are complete. Then, the final step is to recreate the longitudinals once base and cross sectional runs are complete:
Line 47: Line 45:
recon-all -long OAS2_0004_MR1 OAS2_0004 -all
recon-all -long OAS2_0004_MR2 OAS2_0004 -all
recon-all -long OAS2_0088_MR1 OAS2_0088 -all
recon-all -long OAS2_0088_MR2 OAS2_0000 -all
Line 51: Line 49:
**NOTE: When recreating the base and longitudinals, it is recommended to remove or rename the existing base and longitudinal directories and start those processes from scratch. **NOTE: When recreating the base and longitudinals, it is recommended to remove or rename the existing base and longitudinal directories and start those processes from scratch, if possible, e.g. {{{mv OAS2_0004 OAS2_0004_old}}}.
Line 56: Line 54:
tkmedit OAS2_0004 brainmask.mgz -aux T1.mgz -surfs
tkmedit OAS2_0004_MR1.long.OAS2_0004_fixed brainmask.mgz -aux T1.mgz -surfs
tkmedit OAS2_0004_MR2.long.OAS2_0004_fixed brainmask.mgz -aux T1.mgz -surfs
tkmedit OAS2_0088_fixed brainmask.mgz -aux T1.mgz -surfs
tkmedit OAS2_0088_MR1.long.OAS2_0088_fixed brainmask.mgz -aux T1.mgz -surfs
tkmedit OAS2_0088_MR2.long.OAS2_0088_fixed brainmask.mgz -aux T1.mgz -surfs
Line 61: Line 59:
Compare the base in the before (left) image at slice 173 and after (right) image at the corresponding slice 180.<<BR>>
{{attachment:0004_173_before.jpg}} {{attachment:0004_180_after.jpg}}
Line 64: Line 60:
And here are the longitudinals for OAS2_0004_MR1.long.OAS2_0004. Before (left) at slice 164 and after (right) at the corresponding slice 171. <<BR>>
{{attachment:0004MR1long_164_before.jpg}} {{attachment:0004MR1long_171_after.jpg}}
You should not notice any changes to the base and the long for timepoint 2, however there is an improvement on the aseg for the long of timepoint 1. Here is the same slice 100 as shown above. <<BR>>
{{attachment:0088_long1_100_after.jpg}}
Line 67: Line 63:
You should see the same improvement in the skull strip for OAS2_0004_MR2.long.OAS2_0004 as well. ----
Now, that was a fairly simple case, and if you are still up for it, click [[FsTutorial/LongSkullStripFix2|here]] for a bigger challenge.

top | Longitudinal Tutorial

Fixing a bad skull strip

  • To follow this exercise exactly be sure you've downloaded the tutorial data set before you begin. If you choose not to download the data set you can follow these instructions on your own data, but you will have to substitute your own specific paths and subject names.

As you probably noticed, the skullstrip only failed at the first timepoint for this subject, OAS2_0088_MR1. There are quite a lot of skull left behind and that adversely affected the surfaces and the aseg. The image below is taken at slice 90.
0088_tp1_90_before.jpg

Although the surfaces and the aseg look pretty bad for this timepoint, the surfaces in the base are correct, therefore the surfaces in the long is also correct (since surfaces are copied from the base to the long). However, notice that in OAS2_0088_MR1.long.OAS2_0088, the aseg for the cerebellum is still overlabeling to the dura. Image below at slice 100.
0088_long1_100_before.jpg

It is then good to correct this problem. You can simply correct this by adjusting the watershed parameter for timepoint 1. Because the default threshold is always 25, to remove more skull, we need to decrease it. This should only take a couple minutes to complete, so feel free to run the command.

recon-all -subjid OAS2_0088_MR1 -skullstrip -wsthresh 20 -clean-bm -no-wsgcaatlas


If you ran the commands, take a look at your output volumes (directory w/o _fixed), or simply check our edited volumes, and verify that the result of the new skull stripping is correct:

tkmedit OAS2_0088_MR1_fixed brainmask.mgz -aux T1.mgz -surfs

After you are satisfied with the results, remember to run the rest of the cross sectional recon-all steps. Notice that although the extra skull is stripped off, the surfaces and the aseg are still incorrect, you'll need to run the following command in order to recreate the surfaces and the aseg. (This step will take very long so you don't need to run it for this tutorial.)

recon-all -subjid OAS2_0088_MR1 -autorecon2 -autorecon3

To save time, you can check in with the recon-all-status.log in the scripts directory of these subjects to see if the normalization step is complete. Once that step is complete, you can start recreating your base (remove/rename the base dir if it existed, e.g. mv OAS2_0004 OAS2_0004_old, before running this). Or you can wait until the entire recon is done to check whether the surfaces and aseg are updated. They should. To check the corrected version:

tkmedit OAS2_0088_MR1_fixed brainmask.mgz -aux T1.mgz -surfs

Notice the major improvement on the same slice 90 for OAS2_0088_MR1.
0088_tp1_90_after.jpg

In any case, to recreate the base using the newly created timepoint(s), use the following command:

recon-all -base OAS2_0088 -tp OAS2_0088_MR1 -tp OAS2_0088_MR2 -all

Then, the final step is to recreate the longitudinals once base and cross sectional runs are complete:

recon-all -long OAS2_0088_MR1 OAS2_0088 -all
recon-all -long OAS2_0088_MR2 OAS2_0000 -all

**NOTE: When recreating the base and longitudinals, it is recommended to remove or rename the existing base and longitudinal directories and start those processes from scratch, if possible, e.g. mv OAS2_0004 OAS2_0004_old.

You can examine the corrected version of the base and longitudinals by using the following commands in separate terminals.

tkmedit OAS2_0088_fixed brainmask.mgz -aux T1.mgz -surfs
tkmedit OAS2_0088_MR1.long.OAS2_0088_fixed brainmask.mgz -aux T1.mgz -surfs
tkmedit OAS2_0088_MR2.long.OAS2_0088_fixed brainmask.mgz -aux T1.mgz -surfs


You should not notice any changes to the base and the long for timepoint 2, however there is an improvement on the aseg for the long of timepoint 1. Here is the same slice 100 as shown above.
0088_long1_100_after.jpg


Now, that was a fairly simple case, and if you are still up for it, click here for a bigger challenge.


For more details on skull strip errors and the different ways to fix them, refer back to the Troubleshooting Skull Strip Tutorial.

FsTutorial/LongSkullStripFix (last edited 2013-04-23 17:02:37 by MartinReuter)