Hi I am trying to extract information from the getImageInfo() command.
How can I obtain, for instance the number of channels in an image. I am using the Deltavision Opener plugin, which opens all the images in a multicolour dataset as a single stack but the channel number is within the image info. If i getImageInfo() the channel number are displayed on the line "NumofWavelengthes: 3". How can i get this number '3' to put into the rest of the macro as a variable? I feel i'm missing something obvious, sorry! Thanks |
Hi Gareth,
you can try getInfo("NumofWavelengthes"); If it is a number, do ParseInt or ParseFloat on the result. Michael ________________________________________________________________ On Sep 17, 2013, at 14:55, Gareth Howell wrote: > Hi I am trying to extract information from the getImageInfo() command. > How can I obtain, for instance the number of channels in an image. I am > using the Deltavision Opener plugin, which opens all the images in a > multicolour dataset as a single stack but the channel number is within the > image info. If i getImageInfo() the channel number are displayed on the line > "NumofWavelengthes: 3". How can i get this number '3' to put into the rest > of the macro as a variable? I feel i'm missing something obvious, sorry! > > Thanks > > > > > > -- > View this message in context: http://imagej.1557.x6.nabble.com/Extracting-information-with-getImageInfo-tp5004822.html > Sent from the ImageJ mailing list archive at Nabble.com. > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Gareth Howell
Hi Gareth,
> Hi I am trying to extract information from the getImageInfo() command. > How can I obtain, for instance the number of channels in an image. I would suggest using Bio-Formats and scripting it from your macro: http://openmicroscopy.org/site/support/bio-formats4/users/imagej/#macros-and-plugins First of all, Bio-Formats might address your "opens all the images in a multicolour dataset as a single stack" problem. (And if not, we would be interested in a non-working sample so we can fix it.) Secondly, if you still need to access metadata, Bio-Formats was built with that in mind. See this article for details: http://openmicroscopy.org/site/support/bio-formats4/about/#bio-formats-metadata-processing Bio-Formats comes built in with the Fiji distribution of ImageJ ( http://fiji.sc/). Regards, Curtis On Tue, Sep 17, 2013 at 7:55 AM, Gareth Howell <[hidden email]>wrote: > Hi I am trying to extract information from the getImageInfo() command. > How can I obtain, for instance the number of channels in an image. I am > using the Deltavision Opener plugin, which opens all the images in a > multicolour dataset as a single stack but the channel number is within the > image info. If i getImageInfo() the channel number are displayed on the > line > "NumofWavelengthes: 3". How can i get this number '3' to put into the rest > of the macro as a variable? I feel i'm missing something obvious, sorry! > > Thanks > > > > > > -- > View this message in context: > http://imagej.1557.x6.nabble.com/Extracting-information-with-getImageInfo-tp5004822.html > Sent from the ImageJ mailing list archive at 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 |