Class CrossViewCorrespondenceCriterion

java.lang.Object
net.preibisch.mvrecon.process.splitting.CrossViewCorrespondenceCriterion
All Implemented Interfaces:
OctTreeSplitCriterion

public class CrossViewCorrespondenceCriterion extends Object implements OctTreeSplitCriterion
Criterion that counts cross-view corresponding interest points within a region. An interest point is counted as a "cross-view correspondence" if it has at least one correspondence to a DIFFERENT view (not within the same original view). If the count of unique detections exceeds the threshold, the region should be split further.
  • Field Details

    • CRITERION_NAME

      public static final String CRITERION_NAME
      See Also:
    • defaultMaxCorrespondences

      public static int defaultMaxCorrespondences
    • defaultLabelChoices

      public static int[] defaultLabelChoices
  • Constructor Details

    • CrossViewCorrespondenceCriterion

      public CrossViewCorrespondenceCriterion(SpimData2 spimData, Set<String> labels, int maxCorrespondences)
      Constructor.
      Parameters:
      spimData - The SpimData2 containing interest points
      labels - Set of interest point labels to consider
      maxCorrespondences - Threshold - regions with more unique detections should be split
  • Method Details

    • shouldSplit

      public boolean shouldSplit(List<OctTreeSplitCriterion.SplitCorrespondence> correspondences)
      Description copied from interface: OctTreeSplitCriterion
      Evaluates whether to continue splitting based on pre-filtered correspondences. The correspondences have already been filtered to only include those within the current interval.
      Specified by:
      shouldSplit in interface OctTreeSplitCriterion
      Parameters:
      correspondences - The correspondences within the current interval
      Returns:
      true if this region should be split further, false if it should remain as-is
    • scoreSplit

      Description copied from interface: OctTreeSplitCriterion
      Score a candidate binary split. Lower is better. Used as tiebreaker in chooseBestSplitDimension when multiple dimensions produce the same number of clean children.
      Specified by:
      scoreSplit in interface OctTreeSplitCriterion
      Parameters:
      child1 - Correspondences in the first child
      child2 - Correspondences in the second child
      Returns:
      Score (lower = better split). Default: 0 (no preference).
    • description

      public String description()
      Specified by:
      description in interface OctTreeSplitCriterion
      Returns:
      A description of this criterion and its parameters for logging/display
    • getMaxCorrespondences

      public int getMaxCorrespondences()
    • getLabels

      public Set<String> getLabels()
      Specified by:
      getLabels in interface OctTreeSplitCriterion
      Returns:
      The set of interest point labels to consider for correspondences
    • getSpimData

      public SpimData2 getSpimData()
      Specified by:
      getSpimData in interface OctTreeSplitCriterion
      Returns:
      The SpimData2 used by this criterion (needed for accessing timepoints, views, etc.)
    • setupGUI

      public static boolean setupGUI(ij.gui.GenericDialog gd, SpimData2 data)
      Setup GUI components for cross-view correspondence criterion.
      Parameters:
      gd - The GenericDialog to add components to
      data - The SpimData2
      Returns:
      true if setup successful, false if no interest points available
    • setupGUI

      public static boolean setupGUI(ij.gui.GenericDialog gd, SpimData2 data, Set<Integer> driveByChannelIds)
      Setup GUI components for cross-view correspondence criterion.
      Parameters:
      driveByChannelIds - if non-null, label availability counts are computed only over views of these driving channels (so labels that exist in every driving view are not flagged as "only available for X/Y Views" because of mirrored channels).
    • queryGUI

      Query GUI components and create CrossViewCorrespondenceCriterion instance.
      Parameters:
      gd - The GenericDialog with user input
      data - The SpimData2
      Returns:
      CrossViewCorrespondenceCriterion instance or null if configuration invalid
    • queryGUI

      public static CrossViewCorrespondenceCriterion queryGUI(ij.gui.GenericDialog gd, SpimData2 data, Set<Integer> driveByChannelIds)
      Query GUI components and create CrossViewCorrespondenceCriterion instance.
      Parameters:
      driveByChannelIds - must match the value passed to setupGUI(ij.gui.GenericDialog, net.preibisch.mvrecon.fiji.spimdata.SpimData2) so the label choices are parsed against the same (channel-restricted) view set.