Differences between revisions 30 and 39 (spanning 9 versions)
Revision 30 as of 2011-03-21 12:46:07
Size: 3550
Editor: MartinReuter
Comment:
Revision 39 as of 2011-04-01 12:23:47
Size: 4343
Editor: MartinReuter
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 8: Line 8:
If you look at the coronal slice 158 for OAS2_0004_MR1_before, you can see that the entire neck is still present.<<BR>> If you look at the coronal slice 158 for OAS2_0004_MR1, you can see that the entire neck is still present.<<BR>>
Line 11: Line 11:
If you scroll down to slice 45, you can see that part of the right hemisphere is missing, but is present in T1.mgz. <<BR>> 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>>
Line 14: Line 14:
The same happened to OAS2_0004_MR2_before. At slice 170, a large part of the brain is missing while the neck is still present.<<BR>> 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>>
Line 17: Line 17:
The best way to fix a problem like this is to adjust the watershed parameters. 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. 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.
Line 19: Line 19:
First, adjust the watershed parameters for both MR1 and MR2 using the following commands: 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.
Line 22: Line 22:
recon-all -skullstrip -wsthresh 20 -clean-bm -no-wsgcaatlas -subjid OAS2_0004_MR1_before
and
recon-all
-skullstrip -wsthresh 20 -clean-bm -no-wsgcaatlas -subjid OAS2_0004_MR2_before
recon-all -subjid OAS2_0004_MR1 -skullstrip -wsthresh 20 -clean-bm -no-wsgcaatlas
recon-all
-subjid OAS2_0004_MR2 -skullstrip -wsthresh 20 -clean-bm -no-wsgcaatlas
Line 27: Line 26:
Take a look at your output volume (brainmask.mgz has been changed) along with the original T1 volume (T1.mgz), and verify the result of the new skull stripping is correct. 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 30: Line 29:
tkmedit OAS2_0004_MR1_before brainmask.mgz -aux T1.mgz -surfs
tkmedit OAS2_0004_MR2_before brainmask.mgz -aux T1.mgz -surfs
tkmedit OAS2_0004_MR1_fixed brainmask.mgz -aux T1.mgz -surfs
tkmedit OAS2_0004_MR2_fixed brainmask.mgz -aux T1.mgz -surfs
Line 33: Line 32:
----
The output for both should look like this:
Line 36: Line 33:
<insert pictures>

----
Line 42: Line 36:
recon-all -autorecon2 -autorecon3 -subjid OAS2_0004_MR1_before
recon-all
-autorecon2 -autorecon3 -subjid OAS2_0004_MR2_before
recon-all -subjid OAS2_0004_MR1 -autorecon2 -autorecon3
recon-all
-subjid OAS2_0004_MR2 -autorecon2 -autorecon3
Line 45: Line 39:
----
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.
Line 48: Line 40:
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):
Line 49: Line 42:
recon-all -base OAS2_0004 -tp OAS2_0004_MR1_before -tp OAS2_0004_MR2_before -all recon-all -base OAS2_0004 -tp OAS2_0004_MR1 -tp OAS2_0004_MR2 -all
Line 51: Line 44:
----
Then, the final step is to recreate the longitudinals once base and cross sectional runs are complete.
Line 54: Line 45:
Then, the final step is to recreate the longitudinals once base and cross sectional runs are complete:
Line 55: Line 47:
recon-all -long OAS2_0004_MR1_before OAS2_0004 -all
recon-all -long OAS2_0004_MR2_before OAS2_0004 -all
recon-all -long OAS2_0004_MR1 OAS2_0004 -all
recon-all -long OAS2_0004_MR2 OAS2_0004 -all
Line 58: Line 50:
----
**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.
Line 65: Line 57:
tkmedit OAS2_0004_MR1.long.OAS2_0004 brainmask.mgz -aux T1.mgz -surfs
tkmedit OAS2_0004_MR2.long.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
Line 69: Line 61:
This is only one example of a specific skull strip error, for more details on this type of error, take a look [[FsTutorial/SkullStripFix|here]]. 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}}

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 see the same improvement in the skull strip for OAS2_0004_MR2.long.OAS2_0004 as well. Note that, although much has been fixed, there are still problems here that need special treatment (e.g. inclusion of dura in the surfaces).

----
For more details on skull strip errors and the different ways to fix them, refer back to the [[FsTutorial/SkullStripFix|Troubleshooting Skull Strip Tutorial]].

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 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.

If you look at the coronal slice 158 for OAS2_0004_MR1, you can see that the entire neck is still present.

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.

The same happened to OAS2_0004_MR2. At slice 170, a large part of the brain is missing while the neck is still present.

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.

recon-all -subjid OAS2_0004_MR1 -skullstrip -wsthresh 20 -clean-bm -no-wsgcaatlas
recon-all -subjid OAS2_0004_MR2 -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_0004_MR1_fixed brainmask.mgz -aux T1.mgz -surfs
tkmedit OAS2_0004_MR2_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 for all timepoints that you made an adjustment to:

recon-all -subjid OAS2_0004_MR1 -autorecon2 -autorecon3
recon-all -subjid OAS2_0004_MR2 -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):

recon-all -base OAS2_0004 -tp OAS2_0004_MR1 -tp OAS2_0004_MR2 -all

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

recon-all -long OAS2_0004_MR1 OAS2_0004 -all
recon-all -long OAS2_0004_MR2 OAS2_0004 -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.

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

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


Compare the base in the before (left) image at slice 173 and after (right) image at the corresponding slice 180.

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.

You should see the same improvement in the skull strip for OAS2_0004_MR2.long.OAS2_0004 as well. Note that, although much has been fixed, there are still problems here that need special treatment (e.g. inclusion of dura in the surfaces).


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)