Class PairwiseDistanceTask
java.lang.Object
javax.swing.SwingWorker<Void,Integer>
cz.fidentis.analyst.gui.task.batch.distance.BatchDistanceTask
cz.fidentis.analyst.gui.task.batch.distance.PairwiseDistanceTask
- All Implemented Interfaces:
Runnable
,Future<Void>
,RunnableFuture<Void>
A task that computes similarity of a set of faces by applying two-way (from A to B and vice versa)
distance measurement to all pairs A and B if the set.
The average face, if exists, is skipped from the similarity measurement
(i.e., we do not measure its distance to other faces).
The exact computation parameters are taken from the
BatchDistancePanel
.-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.SwingWorker
SwingWorker.StateValue
Nested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State
-
Constructor Summary
ConstructorsConstructorDescriptionPairwiseDistanceTask
(ProgressDialog<Void, Integer> progressDialog, BatchDistancePanel controlPanel, boolean crop) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected Void
protected double
numCycles
(int nFaces) protected void
protected void
setDistValues
(int i, int j, MeshDistanceVisitor pairwiseVisitor, MeshDistanceVisitor meanFaceVisitor) Sets an average distance and a sample standard deviation but only considering vertices that are not copped either by the second face in the pairwise comparison or the mean face (if defined).Methods inherited from class cz.fidentis.analyst.gui.task.batch.distance.BatchDistanceTask
done, getControlPanel, getDistDeviations, getDistSimilarities, getFaceFromFaceFactory, getProgressDialog, getSelectedFace, setDistDeviation, setDistSimilarity
Methods inherited from class javax.swing.SwingWorker
addPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, process, publish, removePropertyChangeListener, run, setProgress
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.concurrent.Future
exceptionNow, resultNow, state
-
Constructor Details
-
PairwiseDistanceTask
public PairwiseDistanceTask(ProgressDialog<Void, Integer> progressDialog, BatchDistancePanel controlPanel, boolean crop) Constructor.- Parameters:
progressDialog
- A window that show the progress of the computation. Must not benull
controlPanel
- A control panel with computation parameters. Must not benull
crop
- Iftrue
, then the measured faces are auto-cropped to the surface of the average face. This option slows down the computation even more, but enables us to compare the results of this pairwise comparison other methods based of indirect measurement (i.e., the methods that use the average face as a "gauge"). This option is ignored if there is average face computed.
-
-
Method Details
-
doInBackground
- Specified by:
doInBackground
in classSwingWorker<Void,
Integer> - Throws:
Exception
-
printTimeStats
protected void printTimeStats() -
numCycles
protected double numCycles(int nFaces) -
setDistValues
protected void setDistValues(int i, int j, MeshDistanceVisitor pairwiseVisitor, MeshDistanceVisitor meanFaceVisitor) Sets an average distance and a sample standard deviation but only considering vertices that are not copped either by the second face in the pairwise comparison or the mean face (if defined).- Parameters:
i
- the first indexj
- the second indexpairwiseVisitor
- distance visitormeanFaceVisitor
- mean face visitor
-