Re: [micro-manager-general] Access live image from Matlab
Status: Beta
Brought to you by:
nicost
|
From: Kyle D. <kyl...@gm...> - 2018-06-19 10:37:54
|
Hi Vanessa, On Mon, Jun 18, 2018 at 8:52 PM, Vanessa King <van...@gm...> wrote: > Thanks for the help Kyle, > You're welcome! > > However, I am now running into issues while trying to use the save the > datastore. Following the example from the version 2.0 How Do I... page, I > am using store.save(Datastore.SaveMode.MULTIPAGE_TIFF, savePath); > But this throws the error: > > Undefined function or variable 'SaveMode'. > > Error in Focus>pushbutton4_Callback (line 302) > store.save(Datastore.SaveMode.MULTIPAGE_TIFF, savePath); > > According to the Javadocs ( https://valelab4.ucsf.edu/~MM/doc-2.0.0-beta2/mmstudio/org/micromanager/data/Datastore.html), SaveMode is a static Java enum nested inside the Datastore class, so you shouldn't need to initialize it using MATLAB's javaObject(...) method. This means that the way you're using it in MATLAB appears correct. However according to this StackOverflow question ( https://stackoverflow.com/questions/1223795/using-java-enums-or-public-static-fields-in-matlab) it looks like you may need to access the enum constant named MULTIPAGE_TIFF using the full package name. Try changing Datastore.SaveMode.MULTIPAGE_TIFF to org.micromanager.data.Datastore.SaveMode.MULTIPAGE_TIFF. Or, try adding the import org.micromanager.data.Datastore; statement back to your script if you removed it from the last iteration. Write back if you make any progress. Cheers, Kyle |