Re: ImageCalculator Result
Posted by Gabriel Landini on Oct 10, 2009; 10:17pm
URL: http://imagej.273.s1.nabble.com/ImageCalculator-Result-tp3690847p3690855.html
On Saturday 10 October 2009 22:30:11 Robert Dougherty wrote:
> This is why the instructions for my plugins sometime include "please
> refrain from clicking on anything until it is finished." I like your
> "Result of" suggestion. What happens if that name is not unique?
Hi Bob,
Right, so this is a problem in plugins too...
If images are duplicated they have a "-1", "-2", but one can indeed create an
image with the same name of an existing one by repeatedly applying the same
calculation operation. I noted that a <2>, <3> is shown in the title bar if
one renames an image with an already existing name, yet the window list makes
no differences and so it is impossible to know which one is which within a
macro or plugin.
newImage("a", "8-bit Black", 128, 128, 1);
newImage("b", "8-bit Black", 128, 128, 1);
imageCalculator("Add create", "a","b");
imageCalculator("Add create", "a","b");
So I do not know how to resolve it in this case. ImageID is different for each
image, but lots of commands (including the ImageCalculator) do not accept IDs,
only names.
This is a bit like the Monty Python sketch where everybody is called Bruce.
:-)
Cheers
Gabriel