use of uk.ac.sussex.gdsc.smlm.ij.plugins.TiffSeriesViewer.TiffSeriesVirtualStack in project GDSC-SMLM by aherbert.
the class PeakResultTableModelFrame method doSourceShowImage.
private void doSourceShowImage() {
final PeakResultTableModel model = getModel();
if (model == null) {
return;
}
final ImageSource source = model.getSource();
if (source == null) {
return;
}
// Check if already open
final ImagePlus imp = WindowManager.getImage(source.getName());
if (imp != null) {
imp.getWindow().toFront();
return;
}
// Check if an ImageJ image source
if (source instanceof IJImageSource) {
final IJImageSource imageSource = (IJImageSource) source;
final String path = imageSource.getPath();
if (path != null && new File(path).exists()) {
IJ.showStatus("Opening image ...");
IJ.open(path);
IJ.showStatus("");
} else {
IJ.log("Cannot find the image source: " + path);
}
return;
}
// Open a SeriesImageSource.
if (source instanceof SeriesImageSource) {
final SeriesImageSource imageSource = (SeriesImageSource) source;
// No memory buffer
imageSource.setBufferLimit(0);
imageSource.setReadHint(ReadHint.NONSEQUENTIAL);
if (!source.open()) {
IJ.log("Cannot open the series image source");
return;
}
new TiffSeriesVirtualStack(imageSource).show();
}
}
Aggregations