- All Implemented Interfaces:
PlugInFilter
,JavaDocHelp
This ImageJ plugin demonstrates the use of the class
RegionContourSegmentation
to perform both region labeling and contour
tracing simultaneously. See Sec. 8.2.2 of [1] for additional details.
Requires a binary image. Zero-value pixels are considered background, all
other pixels are foreground. Display lookup tables (LUTs) are not considered.
The resulting contours are displayed as a non-destructive vector overlay on
the original image. Outer contours of single-pixel regions are marked by an
"X". If no image is currently open, the plugin optionally loads a suitable
sample image.
This plugin also demonstrates the use of the ShapeOverlayAdapter
(provided by the imagingbook library) which handles 0.5 pixel offsets for
vector graphics transparently.
[1] W. Burger, M.J. Burge, Digital Image Processing – An Algorithmic Introduction, 3rd ed, Springer (2022).
- Version:
- 2020/12/20, 2022/09/27 revised overlay generation
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic double
Stroke width used for drawing contours.static BasicAwtColor
Color used for drawing inner contours.static boolean
Set true to list detected regions to the text console.static NeighborhoodType2D
Neighborhood type used for region segmentation (4- or 8-neighborhood).static BasicAwtColor
Color used for drawing outer contours.Fields inherited from interface ij.plugin.filter.PlugInFilter
CONVERT_TO_FLOAT, DOES_16, DOES_32, DOES_8C, DOES_8G, DOES_ALL, DOES_RGB, DOES_STACKS, DONE, FINAL_PROCESSING, KEEP_THRESHOLD, NO_CHANGES, NO_IMAGE_REQUIRED, NO_UNDO, NO_UNDO_RESET, PARALLELIZE_IMAGES, PARALLELIZE_STACKS, ROI_REQUIRED, SNAPSHOT, STACK_REQUIRED, SUPPORTS_MASKING
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor, asks to open a predefined sample image if no other image is currently open. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface imagingbook.core.jdoc.JavaDocHelp
getJavaDocUrl
-
Field Details
-
Neighborhood
Neighborhood type used for region segmentation (4- or 8-neighborhood). -
ContourStrokeWidth
Stroke width used for drawing contours. -
OuterContourColor
Color used for drawing outer contours. -
InnerContourColor
Color used for drawing inner contours. -
ListRegions
Set true to list detected regions to the text console.
-
-
Constructor Details
-
Region_Contours_Demo
public Region_Contours_Demo()Constructor, asks to open a predefined sample image if no other image is currently open.
-
-
Method Details
-
setup
- Specified by:
setup
in interfacePlugInFilter
-
run
- Specified by:
run
in interfacePlugInFilter
-