That looks like a winner!  Thank you.

—-
Kenneth Sloan
(von meinem iPhone13 gesendet)


On Fri, Feb 14, 2025 at 16:16 Gabriel Landini <[email protected]> wrote:

> Hi Kenneth,
>
> What about setting 'attributes' to an image which is currently open to
> transmit information?
>
> imp.setProperty​(java.lang.String key, java.lang.Object value)
>
> then you can use a macro call to retrieve the value corresponding to the
> key, from the same image while it remains open:
>
> selectWindow("MyImage");
> X = call("ImpProps.getProperty", "imageX");
>
> where "imageX" is the key and X is the set/retrieved value
> See also here:
>
> https://imagej.net/ij/plugins/imp-props.html
>
> Hope it helps.
>
> Gabriel
>
> On 14/02/2025 20:45, Kenneth R Sloan wrote:
> > CAUTION: This email originated from outside the organisation. Do not
> click links or open attachments unless you recognise the sender and know
> the content is safe.
> >
> >
> > I write Java plugins.  Most are self contained, and write results to
> files,
> > but I have a few PluginFilters which process images and produce a very
> tiny
> > amount of text or numerical output.
> >
> > I’m looking for the cleanest way to make such output visible at the
> > macro-language level.
> >
> > As a concrete example, I just produced a PlugInFilter which assumes a
> > particular class of image and “orients” it.  It computes a rectangular
> > region with WIDTH, LENGTH, and ANGLE.  As its last step, it rotates the
> > original image so that the rectangular region is aligned with the x- and
> > y-axes.  It reports length, width, and angle in the log.
> >
> > The customer wants to use the angle to rotate other images.  He may
> > eventually want length and width as well.  He is content to copy and
> paste
> > from the log, but I’d like to do better.
> >
> > How can I best communicate these results, so the customer can use them
> in a
> > macro?
> >
> > (Length, width, angle) look suspiciously like results from other
> commands,
> > and I’d be ok with that, but… More generally, is there a mechanism to
> make
> > visible a name-value pair which can be interrogated in the macro
> language?
> >
> > —-
> > Kenneth Sloan
> > (von meinem iPhone13 gesendet)
> >
> > --
> > ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

Reply via email to