private Content createContent() { final ImagePlus[] imps = file != null ? ContentCreator.getImages(file) : ContentCreator .getImages(image); if (imps == null || imps.length == 0) return null; // check image type final int imaget = imps[0].getType(); if (imaget != ImagePlus.GRAY8 && imaget != ImagePlus.COLOR_256 && imaget != ImagePlus.COLOR_RGB) { // TODO correct message if (IJ.showMessageWithCancel("Convert...", "8-bit or RGB image required. Convert?")) { for (final ImagePlus ip : imps) ContentCreator.convert(ip); } else { return null; } } final Content c = ContentCreator.createContent(name, imps, type, resamplingFactor, timepoint, color, threshold, channels); return c; }