Greetings Michael,

at least the latter is in fact documented:

"*Table Functions*
These functions, added in ImageJ 1.52a, work with tables. They operate on the current (frontmost) table or, with most of the functions, an *optional title argument* can be provided (must be last argument)."

Regards

Herbie

:::::::::::::::::::::::::::::::::::::::::::::
Am 03.09.24 um 15:40 schrieb Cammer, Michael:
I am looking for  a comprehensive documentation of all macro options.  Help 
would be appreciated pointing me to this.

To write macros, I have relied heavily on the documentation of macro functions 
at
https://wsr.imagej.net/developer/macro/functions.html .
However, I have noticed that some important features are missing.  For instance, the email below 
discusses a "constrain" option in  run("Size..." which I don't see documented.  
Also, testing from the GUI shows that
run("Scale...", "x=0.33 y=[] width=165 height=[] interpolation=Bilinear average 
create")
works fine without a "constrain" option.  This is great added functionality, 
but I wouldn't have thought to try either of these options on my own without this email 
chain or documentation.

Similarly, I had been selecting tables for output before writing to them, but I 
saw in a post here about something else, that the name of the output table may 
be included in the command which makes things much more efficient.  Such as:

Table.setColumn("results", arrayOne, "one");
Table.setColumn("results", arrayTwo, "two");

instead of

selectWindow("one");
Table.setColumn("results", arrayOne);
selectWindow("two");
Table.setColumn("results", arrayTwo);

However, I do not see this documented.

Is there a more comprehensive web page which has all the features of macro 
commands documented?

Best regards-


Michael Cammer, Sr Research Scientist, DART Microscopy Laboratory
NYU Langone Health, 540 First Avenue, office MSB 4 111-120 (enter near Tisch, 
cubicle in far back corner)
main lab Smilow C-17, New York, NY  10016
Office: 646-501-0567 Cell (DO NOT TEXT): 914-309-3270  
[email protected]
http://nyulmc.org/micros  http://microscopynotes.com/





-----Original Message-----
From: Fred Damen <[email protected]>
Sent: Monday, September 2, 2024 2:21 PM
To: [email protected]
Subject: Re: Size... and a question

[EXTERNAL]

Greetings Kees,

Actually that is the point of the issue. The GUI, and I assume the plugin when 
called from a macro, has the feature, when 'constrain' is on, that you can 
specify either width OR height and the plugin will calculate the other 
dimension such that the aspect ratio is maintained. With the GUI, which field 
you type into indicates that the other dimension is to be calculated, and so it 
does. If I specify both in the macro invocation, and the 'constrain' option is 
specified (as per 'record'), how does the plugin know which one to set and 
which one to calculate??? If the macro needs to do this calculation then why 
the 'constrain' macro option?

Also, to be pedantic, if this invocation is in error, then the plugin should 
not quietly use values I did not specify over the ones I did specify.

Thanks,

Fred


On Mon, September 2, 2024 6:41 am, Straatman, Kees (Dr.) wrote:
Dear Fred,

You missed the "width" option: run("Size...", " width=256 height=256
depth=1 constrain average interpolation=None");

Best wishes
Kees

-----Original Message-----
From: Fred Damen <[email protected]>
Sent: 31 August 2024 05:36
To: [email protected]
Subject: Size... and a question

***CAUTION:*** This email was sent from an EXTERNAL source. Think
before clicking links or opening attachments.

Greetings,

If you run
run("Size...", "height=256 depth=1 constrain average
interpolation=None"); from a macro the image will resize to what was
previously resized using the GUI Image/Adjust/Size... and not what was
specified in the macro command.  I assume this would be the parameters
if the height is to be set and the aspect ratio of the image being resize is 
maintained.

newImage("Untitled", "32-bit noise", 128, 128, 1); Image/Adjust/Size...
Height->1024 newImage("Untitled", "32-bit noise", 128, 128, 1);
run("Size...", "height=256 depth=1 constrain average
interpolation=None");

Bonus question:
Is there an macro equivalent of setting ImagePlus.changes to false? Or
a way of closing an image without the save/dont save popup?

Thanks,

Fred

--
ImageJ mailing list:
https://urldefense.com/v3/__http://imagej.nih.gov/ij/list.html__;!!MXf
aZl3l!fqdW-c7bCGKr6H511MAvVhR_eoJbQ0Pwha8aZDHvcSEMBLrzobsilx0m8-pE6f3Y
_79IZzHf4ObMy9-MsHE$

--
ImageJ mailing list:
https://urldefense.com/v3/__http://imagej.nih.gov/ij/list.html__;!!MXf
aZl3l!fqdW-c7bCGKr6H511MAvVhR_eoJbQ0Pwha8aZDHvcSEMBLrzobsilx0m8-pE6f3Y
_79IZzHf4ObMy9-MsHE$


--
ImageJ mailing list: 
https://urldefense.com/v3/__http://imagej.nih.gov/ij/list.html__;!!MXfaZl3l!fqdW-c7bCGKr6H511MAvVhR_eoJbQ0Pwha8aZDHvcSEMBLrzobsilx0m8-pE6f3Y_79IZzHf4ObMy9-MsHE$

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


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

Reply via email to