CenterForDigitalHumanities / SpectralRTI_Toolkit

Process Spectral RTI Images in ImageJ
GNU General Public License v3.0
1 stars 0 forks source link

Processing without ImageJ Commands #14

Open thehabes opened 6 years ago

thehabes commented 6 years ago

The macro uses setBatchMode(true) to process images in the background. At present, Java needs the window to be an existing visible object to access it which means oftentimes the image must show, if only for a second, to run a command on it. This seems to have unnecessary RAM and CPU cost. Does Java have something equivalent to setBatchMode(true)?

thanneken commented 6 years ago

This would be tolerable from a UI perspective... it might even be nice if you weren't planning to do anything else. The bigger problem is the performance impact. Right now the plugin is slower than the macro.

thehabes commented 6 years ago

https://stackoverflow.com/questions/2752174/how-can-i-do-batch-image-processing-with-imagej-in-java-or-clojure

http://forum.imagej.net/t/converting-macro-into-plugin-type-code-to-hide-intermediate-results/4960

thehabes commented 6 years ago

I have found a way to keep images hidden during ACRTI and ACRaking processes. I am seeing places for solution inside of this API: https://imagej.nih.gov/ij/developer/api/index.html

thehabes commented 6 years ago

Images are now processed in the background. Some ImageJ commands will flash an image window, but it is immediately taken into the background.