Package sc.fiji.snt.analysis.curation
Class CurationTags
java.lang.Object
sc.fiji.snt.analysis.curation.CurationTags
Reserved
cur:* path tags used to record a path's review status
after it has been examined in the Curation Assistant.
SNT's custom tags are encoded as {tag} suffixes on a path's
name string (see PathManagerUI#applyCustomTags), which means they
get stored in .traces files and show up in the Path Manager's
tag-filter dropdown. This utility provides typed helpers for the
curation-specific subset so callers (scripts, training-data exporters)
don't have parse path names.
Two states are supported:
- Author:
- Tiago Ferreira
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordFour-bucket breakdown returned bypartitionByReviewStatus(Tree). -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclearReview(Path path) Removes everycur:*suffix frompath's name.static booleanisNegative(Path path) static booleanisPositive(Path path) static booleanisReviewed(Path path) static booleanstatic voidmarkNegative(Path path) Tagspathas a negative (rejected) review example.static voidmarkPositive(Path path) Tagspathas a positive (accepted) review example.static voidmarkUnsure(Path path) Tagspathas needing follow-up review ("not sure").static CurationTags.PartitionpartitionByReviewStatus(Collection<Path> paths) Sibling ofpartitionByReviewStatus(Tree)that accepts any iterable of paths.static CurationTags.PartitionpartitionByReviewStatus(Tree tree) Splits aTree's paths into four buckets by review status: positive, negative, unsure, and unreviewed (nocur:*tag).
-
Field Details
-
POSITIVE
Tag value applied to paths accepted during review.- See Also:
-
NEGATIVE
Tag value applied to paths rejected during review.- See Also:
-
UNSURE
Tag value applied to paths flagged for follow-up review. Useful for batch workflows where some paths need a second pass before being committed to a training set.- See Also:
-
-
Method Details
-
markPositive
Tagspathas a positive (accepted) review example. -
markNegative
Tagspathas a negative (rejected) review example. -
markUnsure
Tagspathas needing follow-up review ("not sure"). -
clearReview
Removes everycur:*suffix frompath's name. Does not touch other custom tags. Idempotent on already-clean paths. -
isPositive
- Returns:
trueifpathcarries the positive review tag.
-
isNegative
- Returns:
trueifpathcarries the negative review tag.
-
isUnsure
- Returns:
trueifpathcarries the "not sure" review tag.
-
isReviewed
- Returns:
trueifpathcarries anycur:*review tag (positive, negative, or a future variant).
-
partitionByReviewStatus
Splits aTree's paths into four buckets by review status: positive, negative, unsure, and unreviewed (nocur:*tag). Buckets are returned in the iteration order of the source tree, so downstream exporters can rely on stable ordering.Typical use from a script:
Partition p = CurationTags.partitionByReviewStatus(tree); exportAsTrainingPositives(p.positive()); exportAsTrainingNegatives(p.negative()); ui.warn(p.unsure().size() + " path(s) still need review.");
- Parameters:
tree- the source tree;nullor empty yields an empty partition.- Returns:
- a
CurationTags.Partitionrecord with one list per status bucket.
-
partitionByReviewStatus
Sibling ofpartitionByReviewStatus(Tree)that accepts any iterable of paths.
-