Save folder and metadata via script

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Save folder and metadata via script

nranthony
Hi all,
I wonder if anybody can help with saving multiple files to the same
directory.

I'm trying to take multiple movies in 6 different wells, and it would be
cool to save all the multipage Tiffs from each well in a single folder with
incremented names.  The plan is to visit each well, take a movie, and then
repeat.  A timelapse of timelapses essentially.  When using the create
createMultipageTIFFDatastore (or createRewritableRAMDatastore and saving
afterwards) it tells me that the folder exists.  Is it possible to create a
datastore folder and then reuse it?

I was hoping to use the function below in my script and pass the different
datastores, stage positions etc and repeat.

boolean takeMovie(
                Datastore store,
                String filename,
                int nrFrames,
                int stagePos) {

        summaryMeta =
mm.data().getSummaryMetadataBuilder().prefix(filename).build();
        store.deleteAllImages();
        store.setSummaryMetadata(summaryMeta);
       
        exposureMs = mmc.getExposure();
        // Create a display to show images as they are acquired.
        mm.displays().createDisplay(store);
       
        // Set up a Coords.CoordsBuilder for applying coordinates to each image.
        builder =
mm.data().getCoordsBuilder().z(0).channel(0).time(0).stagePosition(stagePos);
        int curFrame = 0;
        mmc.startSequenceAcquisition(nrFrames, 0, true);
        while (mmc.getRemainingImageCount() > 0 ||
mmc.isSequenceRunning(mmc.getCameraDevice())) {
           if (mmc.getRemainingImageCount() > 0) {
              tagged = mmc.popNextTaggedImage();
              // Convert to an Image at the desired timepoint.
              image = mm.data().convertTaggedImage(tagged,
                 builder.time(curFrame).build(), null);
              store.putImage(image);
              curFrame++;
           }
           else {
              // Wait for another image to arrive.
              mmc.sleep(Math.min(.5 * exposureMs, 20));
           }
        }
        mmc.stopSequenceAcquisition();
        return true;
}


With the above function I'm also having issue with the timestamp metadata.
I see "ElapsedTime-ms": 5.7369207527281E11 in one frame, 5.7369207532781E11
in the next, etc.  There is a difference between the values that corresponds
to the frame to frame time, but the units don't make sense.

Thanks in advance for your time.

Neil




--
Sent from: http://micro-manager.3463995.n2.nabble.com/

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general