Class AnalyzeErrorsUtil
java.lang.Object
net.preibisch.mvrecon.fiji.spimdata.explorer.analyzeerror.AnalyzeErrorsUtil
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAggregated error statistics for one (groupA, groupB) bucket.static enumDisplay mode forAnalyzeErrorsResultsWindow.static final classPer-(viewA, viewB) error result returned bygetErrors(net.preibisch.mvrecon.fiji.spimdata.SpimData2, java.util.List<mpicbg.spim.data.sequence.ViewId>, java.util.Map<java.lang.String, java.lang.Double>).static classBundle of dialog choices returned bygetParametersExtended(net.preibisch.mvrecon.fiji.spimdata.SpimData2, java.util.List<mpicbg.spim.data.sequence.ViewId>).static final classPer-group aggregate of errors and connected groups (Single-view mode, grouped).static final classPer-view aggregate of errors and connections (Single-view mode, ungrouped). -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic intstatic booleanstatic intstatic AnalyzeErrorsUtil.Modestatic booleanstatic intstatic boolean -
Method Summary
Modifier and TypeMethodDescriptioncomputeGroupPairs(SpimData2 data, ArrayList<AnalyzeErrorsUtil.PairError> errors, AnalyzeErrorsUtil.Parameters p) Bucket per-pair errors into per-group-pair buckets usingGroup.combineBy(java.util.List<V>, java.util.Set<java.lang.Class<? extends mpicbg.spim.data.generic.base.Entity>>)(collapse semantics — same as ViewSetupExplorer / Interest_Point_Registration grouping).computeSingleGroupErrors(SpimData2 data, ArrayList<AnalyzeErrorsUtil.PairError> errors, AnalyzeErrorsUtil.Parameters p) AggregateAnalyzeErrorsUtil.PairErrors into oneAnalyzeErrorsUtil.SingleGroupErrorper group that participates in at least one group-pair under the supplied groupingAnalyzeErrorsUtil.Parameters.AggregateAnalyzeErrorsUtil.PairErrors into oneAnalyzeErrorsUtil.SingleViewErrorper view that appears in at least one pair.static ArrayList<AnalyzeErrorsUtil.PairError> getErrors(SpimData2 data, List<mpicbg.spim.data.sequence.ViewId> viewIds, Map<String, Double> labelAndWeights) Compute weighted error per (viewA, viewB) pair, returning the list sorted desc by error.getParameters(SpimData2 data, List<mpicbg.spim.data.sequence.ViewId> viewIds) Backwards-compatible wrapper that returns just the labels-and-weights map.static AnalyzeErrorsUtil.ParametersgetParametersExtended(SpimData2 data, List<mpicbg.spim.data.sequence.ViewId> viewIds) Extended dialog returning the fullAnalyzeErrorsUtil.Parametersbundle (labels+weights, grouping, top/bottom caps).static voidprintResults(SpimData2 data, ArrayList<AnalyzeErrorsUtil.PairError> errors, AnalyzeErrorsUtil.Parameters p) Print top-N worst, bottom-M best, and the per-old-tile-pair / per-old-tile rollup summary blocks that theAnalyzeErrorsUtil.Parametersdialog choices request.static voidselectViewsAndRecenter(ViewSetupExplorerPanel<?> panel, AnalyzeErrorsUtil.Parameters params, Collection<? extends mpicbg.spim.data.sequence.ViewId> views) Bring the explorer into the grouping state AnalyzeErrors was run with (only if it isn't already there), then select rows whose view-set intersects the given views, update BDV coloring, and recenter on the selection.static voidselectViewsAndRecenter(ViewSetupExplorerPanel<?> panel, AnalyzeErrorsUtil.Parameters params, Collection<? extends mpicbg.spim.data.sequence.ViewId> views, boolean recenter) Same asselectViewsAndRecenter(ViewSetupExplorerPanel, Parameters, Collection)but skips theTransformationTools.reCenterViews(...)call whenrecenter == false.
-
Field Details
-
defaultGroupAngles
public static boolean defaultGroupAngles -
defaultTopNWorst
public static int defaultTopNWorst -
defaultBottomMBest
public static int defaultBottomMBest -
defaultMiddleK
public static int defaultMiddleK -
defaultPrintAll
public static boolean defaultPrintAll -
defaultUseAllViews
public static boolean defaultUseAllViews -
defaultMode
-
-
Method Details
-
computeSingleViewErrors
public static ArrayList<AnalyzeErrorsUtil.SingleViewError> computeSingleViewErrors(ArrayList<AnalyzeErrorsUtil.PairError> errors) AggregateAnalyzeErrorsUtil.PairErrors into oneAnalyzeErrorsUtil.SingleViewErrorper view that appears in at least one pair. Each pair contributes to both endpoints. Sorted descending by avg. -
computeSingleGroupErrors
public static ArrayList<AnalyzeErrorsUtil.SingleGroupError> computeSingleGroupErrors(SpimData2 data, ArrayList<AnalyzeErrorsUtil.PairError> errors, AnalyzeErrorsUtil.Parameters p) AggregateAnalyzeErrorsUtil.PairErrors into oneAnalyzeErrorsUtil.SingleGroupErrorper group that participates in at least one group-pair under the supplied groupingAnalyzeErrorsUtil.Parameters. Each cross-group pair contributes once to each endpoint group. Sorted descending by avg. -
computeGroupPairs
public static ArrayList<AnalyzeErrorsUtil.GroupPairResult> computeGroupPairs(SpimData2 data, ArrayList<AnalyzeErrorsUtil.PairError> errors, AnalyzeErrorsUtil.Parameters p) Bucket per-pair errors into per-group-pair buckets usingGroup.combineBy(java.util.List<V>, java.util.Set<java.lang.Class<? extends mpicbg.spim.data.generic.base.Entity>>)(collapse semantics — same as ViewSetupExplorer / Interest_Point_Registration grouping). Returns the buckets sorted descending by average error. Empty if no grouping is selected. Shared by the printed-log section inprintResults(net.preibisch.mvrecon.fiji.spimdata.SpimData2, java.util.ArrayList<net.preibisch.mvrecon.fiji.spimdata.explorer.analyzeerror.AnalyzeErrorsUtil.PairError>, net.preibisch.mvrecon.fiji.spimdata.explorer.analyzeerror.AnalyzeErrorsUtil.Parameters)and the AnalyzeErrorsResultsWindow GUI. -
getErrors
public static ArrayList<AnalyzeErrorsUtil.PairError> getErrors(SpimData2 data, List<mpicbg.spim.data.sequence.ViewId> viewIds, Map<String, Double> labelAndWeights) Compute weighted error per (viewA, viewB) pair, returning the list sorted desc by error. Inverted iteration: walks each view's correspondences exactly once and accumulates into a canonical-pair map. Avoids the all-pairs Cartesian product that OOMs on large datasets. Complexity: O(N · C_avg) instead of O(N² · C_avg). Same-label only (matching the previous code's filter): correspondences with a different label on the other side are skipped. -
getParameters
public static HashMap<String,Double> getParameters(SpimData2 data, List<mpicbg.spim.data.sequence.ViewId> viewIds) Backwards-compatible wrapper that returns just the labels-and-weights map. -
getParametersExtended
public static AnalyzeErrorsUtil.Parameters getParametersExtended(SpimData2 data, List<mpicbg.spim.data.sequence.ViewId> viewIds) Extended dialog returning the fullAnalyzeErrorsUtil.Parametersbundle (labels+weights, grouping, top/bottom caps). -
printResults
public static void printResults(SpimData2 data, ArrayList<AnalyzeErrorsUtil.PairError> errors, AnalyzeErrorsUtil.Parameters p) Print top-N worst, bottom-M best, and the per-old-tile-pair / per-old-tile rollup summary blocks that theAnalyzeErrorsUtil.Parametersdialog choices request. -
selectViewsAndRecenter
public static void selectViewsAndRecenter(ViewSetupExplorerPanel<?> panel, AnalyzeErrorsUtil.Parameters params, Collection<? extends mpicbg.spim.data.sequence.ViewId> views) Bring the explorer into the grouping state AnalyzeErrors was run with (only if it isn't already there), then select rows whose view-set intersects the given views, update BDV coloring, and recenter on the selection. The fast path (explorer grouping already matchesparams) skips the re-grouping and the table-update waits — no flicker. Channel/Angle grouping isn't expressible via the explorer's checkboxes, so whenparamsasked for those, the explorer is ungrouped instead and selection happens on the individual views. Must NOT be called on the EDT — usesSimpleMultiThreading.threadWait(long)to let the explorer's table updates settle when re-grouping is needed. -
selectViewsAndRecenter
public static void selectViewsAndRecenter(ViewSetupExplorerPanel<?> panel, AnalyzeErrorsUtil.Parameters params, Collection<? extends mpicbg.spim.data.sequence.ViewId> views, boolean recenter) Same asselectViewsAndRecenter(ViewSetupExplorerPanel, Parameters, Collection)but skips theTransformationTools.reCenterViews(...)call whenrecenter == false. Selection in the explorer (and therefore BDV source visibility) still updates either way.
-