net.grelf.grip
Class MatchPair

java.lang.Object
  extended by net.grelf.grip.MatchPair

public class MatchPair
extends java.lang.Object

The existence of a MatchPair means that blob blobNo1 in image imNo1 matches blob blobNo2 in image imNo2. This is a record for holding such a match, with some static methods for outputting and using a list of matches.


Field Summary
 int blobNo1
           
 int blobNo2
           
 int imNo1
           
 int imNo2
           
 
Constructor Summary
MatchPair(int i1, int b1, int i2, int b2)
           
 
Method Summary
static void deleteMatches(java.awt.Point pt1, java.awt.Point pt2, ImFrame imf)
          Ask the user to confirm deletion of any match lists displayed in the ImFrame which intersect the rectangle defined by the two points.
static void drawMatches(java.util.List<MatchList> theListOfLists, java.util.List<MatchPair> theMatches, int wd, int ht, BlobMeas[][] theLookup, BatchProcessor theBatchProcessor)
          Display a new ImFrame in which is drawn the matched blobs and connecting lines showing how they are matched.
static MatchPair findBlobInMiddleImage(int imNo, int blobNo, int middleImNo)
          Find a given blob in the middle image by following the list of matches between images.
static void reportMatches(java.util.List<MatchPair> matches, BlobMeas[][] lookup, int nBrightest, java.lang.String fileName)
          Output the list of blob matches between images as a CSV (comma-separated value) file.
static void resetStaticObjects()
          New 29/9/09, to fix memory leak between astro processes.
protected static void setListOfLists(java.util.List<MatchList> theListOfLists)
          If drawMatches () is not used it is necessary to call this before using deleteMatches () or findBlobInMiddleImage ()
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

imNo1

public int imNo1

blobNo1

public int blobNo1

imNo2

public int imNo2

blobNo2

public int blobNo2
Constructor Detail

MatchPair

public MatchPair(int i1,
                 int b1,
                 int i2,
                 int b2)
Method Detail

resetStaticObjects

public static void resetStaticObjects()
New 29/9/09, to fix memory leak between astro processes.


drawMatches

public static void drawMatches(java.util.List<MatchList> theListOfLists,
                               java.util.List<MatchPair> theMatches,
                               int wd,
                               int ht,
                               BlobMeas[][] theLookup,
                               BatchProcessor theBatchProcessor)
Display a new ImFrame in which is drawn the matched blobs and connecting lines showing how they are matched. Caption prompts the user to draw rectangles intersecting any match lists which should be removed. When the ImFrame is closed the batch processor is invoked to do pass 2 of the astro process.


setListOfLists

protected static void setListOfLists(java.util.List<MatchList> theListOfLists)
If drawMatches () is not used it is necessary to call this before using deleteMatches () or findBlobInMiddleImage ()


deleteMatches

public static void deleteMatches(java.awt.Point pt1,
                                 java.awt.Point pt2,
                                 ImFrame imf)
Ask the user to confirm deletion of any match lists displayed in the ImFrame which intersect the rectangle defined by the two points. The rectangle is assumed to be normalised: pt1 is top left, pt2 is bottom right. Confirmed lists are deleted and the image is redrawn. Assumes that drawMatches has been called, to set the lists of matches.


findBlobInMiddleImage

public static MatchPair findBlobInMiddleImage(int imNo,
                                              int blobNo,
                                              int middleImNo)
Find a given blob in the middle image by following the list of matches between images. Assumes that drawMatches has been called, to set the lists of matches. Returns a MatchPair in which the first image is the middle one. Returns null if not found.


reportMatches

public static void reportMatches(java.util.List<MatchPair> matches,
                                 BlobMeas[][] lookup,
                                 int nBrightest,
                                 java.lang.String fileName)
Output the list of blob matches between images as a CSV (comma-separated value) file.