|
14 | 14 | import io.scif.services.DatasetIOService; |
15 | 15 |
|
16 | 16 | import net.imagej.DatasetService; |
17 | | -import net.imagej.ImageJ; |
18 | 17 |
|
19 | 18 | import net.imglib2.type.numeric.RealType; |
20 | 19 |
|
21 | 20 | import org.scijava.command.Command; |
22 | 21 | import org.scijava.plugin.Parameter; |
23 | | -import org.scijava.run.RunService; |
24 | 22 | import org.scijava.ui.DialogPrompt.MessageType; |
25 | 23 | import org.scijava.ui.DialogPrompt.OptionType; |
26 | 24 | import org.scijava.ui.DialogPrompt; |
@@ -86,9 +84,6 @@ public class Plugin<T extends RealType<T>> implements Command |
86 | 84 | /* The script title */ |
87 | 85 | private final String title; |
88 | 86 |
|
89 | | - /* The script title */ |
90 | | - private final String version; |
91 | | - |
92 | 87 | /* Scanned extensions */ |
93 | 88 | private ArrayList<String> scannedFileExtensions; |
94 | 89 |
|
@@ -128,7 +123,6 @@ public Plugin() |
128 | 123 | { |
129 | 124 | currentProcessThread = null; |
130 | 125 | title = "Mageek"; |
131 | | - version = "1.0.0"; |
132 | 126 | batchMode = true; |
133 | 127 | analysedFolderName = "ANALYSED"; |
134 | 128 | scannedFileExtensions = new ArrayList<>(); |
@@ -182,7 +176,7 @@ public void run() |
182 | 176 | ); |
183 | 177 | gui.setSourceDirectory(sourceFolder.toString()); |
184 | 178 |
|
185 | | - scannedFiles = FileHelper.getFiles(sourceFolder, true); |
| 179 | + scannedFiles = FileHelper.getFiles(sourceFolder, true, analysedFolderName); |
186 | 180 | gui.setFileList(scannedFiles); |
187 | 181 | scannedFileExtensions = FileHelper.getFileExtensions(scannedFiles); |
188 | 182 | gui.setFileExtensionList(scannedFileExtensions); |
@@ -340,7 +334,7 @@ public void windowDeactivated(WindowEvent e) |
340 | 334 | } |
341 | 335 | }); |
342 | 336 |
|
343 | | - gui.setStatus(String.format("Welcome to %s v%s", title, version)); |
| 337 | + gui.setStatus(String.format("Welcome to %s v%s", title, PackageHelper.getVersion() )); |
344 | 338 | gui.setSourceDirectory("Select a source directory ..."); |
345 | 339 |
|
346 | 340 | gui.setAvailableColors(MetaColor.All); |
@@ -507,39 +501,6 @@ private boolean createOutputDirectory() |
507 | 501 | } |
508 | 502 | return success; |
509 | 503 | } |
510 | | - |
511 | | - /** |
512 | | - * Update the statistics in status bar |
513 | | - */ |
514 | | - void displayStatisticsInStatusBar() |
515 | | - { |
516 | | - String innerMessage; |
517 | | - |
518 | | - MessageType messageType; |
519 | | - |
520 | | - if (this.sourceFolder == null) |
521 | | - { |
522 | | - innerMessage = "Nothing to process ..."; |
523 | | - messageType = MessageType.INFORMATION_MESSAGE; |
524 | | - } |
525 | | - else |
526 | | - { |
527 | | - innerMessage = String.format( |
528 | | - "Process done, %d file(s) processed (%d ignored)", |
529 | | - processedFiles.size(), |
530 | | - ignoredFiles.size() |
531 | | - ); |
532 | | - |
533 | | - messageType = MessageType.INFORMATION_MESSAGE; |
534 | | - } |
535 | | - |
536 | | - String message = String.format( |
537 | | - "%s --- Hasta la vista, baby. ^^", |
538 | | - innerMessage |
539 | | - ); |
540 | | - |
541 | | - gui.setStatus(message); |
542 | | - } |
543 | 504 |
|
544 | 505 | private ImagePlus[] open(File file) throws IOException, FormatException |
545 | 506 | { |
|
0 commit comments