xmipp_transform_morphology (v3.0)


Apply morphological operations to binary or gray images/volumes. You may learn about morphological operations in general from here.


-i, --input <input_file>
Input file: metadata, stack, volume or image.
--mode <mode=overwrite>
Metadata writing mode.
where <mode> can be:
  • overwrite Replace the content of the file with the Metadata
  • append Write the Metadata as a new block, removing the old one
--label <image_label=image>
Label to be used to read/write images.
-o, --output <output_file=>
Output file: metadata, stack, volume or image.
--oroot <root=>
Rootname of output individual images. Output image format can be set adding extension after rootname as ":ext".
--binaryOperation <op>
Morphological operation on binary images
where <op> can be:
  • dilation Dilate white region
  • erosion Erode white region
  • closing Dilation+Erosion, removes black spots
  • opening Erosion+Dilation, removes white spots
or --grayOperation <op>
Morphological operation on gray images
where <op> can be:
  • sharpening <w=1> <s=0.5> Sharpening with width (suggested 1 or 2) and strength (suggested 0.1-1.0). Only valid for volumes, not images.
--neigh2D <n=Neigh8>
Neighbourhood in 2D.
where <n> can be:
  • Neigh4
  • Neigh8 ( requires --binaryOperation )
--neigh3D <n=Neigh18>
Neighbourhood in 3D.
where <n> can be:
  • Neigh6
  • Neigh18
  • Neigh26 ( requires --binaryOperation )
--size <s=1> ( requires --binaryOperation )
Size of the Strutural element.
--count <c=0> ( requires --binaryOperation )
Minimum required neighbors with distinct value.

Examples and notes

xmipp_transform_morphology -i binaryVolume.vol --binaryOperation dilation

User's comments