Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIMcheck does not run in headless mode #26

Open
graemeball opened this issue Feb 16, 2016 · 3 comments
Open

SIMcheck does not run in headless mode #26

graemeball opened this issue Feb 16, 2016 · 3 comments

Comments

@graemeball
Copy link
Contributor

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).

  • Raw Channel Intensity Profile -- fine
  • Raw Fourier Projection -- WindowManager.getCurrentImage() returns null headless (was a hack to get Z projection output...)
  • Raw Motion & Illumination Variation -- fine
  • Raw Modulation Contrast -- fine apart from Calibration bar
  • Reconstructed Intensity Histogram -- not fine, HistogramWindow constructor throws an exception
  • ...
  • Util_FormatConverter -- ELYRA fine; for Nikon data, need to setRoi and setPosition without display update
@ezemiron
Copy link

ezemiron commented Apr 1, 2016

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

@graemeball
Copy link
Contributor Author

@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

@ezemiron
Copy link

ezemiron commented Apr 5, 2016

@graemeball Thanks for the info, its good to know.
Unfortunately using setBatchMode("hide") brings up the same error window as before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants