Skip to content

com.inscoper.api.SLM

Spatial Light Modulator device interface. More...

Inherits from com.inscoper.api.AbstractSystem

Public Functions

Name
synchronized void delete()
void setSLMImage(SWIGTYPE_p_unsigned_char pixels, long length)
Set the SLM image from an 8-bit buffer.
void setSLMImage(SWIGTYPE_p_unsigned_int pixels, long length)
Set the SLM image from a 32-bit buffer.
void setSLMPixelsTo(short intensity)
Set all SLM pixels to a uniform intensity.
void setSLMPixelsTo(short r, short g, short b)
Set all SLM pixels to a uniform RGB color.
void displaySLMImage()
Display the loaded image on the SLM.
long getSLMWidth()
Get the SLM display width.
long getSLMHeight()
Get the SLM display height.
long getSLMBytesPerPixel()
Get the number of bytes per pixel for the SLM.
long getSLMNumberOfComponents()
Get the number of color components for the SLM.
void setSLMExposure(double exposure_ms)
Set the SLM exposure time.
double getSLMExposure()
Get the SLM exposure time.

Protected Functions

Name
SLM(long cPtr, boolean cMemoryOwn)
void swigSetCMemOwn(boolean own)
void finalize()
long getCPtr(SLM obj)

Additional inherited members

Public Functions inherited from com.inscoper.api.AbstractSystem

Name
EDeviceType getDeviceType()
Get the type of the device.
String getLastError()
Get the last error message.
StringVector getProperties()
Get the list of available properties.
SubDeviceIdVector getModifiedProperties()
Get the list of modified properties.
String getProperty(String name)
Get the value of a property.
void setProperty(String name, String value)
Set the value of a property.
void checkProperty(String name)
Check if a property value is valid.
boolean isReadOnly(String propName)
Check if a property is read-only.
EParamType getType(String propName)
Get the data type of a property.
String getMin(String propName)
Get the minimum value of a property.
String getMax(String propName)
Get the maximum value of a property.
String getStep(String propName)
Get the step size of a property.
StringVector getValueList(String propName)
Get the list of allowed values for a property.
boolean isAccessibleInSequence(String propName)
Check if a property is accessible during sequence execution.
int getRealType()
AbstractSystem createProxy(long cPtr, boolean cMemoryOwn)

Protected Functions inherited from com.inscoper.api.AbstractSystem

Name
AbstractSystem(long cPtr, boolean cMemoryOwn)

Detailed Description

public class com.inscoper.api.SLM;

Spatial Light Modulator device interface.

Provides an abstraction for controlling a spatial light modulator, including image display, pixel manipulation, and exposure configuration.

Public Functions Documentation

function delete

public synchronized void delete()

Reimplements: com.inscoper.api.AbstractSystem.delete

function setSLMImage

public void setSLMImage(
    SWIGTYPE_p_unsigned_char pixels,
    long length
)

Set the SLM image from an 8-bit buffer.

Parameters:

  • pixels : The raw 8-bit pixel data to load
  • length : The total number of bytes in the pixel buffer

Loads the given pixel data into the spatial light modulator. The buffer must contain raw 8-bit pixel values matching the SLM dimensions.

function setSLMImage

public void setSLMImage(
    SWIGTYPE_p_unsigned_int pixels,
    long length
)

Set the SLM image from a 32-bit buffer.

Parameters:

  • pixels : The raw 32-bit pixel data to load
  • length : The total number of elements in the pixel buffer

Loads the given pixel data into the spatial light modulator. The buffer must contain raw 32-bit pixel values matching the SLM dimensions.

function setSLMPixelsTo

public void setSLMPixelsTo(
    short intensity
)

Set all SLM pixels to a uniform intensity.

Parameters:

  • intensity : The grayscale intensity value (0-255)

Fills the entire spatial light modulator display with the specified grayscale intensity value.

function setSLMPixelsTo

public void setSLMPixelsTo(
    short r,
    short g,
    short b
)

Set all SLM pixels to a uniform RGB color.

Parameters:

  • r : The red channel value (0-255)
  • g : The green channel value (0-255)
  • b : The blue channel value (0-255)

Fills the entire spatial light modulator display with the specified color defined by its red, green, and blue components.

function displaySLMImage

public void displaySLMImage()

Display the loaded image on the SLM.

Sends the previously loaded image data to the spatial light modulator for display. An image must be set before calling this method.

function getSLMWidth

public long getSLMWidth()

Get the SLM display width.

Return: The width in pixels

Retrieves the horizontal resolution of the spatial light modulator in pixels.

function getSLMHeight

public long getSLMHeight()

Get the SLM display height.

Return: The height in pixels

Retrieves the vertical resolution of the spatial light modulator in pixels.

function getSLMBytesPerPixel

public long getSLMBytesPerPixel()

Get the number of bytes per pixel for the SLM.

Return: The number of bytes per pixel

Retrieves the number of bytes used to represent a single pixel on the spatial light modulator.

function getSLMNumberOfComponents

public long getSLMNumberOfComponents()

Get the number of color components for the SLM.

Return: The number of components per pixel

Retrieves the number of color components per pixel on the spatial light modulator (e.g., 1 for grayscale, 3 for RGB).

function setSLMExposure

public void setSLMExposure(
    double exposure_ms
)

Set the SLM exposure time.

Parameters:

  • exposure_ms : The exposure time in milliseconds

Configures the display duration for each image shown on the spatial light modulator.

function getSLMExposure

public double getSLMExposure()

Get the SLM exposure time.

Return: The exposure time in milliseconds

Retrieves the current display duration for images shown on the spatial light modulator.

Protected Functions Documentation

function SLM

protected SLM(
    long cPtr,
    boolean cMemoryOwn
)

function swigSetCMemOwn

protected void swigSetCMemOwn(
    boolean own
)

Reimplements: com.inscoper.api.AbstractSystem.swigSetCMemOwn

function finalize

protected void finalize()

Reimplements: com.inscoper.api.AbstractSystem.finalize

function getCPtr

protected static long getCPtr(
    SLM obj
)

Updated on 2026-09-03 at 12:14:19 +0200