public static Content createContent(final String name,
final ImagePlus[] images, final int type, final int resf, int tp,
final Color3f color, final int thresh, final boolean[] channels)
{
final TreeMap<Integer, ContentInstant> instants =
new TreeMap<Integer, ContentInstant>();
final boolean timelapse = images.length > 1;
final boolean shouldSwap = SWAP_TIMELAPSE_DATA && timelapse;
for (final ImagePlus imp : images) {
final ContentInstant content = new ContentInstant(name);
content.image = imp;
content.color = color;
content.threshold = thresh;
content.channels = channels;
content.resamplingF = resf;
content.timepoint = tp;
content
.showCoordinateSystem(UniverseSettings.showLocalCoordinateSystemsByDefault);
content.displayAs(type);
content.compile();
if (shouldSwap) {
content.clearOriginalData();
content.swapDisplayedData();
}
instants.put(tp++, content);
}
return new Content(name, instants, shouldSwap);
}