How to Crop Stacks in ImageJ without first Duplicating

1.4k views Asked by At

I am using imageJ for automated microscopy of live cells.

The microscope centers the stage on a desired cell, takes a Z-stack, and passes this stack to imageJ.

I want to then use Analyze Particles to output the area of the cell in each Z-slice. (this works well)

To do this I use a macro which performs the following:

  1. A region is selected.
  2. The selected region stack is duplicated
  3. the stack is autothresholded.
  4. Analyze particles is run for the stack (with objects on border excluded)
  5. the maximal area result is found
  6. the corresponding z-slice is printed in a file for further work.

This all works well except the duplicate step is far too slow for the pipeline. I need to avoid the duplication step somehow.

Is there any way to crop the stack without first duplicating? (currently this loses information from all but one slice)

Or, can I apply the threshold and analyze particles only to the selected region?

1

There are 1 answers

0
quantixed On

Cropping a stack can be done in a macro using run("Crop"); following an appropriate selection.