Quantcast

Work with generic SLM from python?

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

Work with generic SLM from python?

Piter
Hi everybody,

I am trying to control generic SLM of Micromanager from python.

But I cannot figure out in what form to feed an image to SLM. If I try
to feed it as numpy array I get the following error. See below:

Can anyone give me a hint?

In bean shell this command look like: mmc.setSLMImage(slms[0],pix1.get(j));

j=0 and  pix1 is an ArrayList()

Thanks.

Petro.


# import new Python 3 style division into Python 2
from __future__ import division
import pylab as pl
import sys
sys.path.append( "C:\Program Files\Micro-Manager-1.4")
import MMCorePy
#load configuration
mmc = MMCorePy.CMMCore()
mmc.loadSystemConfiguration("C:\\Program
Files\\Micro-Manager-1.4\\webcam.cfg")
img = pl.imread("D:\\LCOS_Ctrl\\data\\2horizontal.bmp")
slms = mmc.getLoadedDevicesOfType(mmc.getDeviceType(mmc.getSLMDevice()))
mmc.setSLMImage(slms[0],img);
#

   File "C:\Program Files\Micro-Manager-1.4\MMCorePy.py", line 6030, in
setSLMImage
     return _MMCorePy.CMMCore_setSLMImage(self, *args)
NotImplementedError: Wrong number of arguments for overloaded function
'CMMCore_setSLMImage'.
   Possible C/C++ prototypes are:
     setSLMImage(CMMCore *,char const *,unsigned char *)
     setSLMImage(CMMCore *,char const *,imgRGB32)

 >


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