MCPcopy Create free account
hub / github.com/biometrics/openbr / refreshImage

Method refreshImage

openbr/gui/templateviewer.cpp:70–88  ·  view source on GitHub ↗

PRIVATE ***/

Source from the content-addressed store, hash-verified

68
69/*** PRIVATE ***/
70void TemplateViewer::refreshImage()
71{
72 if (file.isNull() || (format == "Photo")) {
73 setImage(file, true);
74 } else {
75 const QString path = QString(br::Globals->scratchPath()) + "/thumbnails";
76 const QString hash = file.hash()+format;
77 const QString processedFile = path+"/"+file.baseName()+hash+".png";
78 if (!QFileInfo(processedFile).exists()) {
79 if (format == "Registered")
80 Enroll(file.flat(), path+"[postfix="+hash+",cache,algorithm=RegisterAffine]");
81 else if (format == "Enhanced")
82 Enroll(file.flat(), path+"[postfix="+hash+",cache,algorithm=ContrastEnhanced]");
83 else if (format == "Features")
84 Enroll(file.flat(), path+"[postfix="+hash+",cache,algorithm=ColoredLBP]");
85 }
86 setImage(processedFile, true);
87 }
88}
89
90QPointF TemplateViewer::getImagePoint(const QPointF &sp) const
91{

Callers

nothing calls this directly

Calls 4

scratchPathMethod · 0.80
hashMethod · 0.80
flatMethod · 0.80
isNullMethod · 0.45

Tested by

no test coverage detected