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

Results of a scijava Commands don't show up in batchmode #271

Closed
maarzt opened this issue Mar 2, 2022 · 2 comments
Closed

Results of a scijava Commands don't show up in batchmode #271

maarzt opened this issue Mar 2, 2022 · 2 comments

Comments

@maarzt
Copy link
Member

maarzt commented Mar 2, 2022

This problem was noticed when running Labkit from an imagej macro. (see juglab/labkit-ui#85)

This macro works fine:

CurrentImage = getTitle();
run("Segment Image With Labkit", "input="+CurrentImage+" segmenter_file=D:/Classifier.classifier use_gpu=1");

But when executed in batch mode the results don't show up any more:

CurrentImage = getTitle();
setBatchMode(true);
run("Segment Image With Labkit", "input="+CurrentImage+" segmenter_file=D:/Classifier.classifier use_gpu=1");
setBatchMode("exit & display");

I think this should be solve by rewriting IJ1 <-> IJ2 synchronization (#231).

@maarzt
Copy link
Member Author

maarzt commented Mar 2, 2022

Batch mode changes the behaviour of IJ1 such that when ImagePlus.show() is called, the ImagePlus is not shown but added to an Interpreter.addBatchModeImage(ImagePlus) is executed instead. This also works fine when an scijava command is executed but the fulling line calls Interpreter.removeBatchModeImage(ImagePlus) and thereby deletes the image again.

LegacyUtils.deleteImagePlus(newImp);

@maarzt
Copy link
Member Author

maarzt commented Mar 3, 2022

This is a duplicated issue see #215.

@maarzt maarzt closed this as completed Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant