use of ij.io.FileInfo in project GDSC-SMLM by aherbert.
the class PSFCreator method createNote.
private String createNote() {
StringBuilder sb = new StringBuilder();
sb.append(new SimpleDateFormat("'Created:' d-MMM-yyyy HH:mm").format(new Date())).append("\n");
FileInfo info = imp.getOriginalFileInfo();
if (info != null) {
sb.append("File: ").append(info.fileName).append("\nDir: ").append(info.directory);
} else {
sb.append("Title: ").append(imp.getTitle());
}
sb.append("\n");
return sb.toString();
}
use of ij.io.FileInfo in project GDSC-SMLM by aherbert.
the class IJImageSource method initialise.
private boolean initialise(ImagePlus imp) {
imageArray = null;
imageStack = null;
if (imp == null)
return false;
ImageStack s = imp.getImageStack();
if (s.isVirtual()) {
// We must use the image stack to get the image data for virtual images
imageStack = s;
} else {
// We can access the image array directly
imageArray = s.getImageArray();
}
width = imp.getWidth();
height = imp.getHeight();
// Store the number of valid frames
if (singleFrame > 0)
frames = 1 + this.extraFrames;
else
frames = imp.getStackSize();
slice = 0;
FileInfo info = imp.getOriginalFileInfo();
if (info != null)
path = info.directory + info.fileName;
return true;
}
Aggregations