int channels = imp.getNChannels();
int slices = imp.getNSlices();
int frames = imp.getNFrames();
int bitDepth = imp.getBitDepth();
int size = slices*frames;
HyperStackReducer reducer = new HyperStackReducer(imp);
for (int c=1; c<=channels; c++) {
ImageStack stack2 = new ImageStack(width, height, size); // create empty stack
stack2.setPixels(imp.getProcessor().getPixels(), 1); // can't create ImagePlus will null 1st image
ImagePlus imp2 = new ImagePlus("C"+c+"-"+imp.getTitle(), stack2);
stack2.setPixels(null, 1);
imp.setPosition(c, 1, 1);
imp2.setDimensions(1, slices, frames);
imp2.setCalibration(imp.getCalibration());
reducer.reduce(imp2);
if (imp.isComposite() && ((CompositeImage)imp).getMode()==CompositeImage.GRAYSCALE)
IJ.run(imp2, "Grays", "");
if (imp2.getNDimensions()>3)
imp2.setOpenAsHyperStack(true);
imp2.show();