help > RE: Outlining Overlays
Sep 24, 2020  07:09 PM | Chris Rorden
RE: Outlining Overlays
To make an outline I would use the Matlab script "nii_dilate_outlines". For example,
  nii_dilate_outlines('les.nii', [-2 0])
will create an outline that goes from 2 voxels inside the region to the outer border. You can even make different outline shells like a Russian Matryoshka doll
  nii_dilate_outlines('les.nii', [-2 0 2 4])
You can get the script here:
  https://github.com/rordenlab/spmScripts
Unlike iterating typical dilation and erosion, this creates nice smooth shapes rather than diamond-like patterns. It uses distance fields as described here. Grigori Yourganov deserves credit for this script.

Threaded View

TitleAuthorDate
Joseph Taylor Sep 24, 2020
RE: Outlining Overlays
Chris Rorden Sep 24, 2020
Joseph Taylor Sep 25, 2020