java.lang.Object
net.preibisch.mvrecon.process.pointcloud.pointdescriptor.matcher.SubsetMatcher
All Implemented Interfaces:
Matcher
Direct Known Subclasses:
ModelPriorSubsetMatcher

public class SubsetMatcher extends Object implements Matcher
  • Constructor Details

    • SubsetMatcher

      public SubsetMatcher(int subsetSize, int numNeighbors)
      Matches n out of m neighbor points, the effort increases exponentially(!) For example SubsetMatcher(4,4) is identical to calling SimpleMatcher(4)
      Parameters:
      subsetSize - (n) - how many neighbors are matched in each try
      numNeighbors - (m) - out of how many neighbors to choose
  • Method Details

    • getNeighbors

      public int[][] getNeighbors()
    • getSubsetSize

      public int getSubsetSize()
    • getNumNeighbors

      public int getNumNeighbors()
    • getNumCombinations

      public int getNumCombinations()
    • getNumMatchings

      public int getNumMatchings()
    • getRequiredNumNeighbors

      public int getRequiredNumNeighbors()
      Specified by:
      getRequiredNumNeighbors in interface Matcher
      Returns:
      The number of nearest neighbors required for this Matcher
    • createCandidates

      Specified by:
      createCandidates in interface Matcher
      Parameters:
      pd1 - - pointdescriptor 1
      pd2 - - pointdescriptor 2
      Returns:
      An ArrayList of corresponding set of PointMatches which contain LinkedPoints linking to the actual Point instance they are created from
    • getNormalizationFactor

      public double getNormalizationFactor(ArrayList<mpicbg.models.PointMatch> matches, Object fitResult)
      Description copied from interface: Matcher
      Computes a normalization factor for the case that the different set of PointMatches are not comparable (for example number of neighbors used is not constant)
      Specified by:
      getNormalizationFactor in interface Matcher
      Parameters:
      matches - the set of PointMatches
      fitResult - - potential data needed to compute it
      Returns:
      The normalization factor for a certain set of PointMatches
    • computePD

      public static int[][] computePD(int n, int k, int offset)
    • computePDRecursive

      protected static int[][] computePDRecursive(int tolerance, int n, int offset)
      Computes recursively how to create different PointDescriptors of the same Point when some tolerance is allowed, e.g. there are outliers which should be identified. For 3 neighbors allowing 2 outliers and starting with the second nearest neigbor (the nearest one is in most cases the one you use as input) the result looks like that: (Each coloum will be one PointDescriptor) |1| |1| |1| |2| |1| |1| |2| |1| |2| |3| |2| |2| |3| |3| |2| |3| |3| |4| |4| |4| |3| |4| |4| |4| |5| |5| |5| |5| |5| |5|
      Parameters:
      tolerance - - How many tolerance is accepted [0 ... m]
      n - - initialized with the number of neighbors
      offset - - the starting position for the neighbors, usually 1
      Returns:
      an array containing the neighbors for each PointDescriptor as array