diff --git a/CTSkullStripping/README.md b/CTSkullStripping/README.md index e2bc419..64e3966 100644 --- a/CTSkullStripping/README.md +++ b/CTSkullStripping/README.md @@ -15,11 +15,9 @@ Recommended workflow -------------------- - Create a new segment that will contain the brain region -- use `Threshold` effect to select the brain region. Soft tissues with similar image intensity as the brain will be selected, too, but they will be removed by the next 3 processing steps. -- Use `Margin` effect with `Shrink` operation to disconnect brain region from similar-intensity soft tissue regions. -- Use `Islands` effect's `Keep selected island` operation to keep only brain region. -- Use `Margin` effect with `Grow` operation to restore brain region original size. -- Use `Mask volume` effect to blank out all non-brain regions in the image. +- Use `Threshold` effect to create a segment that contains the skull bone +- Use `Wrap solidify` effect (provided by `SurfaceWrapSolidify` extension) to extract the brain cavity. +- Use `Mask volume` effect (provided by `SegmentEditorExtraEffects` extension) to blank out all non-brain regions in the image. Example ------- @@ -30,38 +28,28 @@ Example ![Head CT image.](image-001.png) - Go to `Segment editor` module, click `Add` button to create a new segment -- Select `Threshold` effect and set brain intensity range by clicking on `Local histogram` section title then click-and-dragging in the brain in yellow (sagittal) view. Click Apply to save previewed region. +- Select `Threshold` effect and set intensity range of bone (from approximately 300 to maximum value), click `Apply` -![Segment containint brain and other soft tissues.](image-002.png) +![Segment containing skull bone.](image-002.png) -- Select `Margin` effect, set operation to `Shrink`, margin size to 6mm, and click `Apply` to make sure the brain region is not connected anymore to any other regions. Depending on the data set, slightly smaller margin value could be enough, or larger value may be necessary. +- Remove small speckles of noise using `Islands` effect: choose `Keep largest island` option and click `Apply` -![Soft tissue regions are broken up after shrinking.](image-003.png) +- Select `Wrap solidify effect`, set region to `Largest cavity` +- Enable `Split cavities` and set cavity size slider to approximately 30mm to prevent the segmentation from "leaking" into other soft-tissue regions through small discontinuities in the bone +- Click `Apply` -- Select `Islands` effect, choose `Keep selected island` operation, then click anywhere within the brain region in a slice view to keep only the brain region and remove all other disconnected soft tissue regions. - -![Only brain region is kept.](image-004.png) - -- Select `Margin` effect, set operation to `Grow`, keep the margin size the same as before, and click `Apply`. This restores the original brain segment size. - -![Brain region size is restored to original.](image-005.png) - -- Click `Show 3D` button to see the brain shape in 3D view. If non-brain regions appear then either remove them using `Scissors` effect or click `Undo` a few times and shrink the brain segment a bit larger margin size. - -![Brain region shown in 3D view.](image-006.png) +![Solid brain cavity segment.](image-003.png) - Select `Mask volume` effect, set `Fill value` to -1000 (corresponding to air on CT), and click `Apply` to create a new volume where non-brain region is blanked out. To see the resulting masked volume, click the eye icon next to `Output volume`. -![Blanked out volume.](image-007.png) - -- Click `Add` button to create a new segment, which will store the part that is separated from the skull +![Blanked out volume.](image-004.png) - Brain image intensity range is very narrow range compared to whole intensity range of the volume. To see brain contrast better, go to `Data` module, click eye icon of `Segmentation` node to hide it, click on eye icon of `CTBrain masked` node to show it in slice viewers. - Click "adjust window/level..." toolbar and then hold down `Ctrl` key while click-and-drag in the brain region to set optimal window/level. -![Brain volume after contrast adjustment.](image-008.png) +![Brain volume after contrast adjustment.](image-005.png) Final result: -![Skull-stripped CT image.](image-009.gif) +![Skull-stripped CT image.](image-006.png) diff --git a/CTSkullStripping/image-002.png b/CTSkullStripping/image-002.png index eab79a5..f0ed7fc 100644 Binary files a/CTSkullStripping/image-002.png and b/CTSkullStripping/image-002.png differ diff --git a/CTSkullStripping/image-003.png b/CTSkullStripping/image-003.png index 3e945fa..902949e 100644 Binary files a/CTSkullStripping/image-003.png and b/CTSkullStripping/image-003.png differ diff --git a/CTSkullStripping/image-004.png b/CTSkullStripping/image-004.png index bef2202..20e1ca7 100644 Binary files a/CTSkullStripping/image-004.png and b/CTSkullStripping/image-004.png differ diff --git a/CTSkullStripping/image-005.png b/CTSkullStripping/image-005.png index 7eb7199..69958bb 100644 Binary files a/CTSkullStripping/image-005.png and b/CTSkullStripping/image-005.png differ diff --git a/CTSkullStripping/image-006.png b/CTSkullStripping/image-006.png index c67ab1f..9d7a664 100644 Binary files a/CTSkullStripping/image-006.png and b/CTSkullStripping/image-006.png differ diff --git a/CTSkullStripping/image-007.png b/CTSkullStripping/image-007.png deleted file mode 100644 index b741590..0000000 Binary files a/CTSkullStripping/image-007.png and /dev/null differ diff --git a/CTSkullStripping/image-008.png b/CTSkullStripping/image-008.png deleted file mode 100644 index 69958bb..0000000 Binary files a/CTSkullStripping/image-008.png and /dev/null differ diff --git a/CTSkullStripping/image-009.gif b/CTSkullStripping/image-009.gif deleted file mode 100644 index 610ccd6..0000000 Binary files a/CTSkullStripping/image-009.gif and /dev/null differ diff --git a/SkinSurface2/README.md b/SkinSurface2/README.md index eae64c9..ba5cc35 100644 --- a/SkinSurface2/README.md +++ b/SkinSurface2/README.md @@ -11,9 +11,9 @@ This recipe replaces an [earlier recipe that used `Flood filling` effect](../Ski Recommended workflow -------------------- -- Use `Wrap solidify` effect (provided by `SegmentEditorExtraEffects` extension) with to segment outside air. Click anywhere in the outside air in slice views to segment the air. If not all areas are hightlighted then click in air regions that are not included and/or increase `Intensity tolerance` parameter. If segment leaks inside the tissue then click `Undo` and increase `Neighborhood size`. -- Use `Logical operators` effect / `Invert` operation to make the segment contain tissue instead of air -- Use `Scissors` effect and `Smoothing` effect to remove artifacts and noise +- Use `Threshold` and effect to create a segment that contains the head (skin and internal structures) +- Use `Islands` effect's `Keep largest island` method to remove noise speckles +- Use `Wrap solidify` effect (provided by `SurfaceWrapSolidify` extension) to fill holes inside the segment. Example -------