Thanks again for your excellent support and help. I've been playing a bit with the different classes in LOCI BioFormats in its Java form and was wondering what would be the fastest way to open and save files?
The situation is this: I have an LSM file and I need to extract some files and save them on a hard drive to perform some operations.
The current scheme works like this:
- Code: Select all
for (int i = 1; i <= getnImages(); i++) {
r1.setSeries(i-1);
ImageProcessor ip = r1.openProcessors(r1.getIndex(z-1, c-1, t-1))[0];
ImagePlus imp = new ImagePlus("Image " + i + ", Plane " + z
+ ", channel " + c + ", timepoint " + t, ip);
FileSaver stitchSave = new FileSaver(imp);
String filePath = getTempDir()+getFileName("Temp",i,0,0,t)+".tif";
stitchSave.saveAsTiff(filePath);
imp.close();
I'm guessing using a reader that handles the BufferedImage type might be faster but I haven't found a way to do that yet. If anyone has any clues, it would be a great help!
Best
Oli