Re: [micro-manager-general] Access live image from Matlab
Status: Beta
Brought to you by:
nicost
|
From: Kyle D. <kyl...@gm...> - 2018-06-15 06:45:10
|
Hi Vanessa,
On Wed, Jun 6, 2018 at 10:31 PM, Vanessa King <van...@ma...>
wrote:
>
>
>
> %Get the datastore of current open window
>
> Datastore store = mm.displays().getCurrentWindow().getDatastore();
>
>
>
I'm surprised that this line even runs at all in MATLAB because it's
actually Java :) You may need to create a new instance of your Datastore
using MATLAB's javaObject() method. For example, here is a snippet from our
lab's own MATLAB code of how I create a Datastore from a DataManager in
Micro-Manager 2.0beta:
DataManager = javaObject('org.micromanager.data.internal.DefaultDataManager'
);
Datastore = DataManager.loadData(dataDirectory, OPEN_AS_VIRTUAL);
Alternatively, if this doesn't work, try the following (I have not tested
it). Note that StartMMStudio.m is located inside the Micro-Manager
installation directory and should be your primary interface between MATLAB
and Micro-Manager:
gui = StartMMStudio('C:\Program Files\Micro-Manager-2.0beta\');
mmc = gui.getCore;
acq = gui.getAcquisitionEngine;
datastore = gui.displays().getCurrentWindow().getDatastore();
Cheers,
Kyle
|