if (count<2) {
IJ.error("There must be at least two open images.");
return;
}
Calibration cal2 = image[0].getCalibration();
for (int i=0; i<(count-1); i++) {
if (image[i].getType()!=image[i+1].getType()) {
IJ.error("All open images must be the same type.");
return;
}
if (image[i].getWidth()!=image[i+1].getWidth()
|| image[i].getHeight()!=image[i+1].getHeight()) {
IJ.error("All open images must be the same size.");
return;
}
Calibration cal = image[i].getCalibration();
if (!image[i].getCalibration().equals(cal2))
cal2 = null;
}
int width = image[0].getWidth();