Skip to content

Commit 0c0de1e

Browse files
committed
added sample count support
1 parent 2b2598d commit 0c0de1e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/main/kotlin/ch/bildspur/annotator/Main.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class Main : Application() {
3333
}
3434

3535
companion object {
36-
const val VERSION = "0.1"
36+
const val VERSION = "0.2"
3737

3838
@JvmStatic
3939
fun main(args: Array<String>) {

src/main/kotlin/ch/bildspur/annotator/ui/MainViewController.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,12 @@ class MainViewController {
115115
fun saveAndClose() {
116116
savePolygonsAsText()
117117

118+
// sum up
119+
val totalSamples = annotationImages.sumBy { it.polygons.size }
120+
118121
val alert = Alert(Alert.AlertType.INFORMATION)
119122
alert.title = "OpenCV Sample Annotator"
120-
alert.headerText = "All images annotated!"
123+
alert.headerText = "All images annotated ($totalSamples found)!"
121124
alert.contentText = "The data has been saved to: ${positivesFile.name}"
122125

123126
alert.showAndWait()

0 commit comments

Comments
 (0)