This week's book giveaway is in the Reactive Progamming forum. We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line! See this thread for details.
Hello there, I'd just like to say first of all how happy I was to find this site!
I am working on a macro to run with ImageJ for processing 4-dimensional images.
It should open the image sequence, average the z-slices for each timepoint, and then perform other processing functions on the series. Everything works, except I cannot manage to extract information on the number of z-slices in the series.
I tried getDimensions() and getHeight() etc and they all misread the stack.
So I figure I have two alternatives:
one, I could find a way to access the handy little text file that is included in the directory with each image sequence... but this I do not know how to access!
Or, I could extract the information on the z-slices from the image names, because they are named in the following way:
Using lastIndexOf and substring commands I was able to assign the zed number to a variable. But it is of course a string, and I do not know of a way to convert it to an integer type in ImageJ Java. I need to input the number of zeds into the Run grouped z-projector command.
I hope there is some kind soul out there who will save me from any more fruitless hours of scouring the web for a hint as to how to do this...
Thanks in advance
What is the file format you are opening? If it is one of the big formats (MetaMorph .nd, LSM, etc...) then chances are LOCI's BioFormats can help you open the data and read the form dimensional info. See the LOCI for ImageJ site for info, including a link to an example for getting all the Meta Data out.
If I had asked people what they wanted, they would have said faster horses - Ford. Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop