Class ComparisonSharedState<T extends org.anchoranalysis.annotation.io.assignment.Assignment<org.anchoranalysis.image.voxel.object.ObjectMask>>
Object
org.anchoranalysis.plugin.annotation.bean.comparison.ComparisonSharedState<T>
- Type Parameters:
T- the type ofAssignmentforObjectMask.
public class ComparisonSharedState<T extends org.anchoranalysis.annotation.io.assignment.Assignment<org.anchoranalysis.image.voxel.object.ObjectMask>> extends Object
Shared state for comparison operations, including grouping and statistics.
-
Constructor Summary
Constructors Constructor Description ComparisonSharedState(org.anchoranalysis.plugin.annotation.bean.comparison.CSVAssignment assignmentCSV, int numberLevelsGrouping, Function<String,ImageCounterWithStatistics<T>> funcCreateGroup)Creates a newComparisonSharedState. -
Method Summary
Modifier and Type Method Description org.anchoranalysis.plugin.annotation.bean.comparison.CSVAssignmentgetAssignmentCSV()The CSV assignment for the comparison.ImageCounter<T>groupsForImage(org.anchoranalysis.plugin.annotation.bean.comparison.SplitString descriptiveSplit)Retrieves the groups for a given image based on its descriptive split.List<org.anchoranalysis.annotation.io.comparer.StatisticsToExport>statisticsForAllGroups()Retrieves statistics for all groups.
-
Constructor Details
-
ComparisonSharedState
public ComparisonSharedState(org.anchoranalysis.plugin.annotation.bean.comparison.CSVAssignment assignmentCSV, int numberLevelsGrouping, Function<String,ImageCounterWithStatistics<T>> funcCreateGroup)Creates a newComparisonSharedState.- Parameters:
assignmentCSV- the CSV assignment for the comparison.numberLevelsGrouping- the number of levels for grouping.funcCreateGroup- a function to create a newImageCounterWithStatisticsfor a given group key.
-
-
Method Details
-
statisticsForAllGroups
Retrieves statistics for all groups.- Returns:
- a list of
StatisticsToExportfor all groups.
-
groupsForImage
public ImageCounter<T> groupsForImage(org.anchoranalysis.plugin.annotation.bean.comparison.SplitString descriptiveSplit)Retrieves the groups for a given image based on its descriptive split.- Parameters:
descriptiveSplit- the descriptive split for the image, can be null.- Returns:
- an
ImageCountercontaining all relevant groups for the image.
-
getAssignmentCSV
public org.anchoranalysis.plugin.annotation.bean.comparison.CSVAssignment getAssignmentCSV()The CSV assignment for the comparison.
-