[Issue/Suggestion] Hide version number from the Trainable Weka Segmentation window title




The Trainable Weka Segmentation window title contains the version number of the plugin, which breaks scripts containing selectWindow("Trainable Weka Segmentation v3.2.21") whenever it is updated (I couldn’t find a simple wildcard to ignore the version number in the command, perhaps it is possible, but I’m thinking it would just fix the symptom). Wouldn’t it be best to make the title version agnostic and just report the version number somewhere in the plugin UI, like below the bottom left logo?


here is a workaround that worked for me

run("Blobs (25K)");
run("Trainable Weka Segmentation");
// wait for the plugin to load
wekaversion = getTitle;


Thanks a lot, that’ll do for me too!

However, I’m not sure what are the benefits of showing the version number in the title and not somewhere else. I don’t know what is the standard with ImageJ plugins, but it seems counter-intuitive that a plugin update can break the scripts without this kind of workarounds (while other windows seem to have a fixed name).


I use it this way to write the wekaversion string into the results tables/files that my macro produces, so that I always know which version of the plugin was used to obtain the results. Very helpful in my opinion and I would opt for keeping the version number in the window title.


Is there an equivalent of getVersion for calling the version number of a given plugin? Since you specifically want to get and export the version number in your scripts, in my opinion it would make more sense to use the above approach, while a basic script shouldn’t need a workaround to get a window in focus across updates. I may very well be wrong, again I’m not familiar with ImageJ scripting conventions, but since other plugins and default windows seem to have a fixed name, it seems unatural to me that Weka would require a different approach.

It’s very minor though, of course, and your solution above already helped me fixing my script so it doesn’t break with updates anymore. Sorry if it turns out that my suggestion is irrelevant.