No method 'setROI' for class 'mmcorej.CMMCore' (from MATLAB)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

No method 'setROI' for class 'mmcorej.CMMCore' (from MATLAB)

SebJR
Hi Everyone,

I've been working with micro-manager controlled via MATLAB for while. Until now I've managed by myself to do what I needed. But currently I am having troubles setting the ROI of my camera and I don't understand the nature of the problem. I've searched and can't find any reference to this problem out there. in case someone has seen anything like this, or may have some ideas, any help and advice would be much welcome.

The problem is kind of funny: for some reason 'setROI' is not found as an available method for the CMMCore class, whereas getROI works just fine. Does that makes sense?

Here is an example of what I do from MATLAB:
>> import mmcorej.*;
>> mmc = CMMCore;
>> mmc.loadSystemConfiguration('MMConfig_Basic_20170608.cfg');
>> mmc.setProperty('Core','Camera','Andor');
>> mmc.setProperty('Andor','Binning','1');
>> mmc.setProperty('Andor','Gain','27');
>> mmc.setProperty('Andor','CCDTemperatureSetPoint','-90');
>> mmc.getROI
ans =
java.awt.Rectangle[x=0,y=0,width=512,height=512]
>> mmc.setROI(mmc.getROI)
No method 'setROI' with matching signature found for class 'mmcorej.CMMCore'.


I am using MATLAB 2013a and Micromanager 1.4. A sending attached the config file in case you find it usefulMMConfig_Basic_20170608.cfg

Thank you in advance,
-Sebastian.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: No method 'setROI' for class 'mmcorej.CMMCore' (from MATLAB)

Nico Stuurman-2

On 6/10/2017 3:40 AM, SebJR wrte:

> Hi Everyone,
>
> I've been working with micro-manager controlled via MATLAB for while.
> The problem is kind of funny: for some reason 'setROI' is not found as an
> available method for the CMMCore class, whereas getROI works just fine. Does
> that makes sense?
>
> Here is an example of what I do from MATLAB:
> />> import mmcorej.*;
>>> mmc = CMMCore;
>>> mmc.loadSystemConfiguration('MMConfig_Basic_20170608.cfg');
>>> mmc.setProperty('Core','Camera','Andor');
>>> mmc.setProperty('Andor','Binning','1');
>>> mmc.setProperty('Andor','Gain','27');
>>> mmc.setProperty('Andor','CCDTemperatureSetPoint','-90');
>>> mmc.getROI
> ans =
> java.awt.Rectangle[x=0,y=0,width=512,height=512]
>>> mmc.setROI(mmc.getROI)
> No method 'setROI' with matching signature found for class
> 'mmcorej.CMMCore'./

That is correct.  See the documentation:
https://valelab4.ucsf.edu/~MM/doc/mmcorej/mmcorej/CMMCore.html#setROI(int,%20int,%20int,%20int)

Try:
mmc.setROI(0, 0, 512, 512);


Best,

Nico

------------------------------------------------------------------------------
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: No method 'setROI' for class 'mmcorej.CMMCore' (from MATLAB)

SebJR
Hi Nico,

Indeed I misunderstood the problem, I don't know what I was thinking.  

Now I get what signature there meant and it all makes sense. 

Thank you for taking the time to reply! 

Best,

On Sat, Jun 10, 2017 at 9:10 PM, Nico Stuurman <[hidden email]> wrote:

On 6/10/2017 3:40 AM, SebJR wrte:
Hi Everyone,

I've been working with micro-manager controlled via MATLAB for while.
The problem is kind of funny: for some reason 'setROI' is not found as an
available method for the CMMCore class, whereas getROI works just fine. Does
that makes sense?

Here is an example of what I do from MATLAB:
/>> import mmcorej.*;
mmc = CMMCore;
mmc.loadSystemConfiguration('MMConfig_Basic_20170608.cfg');
mmc.setProperty('Core','Camera','Andor');
mmc.setProperty('Andor','Binning','1');
mmc.setProperty('Andor','Gain','27');
mmc.setProperty('Andor','CCDTemperatureSetPoint','-90');
mmc.getROI
ans =
java.awt.Rectangle[x=0,y=0,width=512,height=512]
mmc.setROI(mmc.getROI)
No method 'setROI' with matching signature found for class
'mmcorej.CMMCore'./

That is correct.  See the documentation: https://valelab4.ucsf.edu/~MM/doc/mmcorej/mmcorej/CMMCore.html#setROI(int,%20int,%20int,%20int)

Try:
mmc.setROI(0, 0, 512, 512);


Best,

Nico

------------------------------------------------------------------------------
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



--
Sebastian J.R.

+44-7762083338  (UK)
+56-971700742    (Chile)
Skype: seba.jaramillo

------------------------------------------------------------------------------
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
Loading...