Re: [micro-manager-general] Matlab Configuration - CMMCore Object
Status: Beta
Brought to you by:
nicost
|
From: Kiana Go <gok...@be...> - 2018-06-28 21:05:19
|
Hello Kyle,
Thanks so much Kyle for the help! I've been stuck on these problems for
days but I've finally moved a step forward with your help! :) In addition,
can you help me figure out if I need to import any other libraries or
anything at all with my code below? Also, if you see anything wrong or
peculiar with how I utilize the functions, please let me know. I am new to
Matlab and Micro-Manager and am still trying to find my way around it. My
goal is to use Matlab's interface with Micro-Manager to control the stage
and microscope. I am aiming to automate the process of moving the stage and
taking image acquisitions with the code below.
*// Install java core and gui object*
* cd '/Applications/Micro-Manager-1.4'*
* import org.micromanager.MMStudio;*
* gui = MMStudio(false);*
* mmc = gui.getCore;*
*
mmc.loadSystemConfiguration('/Applications/Micro-Manager1.4/MMConfig_automation.cfg')*
*// Load Devices - Stages and Camera*
* mmc.loadDevice("XYStage", "Prior", "ProScanIII");*
* throw (CMMError)*
* mmc.loadDevice("ZStage", "Prior", "ProScanIII");*
* throw (CMMError)*
* mmc.loadDevice("Camera", "AndorSDK3", "Andor");*
* throw (CMMError)*
*//Load Serial Ports if needed*
* mmc.loadDevice("Port", "SerialManager", "COM1");*
*// Initialize Devices*
* mmc.initializeAllDevices();*
*//for loops -> until reaches max position of stage (ie. the edge)*
* for c = z_start : increment value : z_max*
* for a = x_start : increment value : x_max*
* for b = y_start : increment value : y_max*
* //Moves stage ; a/b/c = coordinates*
* mmc.SetXYPosition("XYStage",a, b);*
* throw (CMMError)*
* mmc.SetPosition("ZStage",c);*
* throw (CMMError)*
* //makes sure everything has stopped moving*
* mmc.waitForSystem();*
* throw (CMMError)*
* //takes image acquisition*
* mmc.snapImage();*
* throw (CMMError)*
* //gets image acquired from snapImage*
* img=mmc.getImage();*
* throw (CMMError)*
* //save image with coordinates as name*
* a/b/c = img*
* //add image to Album *
* gui.addToAlbum(a/b/c);*
* throw (org.micromanager.utils.MMScriptException)*
* end*
* end *
*end*
*gui.showMessage('Acquisitions completed ')*
Thanks so much for the help again Kyle!!!
Much Appreciated,
Kiana Go
On Wed, Jun 27, 2018 at 11:55 PM, Kyle Douglass <kyl...@gm...>
wrote:
> Hi Kiana Go,
>
> On Wed, Jun 27, 2018 at 8:03 PM, Kiana Go <gok...@be...> wrote:
>
>> Hi Kyle,
>>
>> Thank you so much! That makes so much sense! In addition, I cannot
>> find StartMMStudio.m. Is this for Windows?
>>
>
> Whoops. Yes I think that this script is only included with the Windows
> nightly builds. You may need to download and install MM on a Windows
> computer and copy the script from the installation directory to your Mac.
> It's not necessary to use this script, but it does reduce some of the work
> you need to do when using Micro-Manager in MATLAB.
>
>
>> In addition, I am following Matlab and the Micro-Manager GUI
>> <https://micro-manager.org/wiki/Matlab_and_the_Micro-Manager_GUI> guide
>> and stumbled upon the error below. However, after gui = MMStudio(false); ,
>> Micro-Manager pops up. Do I need gui.show; ? Can I just skip it?
>>
>> >> cd '/Applications/Micro-Manager1.4'
>> >> import org.micromanager.MMStudio;
>> >> gui = MMStudio(false);
>> >> gui.show;
>> Undefined function 'show' for input arguments of type
>> 'org.micromanager.MMStudio'.
>>
>
> I haven't used Micro-Manager in MATLAB for a while now, but I don't recall
> using this method. I would say that if everything else works without it,
> then by all means just skip the call to gui.show :)
>
> Kyle
>
>
> ------------------------------------------------------------
> ------------------
> 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
> mic...@li...
> https://lists.sourceforge.net/lists/listinfo/micro-manager-general
>
>
--
Class of 2021
|