/** * Dilate or erode a ROI using a circular structuring element. * * @param roi The ROI to dilate or erode. * @param radius The radius of the structuring element to use. If positive this will be a dilation, if negative an erosion. * @return */ public static PathShape roiMorphology(final ROI roi, final double radius) { return getShapeROI(shapeMorphology(getShape(roi), radius), roi.getC(), roi.getZ(), roi.getT()); }
Shape shape = PathROIToolsAwt.getShape(pathObject.getROI()); Area area = PathROIToolsAwt.shapeMorphology(shape, radiusPixels);