I’m putting this up here in case it is useful for somebody.
We capture Z-stacks on a Perkin Elmer Spinning Disk microscope system. I wanted to turn each stack into a single image so that we could quickly compare them. This simple macro does the job.
- We import the images straight from the *.mvd2 library using the wonderful BioFormats import tool. We open all files as composite hyperstacks.
- This Macro is then run (works on all of the open images).
- It finds the mid-Z point of the stack and sets the brightness/contrast for each channel to Auto.
- It then recolours the channels to the right colours (we capture DAPI then GFP then mCherry, but the import colours them red, green and blue, respectively).
- Then it makes a z-projection and saves the file in a directory that you specify at the start.
- It closes the projection and the z-stack.
You can then open up all of the projections, tile them and take a look at what was going on in the experiment.
setBatchMode(true); imgArray = newArray(nImages); dir1 = getDirectory("Choose Destination Directory "); for (i=0; i<nImages; i++) { selectImage(i+1); imgArray[i] = getImageID(); } for (i=0; i< imgArray.length; i++) { selectImage(imgArray[i]); id = getImageID(); win = getTitle(); getDimensions(w, h, c, nFrames, dummy); Stack.setSlice(round(nFrames/2)); run("Enhance Contrast", "saturated=0.35"); run("Next Slice [>]"); run("Enhance Contrast", "saturated=0.35"); run("Next Slice [>]"); run("Enhance Contrast", "saturated=0.35"); Stack.setChannel(1) run("Blue"); Stack.setChannel(2) run("Green"); Stack.setChannel(3) run("Red"); run("Z Project...", "projection=[Max Intensity]"); saveAs("TIFF", dir1+win); close(); selectImage(id); close(); }
Sorry for lack of commenting.
—
Tips from the blog is a series and gets its name from a track from Black Sunday by Cypress Hill.