Humboldt-Universität zu Berlin - Faculty of Mathematics and Natural Sciences - Strukturforschung / Elektronenmikroskopie


// This script illustrates the use of the Camera manager
Image img1, img2
number width,height
number expTime = 1

// find the current camera:
object camera = CM_GetCurrentCamera();

// find out whether this camera is inserted:
number inserted = CM_GetCameraInserted(camera)

// Retrieve the user-set settings for the "RECORD" mode camera setup:
acq_params = CM_GetCameraAcquisitionParameterSet(camera,"Imaging","Acquire","Record",0)
CM_CCD_GetSize(camera, width, height)

// Retrieve the exposure time and ask whether this should be changed:
number expTimeOld = CM_GetExposure(acq_params)
if (!getNumber("Exposure time",expTimeOld,expTime)) {
result("Image acquisition aborted\n")

// Option 1: create new image with acquisition
img1 := CM_AcquireImage(camera, acq_params)

// Option 2: in-place acquisition
img2 := RealImage(“CCD Image",4,width,height)
CM_AcquireImage(camera, acq_params,img2)