Hi everyone,
Our slide-scanner has an option to save files as .ims (Imaris) format. This allows us to open the files in ImageJ at different resolution levels. I'm trying to write a macro that will open the files at "Resolution Level 2" rather than Level 1 (which is the highest) and just can't seem to get this to work. Has anyone done this already and is willing to share the code? It would be similar for those opening Leica .lif files where you can select the Series number. Thanks! Kind regards, Jacqui Jacqueline Ross Biomedical Imaging Microscopist Biomedical Imaging Research Unit (BIRU) School of Medical Sciences Faculty of Medical & Health Sciences The University of Auckland Private Bag 92019 Auckland 1142, NEW ZEALAND Telephone: Ext 87438; DDI: +64 9 923 7438 Website: http://www.auckland.ac.nz/biru -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Jacqueline,
You can find some examples of Bio-Formats macros at https://docs.openmicroscopy.org/bio-formats/5.8.2/users/imagej/#macros-and-plugins To select the other resolutions you will need to set the Series, using Ext.setSeries(seriesNum) as in https://github.com/openmicroscopy/bioformats/blob/develop/components/bio-formats-plugins/utils/macros/basicMetadata.txt With Thanks, David Gault On 19 Sep 2018, at 01:59, Jacqueline Ross <[hidden email]<mailto:[hidden email]>> wrote: Hi everyone, Our slide-scanner has an option to save files as .ims (Imaris) format. This allows us to open the files in ImageJ at different resolution levels. I'm trying to write a macro that will open the files at "Resolution Level 2" rather than Level 1 (which is the highest) and just can't seem to get this to work. Has anyone done this already and is willing to share the code? It would be similar for those opening Leica .lif files where you can select the Series number. Thanks! Kind regards, Jacqui Jacqueline Ross Biomedical Imaging Microscopist Biomedical Imaging Research Unit (BIRU) School of Medical Sciences Faculty of Medical & Health Sciences The University of Auckland Private Bag 92019 Auckland 1142, NEW ZEALAND Telephone: Ext 87438; DDI: +64 9 923 7438 Website: http://www.auckland.ac.nz/biru -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html The University of Dundee is a registered Scottish Charity, No: SC015096 -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi David,
Thanks very much for your reply. I had looked at the first link you sent previously but couldn't see how to integrate the Series option. I still haven't succeeded though I have tried Curtis's macro to get the Series number. I want number 2 but it's not working currently. I'll have to persevere but if you were able to send me a simple example, it would be great. All I need to be able to do is open the file at resolution level 2 as level 1 is too large to process. Kind regards, Jacqui -----Original Message----- From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of David Gault (Staff) Sent: Wednesday, 19 September 2018 9:32 p.m. To: [hidden email] Subject: Re: Using the Bioformats importer to open .ims files in a macro Hi Jacqueline, You can find some examples of Bio-Formats macros at https://docs.openmicroscopy.org/bio-formats/5.8.2/users/imagej/#macros-and-plugins To select the other resolutions you will need to set the Series, using Ext.setSeries(seriesNum) as in https://github.com/openmicroscopy/bioformats/blob/develop/components/bio-formats-plugins/utils/macros/basicMetadata.txt With Thanks, David Gault On 19 Sep 2018, at 01:59, Jacqueline Ross <[hidden email]<mailto:[hidden email]>> wrote: Hi everyone, Our slide-scanner has an option to save files as .ims (Imaris) format. This allows us to open the files in ImageJ at different resolution levels. I'm trying to write a macro that will open the files at "Resolution Level 2" rather than Level 1 (which is the highest) and just can't seem to get this to work. Has anyone done this already and is willing to share the code? It would be similar for those opening Leica .lif files where you can select the Series number. Thanks! Kind regards, Jacqui Jacqueline Ross Biomedical Imaging Microscopist Biomedical Imaging Research Unit (BIRU) School of Medical Sciences Faculty of Medical & Health Sciences The University of Auckland Private Bag 92019 Auckland 1142, NEW ZEALAND Telephone: Ext 87438; DDI: +64 9 923 7438 Website: http://www.auckland.ac.nz/biru -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html The University of Dundee is a registered Scottish Charity, No: SC015096 -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Jacqueline, this code opens the second series in your file (tested at
least in ".lif" file). Obviously you can change the value of "series_number" to select other images in the list. Best, Rocco --------------------------------------------------- /pathToFile = File.openDialog("Choose a file"); print(pathToFile); series_number=2; run("Bio-Formats Importer", "open=["+pathToFile+"] color_mode=Default rois_import=[ROI manager] view=Hyperstack stack_order=XYCZT series_"+series_number+"");/ --------------------------------------------------- ----- Senior Microscopist Crick Advanced Light Microscopy facility (CALM) The Francis Crick Institute 1 Midland Road, NW1 1AT, London (UK) -- Sent from: http://imagej.1557.x6.nabble.com/ -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Senior Microscopist
Crick Advanced Light Microscopy facility (CALM) The Francis Crick Institute 1 Midland Road, NW1 1AT, London (UK) https://roccodant.github.io/ |
Hi Rocco,
Thank you so much for that code. It looks like just what I need. I am on leave at present but will try it out as soon as I return. Cheers, Jacqui ________________________________________ From: ImageJ Interest Group [[hidden email]] on behalf of Rocco D'Antuono [[hidden email]] Sent: 22 September 2018 04:40 To: [hidden email] Subject: Re: Using the Bioformats importer to open .ims files in a macro Hi Jacqueline, this code opens the second series in your file (tested at least in ".lif" file). Obviously you can change the value of "series_number" to select other images in the list. Best, Rocco --------------------------------------------------- /pathToFile = File.openDialog("Choose a file"); print(pathToFile); series_number=2; run("Bio-Formats Importer", "open=["+pathToFile+"] color_mode=Default rois_import=[ROI manager] view=Hyperstack stack_order=XYCZT series_"+series_number+"");/ --------------------------------------------------- ----- Senior Microscopist Crick Advanced Light Microscopy facility (CALM) The Francis Crick Institute 1 Midland Road, NW1 1AT, London (UK) -- Sent from: http://imagej.1557.x6.nabble.com/ -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |