IJ.error("FileSaver", "An error occured writing the file.\n \n" + msg);
}
/** Returns a string containing information about the specified image. */
public String getDescriptionString() {
Calibration cal = imp.getCalibration();
StringBuffer sb = new StringBuffer(100);
sb.append("ImageJ="+ImageJ.VERSION+"\n");
if (fi.nImages>1 && fi.fileType!=FileInfo.RGB48)
sb.append("images="+fi.nImages+"\n");
int channels = imp.getNChannels();
if (channels>1)
sb.append("channels="+channels+"\n");
int slices = imp.getNSlices();
if (slices>1)
sb.append("slices="+slices+"\n");
int frames = imp.getNFrames();
if (frames>1)
sb.append("frames="+frames+"\n");
if (fi.unit!=null)
sb.append("unit="+fi.unit+"\n");
if (fi.valueUnit!=null && fi.calibrationFunction!=Calibration.CUSTOM) {
sb.append("cf="+fi.calibrationFunction+"\n");
if (fi.coefficients!=null) {
for (int i=0; i<fi.coefficients.length; i++)
sb.append("c"+i+"="+fi.coefficients[i]+"\n");
}
sb.append("vunit="+fi.valueUnit+"\n");
if (cal.zeroClip()) sb.append("zeroclip=true\n");
}
// get stack z-spacing and fps
if (fi.nImages>1) {
if (fi.pixelDepth!=0.0 && fi.pixelDepth!=1.0)
sb.append("spacing="+fi.pixelDepth+"\n");
if (cal.fps!=0.0) {
if ((int)cal.fps==cal.fps)
sb.append("fps="+(int)cal.fps+"\n");
else
sb.append("fps="+cal.fps+"\n");
}
sb.append("loop="+(cal.loop?"true":"false")+"\n");
if (cal.frameInterval!=0.0) {
if ((int)cal.frameInterval==cal.frameInterval)
sb.append("finterval="+(int)cal.frameInterval+"\n");
else
sb.append("finterval="+cal.frameInterval+"\n");
}
if (!cal.getTimeUnit().equals("sec"))
sb.append("tunit="+cal.getTimeUnit()+"\n");
}
// get min and max display values
ImageProcessor ip = imp.getProcessor();
double min = ip.getMin();