From b5512f02f316d677592df8352c5884dd3635fabd Mon Sep 17 00:00:00 2001 From: Drew Short Date: Fri, 29 Aug 2014 05:58:58 -0500 Subject: [PATCH] Working on some cleanup. Moved setup logic for the image tile into it's own class. Reduced the logic in the factory. Need to work on context menus and selectable items in the pane next. Might have to be done with a custom TilePane that allows selection. --- cli/pom.xml | 1 - engine/pom.xml | 1 - .../imagetools/engine/ConcurrentEngine.scala | 4 +- .../sothr/imagetools/engine/hash/AHash.scala | 3 + .../sothr/imagetools/engine/hash/PHash.scala | 3 + gui/pom.xml | 1 - .../main/resources/fxml/mainapp/MainApp.fxml | 5 ++ .../imagetools/ui/component/ImageTile.scala | 68 +++++++++++++++++-- .../ui/component/ImageTileFactory.scala | 62 ++--------------- .../ui/controller/AppController.scala | 20 +++--- 10 files changed, 88 insertions(+), 80 deletions(-) diff --git a/cli/pom.xml b/cli/pom.xml index 5a2b0df..a5e716d 100644 --- a/cli/pom.xml +++ b/cli/pom.xml @@ -9,7 +9,6 @@ ../parent - com.sothr.imagetools ImageTools-CLI 0.1.0 jar diff --git a/engine/pom.xml b/engine/pom.xml index e1c0d3f..2401ed9 100644 --- a/engine/pom.xml +++ b/engine/pom.xml @@ -9,7 +9,6 @@ ../parent - com.sothr.imagetools ImageTools-Engine 0.1.2 jar diff --git a/engine/src/main/scala/com/sothr/imagetools/engine/ConcurrentEngine.scala b/engine/src/main/scala/com/sothr/imagetools/engine/ConcurrentEngine.scala index 129afcf..67458fa 100644 --- a/engine/src/main/scala/com/sothr/imagetools/engine/ConcurrentEngine.scala +++ b/engine/src/main/scala/com/sothr/imagetools/engine/ConcurrentEngine.scala @@ -234,7 +234,7 @@ class ConcurrentEngineProcessingController extends Actor with ActorLogging { */ def checkForResults() = { try { - listener ! SubmitMessage(s"Finished Processing ${processed}/${processed} images") + listener ! SubmitMessage(s"Finished Processing $processed/$processed images") processorsFinished = 0 toProcess = 0 processed = 0 @@ -396,7 +396,7 @@ class ConcurrentEngineSimilarityController extends Actor with ActorLogging { */ def checkForResults() = { try { - listener ! SubmitMessage(s"Finished Scanning ${processed}/${processed} images") + listener ! SubmitMessage(s"Finished Scanning $processed/$processed images") processorsFinished = 0 toProcess = 0 processed = 0 diff --git a/engine/src/main/scala/com/sothr/imagetools/engine/hash/AHash.scala b/engine/src/main/scala/com/sothr/imagetools/engine/hash/AHash.scala index 8fda977..16a04e2 100644 --- a/engine/src/main/scala/com/sothr/imagetools/engine/hash/AHash.scala +++ b/engine/src/main/scala/com/sothr/imagetools/engine/hash/AHash.scala @@ -3,6 +3,9 @@ package com.sothr.imagetools.engine.hash import grizzled.slf4j.Logging /** + * Speedy AHash Perceptual Hashing + * Uses the average value of the pixels as a baseline + * * Created by dev on 1/22/14. */ object AHash extends PerceptualHasher with Logging { diff --git a/engine/src/main/scala/com/sothr/imagetools/engine/hash/PHash.scala b/engine/src/main/scala/com/sothr/imagetools/engine/hash/PHash.scala index 49aac58..232e96f 100644 --- a/engine/src/main/scala/com/sothr/imagetools/engine/hash/PHash.scala +++ b/engine/src/main/scala/com/sothr/imagetools/engine/hash/PHash.scala @@ -4,6 +4,9 @@ import edu.emory.mathcs.jtransforms.dct.FloatDCT_2D import grizzled.slf4j.Logging /** + * Complex perceptual hash + * Uses FFT to get + * * Created by dev on 1/22/14. */ object PHash extends PerceptualHasher with Logging { diff --git a/gui/pom.xml b/gui/pom.xml index d146026..0da165e 100644 --- a/gui/pom.xml +++ b/gui/pom.xml @@ -9,7 +9,6 @@ ../parent - com.sothr.imagetools ImageTools-GUI 0.1.0 jar diff --git a/gui/src/main/resources/fxml/mainapp/MainApp.fxml b/gui/src/main/resources/fxml/mainapp/MainApp.fxml index 8772b33..969ae59 100644 --- a/gui/src/main/resources/fxml/mainapp/MainApp.fxml +++ b/gui/src/main/resources/fxml/mainapp/MainApp.fxml @@ -65,6 +65,11 @@ + + + + +