Differences between revisions 18 and 22 (spanning 4 versions)
Revision 18 as of 2004-08-23 12:05:40
Size: 3875
Editor: DavidTuch
Comment: touched up formatting
Revision 22 as of 2010-12-29 23:41:37
Size: 4243
Editor: KhoaNguyen
Comment:
Deletions are marked like this. Additions are marked like this.
Line 8: Line 8:
<<Navigation(children)>> '''Index''' <<TableOfContents>>

= Name =
mri_watershed - strip skull and other outer non-brain tissue

= Arguments =
== Positional Arguments ==
||invol ||input volume ||
||outvol ||output volume ||
Line 10: Line 19:
= Name =
mri_watershed - strips skull and other outer non-brain voxels from an acquired volume (usually T1).
             
== Optional Flagged Arguments ==
||-atlas ||use the atlas information to correct the segmentation. ||When the segmented brain is not correct, this option might help you. ||
||-surf [surfname] ||save the BEM surfaces. ||In order to get the surfaces consistent with tkmedit, you have to use the option -useSRAS. ||
||-useSRAS ||use the surface RAS coordinates (not the scanner RAS) for surfaces. || ||
||-noT1 ||don't do T1 analysis. (Useful when running out of memory) || ||
||-less ||shrink the surface || ||
||-more ||expand the surface || ||
||-wat ||use only the watershed algorithm || ||
||-T1 ||specify T1 input volume (T1 grey value = 110) || ||
||-wat+temp ||watershed algo and first template smoothing || ||
||-first_temp ||use only the first template smoothing + local matching || ||
||-surf_debug ||visualize the surfaces onto the output volume || ||
||-brainsurf [surfname] ||save the brain surface || ||
||-shk_br_surf [int_h surfname] ||to save the brain surface shrank inward of int_h mm || ||
||-s [int_i int_j int_k] ||add a seed point || ||
||-c [int_i int_j int_k] ||specify the center of the brain (in voxel unit) || ||
||-r int_r ||specify the radius of the brain (in voxel unit) || ||
||-t int_threshold ||change the threshold in the watershed analyze process || ||
||-h int_hpf ||precize the preflooding height (in percent) || ||
||-n ||not use the watershed analyze process || ||
||-LABEL ||labelize the output volume into scalp, skull, csf, gray and white || ||
||-man [int_csf int_trn int_gray] ||to change the different parameters csf_max, transition_intensity and GM_intensity || ||
||-mask ||mask a volume with the brain mask || ||
||--help ||show usage message || ||
||--version ||show the current version || ||
Line 14: Line 45:
= Synopsis =
mri_watershed [<options>] [input volume] [brain volume]

= Positional Arguments =
||[input volume]|| ||
||[output volume]|| ||

= Required Flagged Arguments =
None

= Optional Flagged Arguments =
|| -atlas || use the atlas information to correct the segmentation.|| When the segmented brain is not correct, this option might help you. ||
|| -surf [surfname] || save the BEM surfaces.|| In order to get the surfaces consistent with tkmedit, you have to use the option -useSRAS. ||
|| -useSRAS || use the surface RAS coordinates (not the scanner RAS) for surfaces. || ||
|| -noT1 || don't do T1 analysis. (Useful when running out of memory) || ||
|| -less || shrink the surface || ||
|| -more || expand the surface || ||
|| -wat || use only the watershed algorithm || ||
|| -T1 || specify T1 input volume (T1 grey value = 110) || ||
|| -wat+temp || watershed algo and first template smoothing || ||
|| -first_temp || use only the first template smoothing + local matching || ||
|| -surf_debug || visualize the surfaces onto the output volume || ||
|| -brainsurf [surfname] || save the brain surface || ||
|| -shk_br_surf [int_h surfname] || to save the brain surface shrank inward of int_h mm || ||
|| -s [int_i int_j int_k] || add a seed point || ||
|| -c [int_i int_j int_k] || specify the center of the brain (in voxel unit) || ||
|| -r int_r || specify the radius of the brain (in voxel unit) || ||
|| -t int_threshold || change the threshold in the watershed analyze process || ||
|| -h int_hpf || precize the preflooding height (in percent) || ||
|| -n || not use the watershed analyze process || ||
|| -LABEL || labelize the output volume into scalp, skull, csf, gray and white || ||
|| -man [int_csf int_trn int_gray] || to change the different parameters csf_max, transition_intensity and GM_intensity || ||
|| -mask || mask a volume with the brain mask || ||
|| --help || show usage message || ||
|| --version || show the current version || ||
Line 51: Line 47:
|| [brain volume] || skull stripped brain volume ||
|| [BEM surfaces] || when you specify the option -brainsurf surfname ||
||brainvol ||skull stripped brain volume ||
||BEMsurfaces ||when you specify the option -brainsurf surfname ||
Line 54: Line 50:
= Description =
Line 57: Line 53:
= Example 1 =
mri-watershed -atlas T1 brain 
= Examples =
=
= Example 1 ==
mri-watershed -atlas T1 brain
Line 60: Line 57:
where T1 is the T1 volume and brain is the output brain volume.
When the cerebellum is cut-off from the brain or getting the left/right asymmetric brain, you should first try this -atlas
option.  
where T1 is the T1 volume and brain is the output brain volume.  When the cerebellum is cut-off from the brain or getting the left/right asymmetric brain, you should first try this -atlas  option.
Line 64: Line 59:
= Example 2 = == Example 2 ==
Line 73: Line 68:
["mri_normalize"] [[mri_normalize]]
Line 80: Line 75:

The "watershed" segmentation algorithm was used to dertermine the intensity values for white matter, grey matter, and CSF. 
A force field was then used to fit a spherical surface to the brain. The shape of the surface fit was then evaluated against a previously derived template.   If you used -atlas option, then { The template was used to correct the surface. }
The "watershed" segmentation algorithm was used to dertermine the intensity values for white matter, grey matter, and CSF.
A force field was then used to fit a spherical surface to the brain. The shape of the surface fit was then evaluated against a previously derived template.
Line 88: Line 80:
(Segonne 2004)  (Segonne 2004)
Line 90: Line 82:
{{{
First, the code is constructing a discretized distribution of the whole intensity image (300 points) -> this is what PDcurve is doing. In doing so, I remove noisy voxels by removing the one thousandth brightest voxels.
Line 91: Line 85:
= References =
["References/Segonne2004"]
Then, in analyze_curve, I try to determine a meaningfull threshold (that would be SKULL_PD) of this distribution of voxels. To do so, the distribution should be peaking somewhere in the 300 points and then decreasing. In this decreasing region (that I find between 3max/4 and max/5), I do a linear least square approximation to fit the best line to this decreasing region: aX+b and then simply set SKULL_PD = -b/a, i.e. the region where the fit becomes 0.
Line 94: Line 87:
Needless to say that there is plenty of code regions that is not really robust and might fail.
}}}
Line 95: Line 90:
Report bugs to <freesurfer@nmr.mgh.harvard.edu>

=
Author/s =
YasunariTosa
Report bugs to < freesurfer@nmr.mgh.harvard.edu > YasunariTosa

Index

Name

mri_watershed - strip skull and other outer non-brain tissue

Arguments

Positional Arguments

invol

input volume

outvol

output volume

Optional Flagged Arguments

-atlas

use the atlas information to correct the segmentation.

When the segmented brain is not correct, this option might help you.

-surf [surfname]

save the BEM surfaces.

In order to get the surfaces consistent with tkmedit, you have to use the option -useSRAS.

-useSRAS

use the surface RAS coordinates (not the scanner RAS) for surfaces.

-noT1

don't do T1 analysis. (Useful when running out of memory)

-less

shrink the surface

-more

expand the surface

-wat

use only the watershed algorithm

-T1

specify T1 input volume (T1 grey value = 110)

-wat+temp

watershed algo and first template smoothing

-first_temp

use only the first template smoothing + local matching

-surf_debug

visualize the surfaces onto the output volume

-brainsurf [surfname]

save the brain surface

-shk_br_surf [int_h surfname]

to save the brain surface shrank inward of int_h mm

-s [int_i int_j int_k]

add a seed point

-c [int_i int_j int_k]

specify the center of the brain (in voxel unit)

-r int_r

specify the radius of the brain (in voxel unit)

-t int_threshold

change the threshold in the watershed analyze process

-h int_hpf

precize the preflooding height (in percent)

-n

not use the watershed analyze process

-LABEL

labelize the output volume into scalp, skull, csf, gray and white

-man [int_csf int_trn int_gray]

to change the different parameters csf_max, transition_intensity and GM_intensity

-mask

mask a volume with the brain mask

--help

show usage message

--version

show the current version

Outputs

brainvol

skull stripped brain volume

BEMsurfaces

when you specify the option -brainsurf surfname

Produce the brain volume from T1 volume or the scanned volume.

Examples

Example 1

mri-watershed -atlas T1 brain

where T1 is the T1 volume and brain is the output brain volume. When the cerebellum is cut-off from the brain or getting the left/right asymmetric brain, you should first try this -atlas option.

Example 2

mri-watershed T1 brain

The same as the first example, but no correction is applied to the intermediate result.

Bugs

None

See Also

mri_normalize

Links

FreeSurfer, FsFast

Methods Description

The "watershed" segmentation algorithm was used to dertermine the intensity values for white matter, grey matter, and CSF.
A force field was then used to fit a spherical surface to the brain. The shape of the surface fit was then evaluated against a previously derived template.

The finely grained sphere was fit to the brain.

(Segonne 2004)

First, the code is constructing a discretized distribution of the whole intensity image (300 points) -> this is what PDcurve is doing. In doing so, I remove noisy voxels by removing the one thousandth brightest voxels.

Then, in analyze_curve, I try to determine a meaningfull threshold (that would be SKULL_PD) of this distribution of voxels. To do so, the distribution should be peaking somewhere in the 300 points and then decreasing. In this decreasing region (that I find between 3max/4 and max/5), I do a linear least square approximation to fit the best line to this decreasing region: aX+b and then simply set SKULL_PD = -b/a, i.e. the region where the fit becomes 0.

Needless to say that there is plenty of code regions that is not really robust and might fail.

Reporting Bugs

Report bugs to < freesurfer@nmr.mgh.harvard.edu > YasunariTosa

mri_watershed (last edited 2018-01-04 10:17:45 by MorganFogarty)