Package sc.fiji.snt.seed
Class SeedRois
java.lang.Object
sc.fiji.snt.seed.SeedRois
Bidirectional
SeedPoint-Roi converter.- Author:
- Tiago Ferreira
-
Method Summary
-
Method Details
-
toSeeds
public static List<SeedPoint> toSeeds(ij.gui.Roi[] rois, ij.ImagePlus imp, double confidence, String type, String source) Converts the given ROIs to seeds.Rules per ROI type:
- Area ROIs (oval, polygon, rectangle, freehand, traced):
centroid as position, radius derived from the area of the matched
circle (
r = sqrt(area / pi)) - Line ROIs: midpoint as position, radius = half the path length
- Point ROIs: each contained point becomes its own seed with
radius = 0. All points inherit the ROI's hyperstack position. - Other (e.g. ANGLE, COMPOSITE): bounds center as position,
radius = 0.
- Parameters:
rois- the input ROIs.null/empty array returns an empty list.nullentries are skipped.imp- provides calibration and default C/T/Z.nullyields uncalibrated (voxel-unit) coordinates and unset CT position.confidence- value assigned to every produced seed, clamped to[0, 1].type- value assigned to each seed'stypefield.null->"".source- value assigned to each seed'ssourcefield (e.g."roi").null->"".- Returns:
- a list of seeds. Point ROIs may produce multiple seeds (one per contained point); a ROI with no usable geometry is skipped.
- Area ROIs (oval, polygon, rectangle, freehand, traced):
centroid as position, radius derived from the area of the matched
circle (
-
toRois
Converts the given seeds to ROIs.Seed radius is converted using the geometric mean of pixelWidth and pixelHeight so a 2D seed round-trip preserves the physical area of the equivalent disk
- Parameters:
seeds- the input seed points.null/empty array returns an empty list.nullentries are skipped.imp- provides calibration.nullyields uncalibrated (voxel-unit) coordinates- Returns:
- a list of ROIs (either PointROI (seeds without radius) or OvalRoi.
-