PRIVATE ***/
| 68 | |
| 69 | /*** PRIVATE ***/ |
| 70 | void 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 | |
| 90 | QPointF TemplateViewer::getImagePoint(const QPointF &sp) const |
| 91 | { |
nothing calls this directly
no test coverage detected