Login  Register

Re: Arrays and string wildcards

Posted by JAMES, gregory (SANDWELL AND WEST BIRMINGHAM HOSPITALS NHS TRUST) on Jan 19, 2021; 3:12pm
URL: http://imagej.273.s1.nabble.com/Arrays-and-string-wildcards-tp5024394p5024395.html

Hi Alex,

I think the following macro command will do this:

Array.deleteValue(array, value);

...where value = ".jpg"

Greg.

__________________________________________
Gregory James
Clinical Scientist (Nuclear Medicine)
Department of Physics and Nuclear Medicine
City Hospital
Dudley Road
Birmingham
B18 7QH

0121 507 4043

________________________________
From: Aleksandr Mironov <[hidden email]>
Sent: 19 January 2021 15:04
To: [hidden email] <[hidden email]>
Subject: Arrays and string wildcards

Dear listers,

I am writing a macro with which I want to correct certain files in a directory and convert them to different formats. Some of files are not readable by ImageJ or Bioformats/Fiji and need to be excluded from opening. Others may need different operations depending on file type.
If I get the array of filenames from this directory can I delete array elements using not exact string but a wildcard (like "*.jpg")?

Or is there any other way to make conditions based on file type?

Thank you in advance!

Best regards,
Alex Mironov



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



This message originated from outside of NHSmail. Please do not click links or open attachments unless you recognise the sender and know the content is safe.



********************************************************************************************************************

This message may contain confidential information. If you are not the intended recipient please inform the
sender that you have received the message in error before deleting it.
Please do not disclose, copy or distribute information in this e-mail or take any action in relation to its contents. To do so is strictly prohibited and may be unlawful. Thank you for your co-operation.

NHSmail is the secure email and directory service available for all NHS staff in England and Scotland. NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and other accredited email services.

For more information and to find out how you can switch, https://portal.nhs.net/help/joiningnhsmail


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