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?

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



# 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()
img = pl.imread("D:\\LCOS_Ctrl\\data\\2horizontal.bmp")
slms = mmc.getLoadedDevicesOfType(mmc.getDeviceType(mmc.getSLMDevice()))

   File "C:\Program Files\Micro-Manager-1.4\", line 6030, in
     return _MMCorePy.CMMCore_setSLMImage(self, *args)
NotImplementedError: Wrong number of arguments for overloaded function
   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,!
micro-manager-general mailing list
[hidden email]