Class BatchRegistrationTask
java.lang.Object
javax.swing.SwingWorker<MeshModel,HumanFace>
cz.fidentis.analyst.gui.task.batch.registration.BatchRegistrationTask
- All Implemented Interfaces:
Runnable
,Future<MeshModel>
,RunnableFuture<MeshModel>
A concurrent task that registers multiple faces to selected template face. Simultaneously, it computes
average face. The exact computation parameters are taken from the
BatchRegistrationPanel
.-
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
ConstructorsConstructorDescriptionBatchRegistrationTask
(ProgressDialog<MeshModel, HumanFace> progressDialog, BatchRegistrationPanel controlPanel, Canvas canvas) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected AvgMeshVisitor
computeAvgFaceNN
(HumanFace initFace, HumanFace superimposedFace, AvgMeshVisitor avgFaceConstructor, boolean doRegistration) protected AvgMeshVisitor
computeAvgFaceRT
(HumanFace initFace, HumanFace superimposedFace, AvgMeshVisitor avgFaceConstructor, boolean doRegistration) protected AvgMeshVisitor
computeAvgFaceRTGPU
(HumanFace initFace, HumanFace superimposedFace, AvgMeshVisitor avgFaceConstructor) protected HumanFace
createAvgFace
(MeshModel avgMesh) protected MeshModel
protected void
done()
protected HumanFace
getFaceFromFaceFactory
(int faceIndex) protected HumanFace
protected void
protected void
protected void
protected void
Methods inherited from class javax.swing.SwingWorker
addPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, 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
-
BatchRegistrationTask
public BatchRegistrationTask(ProgressDialog<MeshModel, HumanFace> progressDialog, BatchRegistrationPanel controlPanel, Canvas canvas) 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
canvas
- Canvas with a 3D scene.
-
-
Method Details
-
doInBackground
- Specified by:
doInBackground
in classSwingWorker<MeshModel,
HumanFace> - Throws:
Exception
-
done
protected void done()- Overrides:
done
in classSwingWorker<MeshModel,
HumanFace>
-
process
- Overrides:
process
in classSwingWorker<MeshModel,
HumanFace>
-
getAverageFace
-
printTimeStats
protected void printTimeStats() -
register
-
computeAvgFaceRTGPU
protected AvgMeshVisitor computeAvgFaceRTGPU(HumanFace initFace, HumanFace superimposedFace, AvgMeshVisitor avgFaceConstructor) -
computeAvgFaceRT
protected AvgMeshVisitor computeAvgFaceRT(HumanFace initFace, HumanFace superimposedFace, AvgMeshVisitor avgFaceConstructor, boolean doRegistration) -
computeAvgFaceNN
protected AvgMeshVisitor computeAvgFaceNN(HumanFace initFace, HumanFace superimposedFace, AvgMeshVisitor avgFaceConstructor, boolean doRegistration) -
createAvgFace
- Throws:
IOException
-
getFaceFromFaceFactory
-
setHumanFaceFactoryParams
protected void setHumanFaceFactoryParams() -
getTemplateFace
-