Open graemeball opened 8 years ago
On the following macro if setBatchMode(false)
then the Modulation Contrast Map works.
setBatchMode(true);
open("/PATH/TO/RAW.dv");
open("/PATH/TO/SIR.dv");
run("Modulation Contrast Map", "calculate_mcnr_from_raw_data=RAW.dv camera_bit_depth=16 or,_specify_mcnr_stack=None reconstructed_data_stack=SIR.dv");
If set to true however, the following error window appears:
"Did not find at least 2 images (raw and recon)"
If the images are already opened then the following macro works with setBatchMode()
in true or false:
setBatchMode(true);
run("Modulation Contrast Map", "calculate_mcnr_from_raw_data=RAW.dv camera_bit_depth=16 or,_specify_mcnr_stack=None reconstructed_data_stack=SIR.dv");
Is this related to the headless issue? I'm currently having to run setBatchMode(false)
in a script requiring the Mod contrast map for it to work, but the flashing images are getting annoying.
Thanks E
@ezemiron the plugin's run() method makes heavy use of the WindowManager, including building a list of all the open images to choose from -- I'm not totally sure I can fix everything so it runs headless as an ImageJ1 plugin. In the meantime, you could try setBatchMode("hide")
instead of setBatchMode(true)
(please let me know if it works for you!)
Cheers,
Graeme
@graemeball Thanks for the info, its good to know.
Unfortunately using setBatchMode("hide")
brings up the same error window as before.
Most SIMcheck plugins do not run in headless mode due to unintended / unavoidable GUI calls, largely due to a reliance on ImageJ1 functionality. TODO: find & remedy each problematic GUI call, perhaps using ImageJ2 features (future SIMcheck releases will depend on these).