Supress MorpholibJs log window output

Hey fans of MorphlibJ, hi @dlegland ,

I’m just building some plugin around MorphoLibJs Morphological Segmentation plugin. However, internally, it sends Text to the ImageJ Log window.

Is it possible to block this output from appearing?

Thanks for your support!

Cheers,
Robert

Addendum: I’m basically wondering you ever thought of a scenario, where users might want to turn this flag off:

Also CCing @iarganda because he wrote that code apparently :slight_smile:

Thanks for your help!

1 Like

Just adding a link to the code I’m working on so that you can see what I see:

1 Like

Hi,
yes, I suppose this should be possible! Just making the variable “verbose” public (and maybe false by default) should do the job. I let @iarganda tell, as he wrote the code.

David

2 Likes

Sure, or we can make “verbose” a parameter of as many methods we need :wink:

1 Like

In my context, it would also be great if it’s static!

Thanks so much :slightly_smiling_face:

Better not :blush:


What about using “setVerbose”:

I’m calling this stuff from the static methods (see my code above). Thus, it would be nice if the setVerbose would be static as well :wink:

1 Like

To maintain back-compatibility, I believe it makes more sense to create static methods with the “verbose” option as parameter. This is what I’ve just pushed:

2 Likes

Hi @iarganda ,

wow, thanks for the efforts! I was actually thinking that it might be easier to make that flag static.

Cheers,
Robert