embl-cba / cats

Other
1 stars 2 forks source link

Applying a classifier to an Image 2 #2

Closed davodogster closed 5 years ago

davodogster commented 5 years ago

“Exporting results to: K:\Cropped_MS\CATS\monday-project\Classification\Output” - didn’t do anything at all. It only works if I want to view result (and it only shows a DUP-Objects Image). Export to TIFF stack or Imaris does nothing.

“Computing probability images using 12 threads” – also appears to be doing nothing. (Cores not busy for 10mins).

tischi commented 5 years ago

Using the UI this works for me. Could you give me some more details on your workflow?

image
davodogster commented 5 years ago

This is in relation to using the "Apply Classifier"window/option, not the main CATS window.

tischi commented 5 years ago

Could please let me know which buttons you clicked in which sequence?

manerotoni commented 5 years ago

I think I have a similar issue. When doing "Apply classifier on Multiple images" I get the proper result When doing "Apply classifier" then it fails

`(Fiji Is Just) ImageJ 2.0.0-rc-71/1.52n; Java 1.8.0_172 [64-bit]; Windows 10 10.0; 1381MB of 24434MB (5%)

java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.NumberFormatException: For input string: "" at net.imagej.legacy.LegacyService.runLegacyCompatibleCommand(LegacyService.java:309) at net.imagej.legacy.DefaultLegacyHooks.interceptRunPlugIn(DefaultLegacyHooks.java:163) at ij.IJ.runPlugIn(IJ.java) at ij.Executer.runCommand(Executer.java:137) at ij.Executer.run(Executer.java:66) at java.lang.Thread.run(Thread.java:748) Caused by: java.util.concurrent.ExecutionException: java.lang.NumberFormatException: For input string: "" at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:192) at net.imagej.legacy.LegacyService.runLegacyCompatibleCommand(LegacyService.java:305) ... 5 more Caused by: java.lang.NumberFormatException: For input string: "" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Integer.parseInt(Integer.java:592) at java.lang.Integer.parseInt(Integer.java:615) at de.embl.cba.cats.utils.StringUtils.delimitedStringToIntegerArray(StringUtils.java:11) at de.embl.cba.cats.ui.ApplyClassifierCommand.getInterval(ApplyClassifierCommand.java:333) at de.embl.cba.cats.ui.ApplyClassifierCommand.applyClassifier(ApplyClassifierCommand.java:311) at de.embl.cba.cats.ui.ApplyClassifierCommand.run(ApplyClassifierCommand.java:149) at org.scijava.command.CommandModule.run(CommandModule.java:199) at org.scijava.module.ModuleRunner.run(ModuleRunner.java:168) at org.scijava.module.ModuleRunner.call(ModuleRunner.java:127) at org.scijava.module.ModuleRunner.call(ModuleRunner.java:66) at org.scijava.thread.DefaultThreadService$3.call(DefaultThreadService.java:238) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ... 1 more `

manerotoni commented 5 years ago

These are my settings. Is the classification interval mandatory?

image

manerotoni commented 5 years ago

If I now add the classification interval 1, 448,1,450, 1,25, 1, 1 (should this be base 0 or base 1) the classification starts but ends with a different error:

(Fiji Is Just) ImageJ 2.0.0-rc-71/1.52n; Java 1.8.0_172 [64-bit]; Windows 10 10.0; 1377MB of 24434MB (5%)

java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Stack pixel array null at net.imagej.legacy.LegacyService.runLegacyCompatibleCommand(LegacyService.java:309) at net.imagej.legacy.DefaultLegacyHooks.interceptRunPlugIn(DefaultLegacyHooks.java:163) at ij.IJ.runPlugIn(IJ.java) at ij.Executer.runCommand(Executer.java:137) at ij.Executer.run(Executer.java:66) at java.lang.Thread.run(Thread.java:748) Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Stack pixel array null at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:192) at net.imagej.legacy.LegacyService.runLegacyCompatibleCommand(LegacyService.java:305) ... 5 more Caused by: java.lang.IllegalArgumentException: Stack pixel array null at ij.ImagePlus.setStack(ImagePlus.java:690) at ij.ImagePlus.(ImagePlus.java:154) at de.embl.cba.cats.results.ResultExport.getBinnedClassImageMemoryEfficient(ResultExport.java:205) at de.embl.cba.cats.results.ResultExport.getBinnedAndProximityFilteredClassImage(ResultExport.java:214) at de.embl.cba.cats.results.ResultExport.saveClassAsTiff(ResultExport.java:233) at de.embl.cba.cats.results.ResultExport.exportClasses(ResultExport.java:461) at de.embl.cba.cats.results.ResultExport.exportResults(ResultExport.java:337) at de.embl.cba.cats.results.ResultImageRAM.exportResults(ResultImageRAM.java:60) at de.embl.cba.cats.ui.ApplyClassifierCommand.saveAsFiles(ApplyClassifierCommand.java:276) at de.embl.cba.cats.ui.ApplyClassifierCommand.saveOutputImages(ApplyClassifierCommand.java:219) at de.embl.cba.cats.ui.ApplyClassifierCommand.manageProbabilitiesOutput(ApplyClassifierCommand.java:205) at de.embl.cba.cats.ui.ApplyClassifierCommand.run(ApplyClassifierCommand.java:151) at org.scijava.command.CommandModule.run(CommandModule.java:199) at org.scijava.module.ModuleRunner.run(ModuleRunner.java:168) at org.scijava.module.ModuleRunner.call(ModuleRunner.java:127) at org.scijava.module.ModuleRunner.call(ModuleRunner.java:66) at org.scijava.thread.DefaultThreadService$3.call(DefaultThreadService.java:238) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ... 1 more

tischi commented 5 years ago
  1. You can now leave the classification interval empty.
  2. It is zero based.
  3. There was a bug.... should work now.
tischi commented 5 years ago

I also made now a simpler version of the Apply Classifier command and moved the other functionality to an "Advanced" version.

image
tischi commented 5 years ago

Could you guys please confirm that this issue can be closed?

davodogster commented 5 years ago

Solved thank you