dialog.performDetection(this.currentImage);
}
// Run Face Recognition on selected region
else if (incomingEvent instanceof EventRecognizeFace) {
EventRecognizeFace event = (EventRecognizeFace) incomingEvent;
mainFrame.setEnabled(false);
HashMap<String, Integer> recognitionResult = (MainController.getInstance().recognizeFace(event.getRegion()));
if (this.currentRegion == event.getRegion())
mainFrame.browserTab.getImagePanel().getClassificationPanel().updateRecognitionData(recognitionResult);
mainFrame.setEnabled(true);
}
// Change minimum size of scan window
else if (incomingEvent instanceof EventChangeScanWindowSize) {
EventChangeScanWindowSize event = (EventChangeScanWindowSize) incomingEvent;
MainController.getInstance().setScanWindowSize(event.getNewSize());
mainFrame.browserTab.getImagePanel().repaint();
}
// Update menu bar
else if (incomingEvent instanceof EventUpdateMenuBar) {
EventUpdateMenuBar event = (EventUpdateMenuBar) incomingEvent;
mainFrame.browserTab.getMenuBar().update(event.isDetectionAllowed());
}
// Shut down application and save settings
else if (incomingEvent instanceof EventShutdownMainFrame) {
MainController.getInstance().getDetectionHotSpot().serializeContent();