algorithm
Class Matching3D

java.lang.Object
  extended by algorithm.Matching3D

public class Matching3D
extends java.lang.Object

Wrapper class to use PSGM for the matching of 3D data. Takes care of loading the data and reordering the skeletons, if needed.

PSGM is then applied to the two skeletons, where the end nodes of the two skeletons are matched.


Field Summary
private  Config config
          holding configuration parameters
private  org.apache.log4j.Logger logger
          logger instance
private  boolean reordered
          true if the two skeletons had to be reordered
private  SkeletonObject so1
          first, "smaller" skeleton object (the one with less end nodes
private  SkeletonObject so2
          second, " bigger" skeleton object (the one with more end nodes)
 
Constructor Summary
Matching3D(java.lang.String thinningfile1, java.lang.String thinninginfo1, java.lang.String volumefile1, java.lang.String volumeinfo1, java.lang.String thinningfile2, java.lang.String thinninginfo2, java.lang.String volumefile2, java.lang.String volumeinfo2, Config config)
          Constructor.
 
Method Summary
 CleanMatchingResult go()
          Applying PSGM.go(Config) to the two skeletons loaded.
private  void loadSkeletons(java.lang.String thinningfile1, java.lang.String thinninginfo1, java.lang.String volumefile1, java.lang.String volumeinfo1, java.lang.String thinningfile2, java.lang.String thinninginfo2, java.lang.String volumefile2, java.lang.String volumeinfo2)
          Load the skeletons.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private final org.apache.log4j.Logger logger
logger instance


so1

private SkeletonObject so1
first, "smaller" skeleton object (the one with less end nodes


so2

private SkeletonObject so2
second, " bigger" skeleton object (the one with more end nodes)


reordered

private boolean reordered
true if the two skeletons had to be reordered


config

private final Config config
holding configuration parameters

Constructor Detail

Matching3D

public Matching3D(java.lang.String thinningfile1,
                  java.lang.String thinninginfo1,
                  java.lang.String volumefile1,
                  java.lang.String volumeinfo1,
                  java.lang.String thinningfile2,
                  java.lang.String thinninginfo2,
                  java.lang.String volumefile2,
                  java.lang.String volumeinfo2,
                  Config config)
           throws java.io.IOException,
                  InvalidSkeletonException
Constructor. Creating new Matching3D instance. This will automatically load the skeletons and reorder them, if needed. Direct access to the member skeleton variables should be avoided as they might have been reordered, better access the cleaned matching result return by go().

Parameters:
thinningfile1 - - the path to the skeleton data file
thinninginfo1 - - the path to the skeleton info file
volumefile1 - - the path to the volume data file
volumeinfo1 - - the path to the volume info file
thinningfile2 - - the path to the second skeleton data file
thinninginfo2 - - the path to the second skeleton info file
volumefile2 - - the path to the second volume data file
volumeinfo2 - - the path to the second volume info file
config - - holding all configuration parameters
Throws:
java.io.IOException - - if one or more of the input files could not be found
InvalidSkeletonException - - if one of the skeletons could not be parsed correctly
Method Detail

go

public CleanMatchingResult go()
                       throws InvalidSkeletonException,
                              InvalidWeightFunctionGivenException,
                              WrongUsageOfAlgorithmException,
                              InvalidConfigParameterException
Applying PSGM.go(Config) to the two skeletons loaded. Return value is a CleanMatchingResult, which means that the resulting matchlist from PSGM.go(config.Config) is already cleaned up. That is, if the two skeleton have been reordered in the matching process, the matchings are now "translated back" to the original skeleton order. The matchings are given by the end nodes' indices in the original skeleton.

Returns:
the matching result
Throws:
InvalidSkeletonException - if one of the skeletons seems to be broken
InvalidWeightFunctionGivenException - if no valid weight function could be extracted for Hungarian algorihthm
WrongUsageOfAlgorithmException - if one of the algorithm has been applied in a wrong way
InvalidConfigParameterException

loadSkeletons

private void loadSkeletons(java.lang.String thinningfile1,
                           java.lang.String thinninginfo1,
                           java.lang.String volumefile1,
                           java.lang.String volumeinfo1,
                           java.lang.String thinningfile2,
                           java.lang.String thinninginfo2,
                           java.lang.String volumefile2,
                           java.lang.String volumeinfo2)
                    throws java.io.IOException,
                           InvalidSkeletonException
Load the skeletons.

Parameters:
thinningfile1 - - the path to the skeleton data file
thinninginfo1 - - the path to the skeleton info file
volumefile1 - - the path to the volume data file
volumeinfo1 - - the path to the volume info file
thinningfile2 - - the path to the second skeleton data file
thinninginfo2 - - the path to the second skeleton info file
volumefile2 - - the path to the second volume data file
volumeinfo2 - - the path to the second volume info file
Throws:
java.io.IOException - - if one of the input files could not be found
InvalidSkeletonException - - if the skeleton seems to be broken