OpticalConfiguration

_AddOptConf, _ApplyObjectivesXYOffset, _BackupOptConf, _DeviceManagerv2, _ExploreOptConf, _JoystickManager, _ListOfPoints, _ManageDevices, _OptConfSelStimulDevice, _RestoreOptConf, _ShutterSelStimulDevice, AddOptConf, BackupOptConf, CopyUserData, DeleteLightPathLastUsed, DeleteOptConf, DeleteOptConfs, DeleteUserData, EnableSelectOCFromFilter, GetCurrentLightPathName, GetLightPathCount, GetLightPathIndexName, GetOptConfCount, GetOptConfName, GetSelectedOptConf, RestoreOptConf, RestoreOptConfEx, SelectLightPath, SelectOptConf, SelectSetupAndHWConfiguration, SelectSetupAndHWConfigurationNoDialog, SetOpticalConfChanged, SetSaveCameraSetting, SetSaveExposure, SetSaveExposureSetting, ShowDeviceControlDocker, ShowDeviceManagerPad, Stg_ConnectDevice, Stg_DisconnectDevice, Stg_IsStatusStored, Stg_StatusGet, Stg_StatusSet, Stg_StatusStoreAs, SwitchObjectiveAlert, UnselectOptConf

AddOptConf

Interactive command to this function: Calibration > New Optical Configuration

Description 

 AddOptConf(
   char *CurrOptConf,
   char *Objective,
   int  NosepieceSetting,
   int  CameraSetting,
   int  MicroscopeSetting,
   int  ShutterType,
   int  ShutterType2
);

This function creates and adds optical configuration to the system. An interactive equivalent of this function is the _AddOptConf function.

Parameters

char *CurrOptConf

Name of the optical configuration to be added to NIS-Elements system optical configurations.

char *Objective

Name of the objective.

int NosepieceSetting

Use current nosepiece position.

TRUE

Use current objective and nosepiece position

FALSE

Do not use nosepiece position

int CameraSetting

Use current camera setting.

TRUE

Use current camera setting

FALSE

Do not use camera setting

int MicroscopeSetting

Use current microscope setting.

TRUE

Use current microscope setting

FALSE

Do not use microscope setting

int ShutterType

Type of active shutter.

-1

Do not use active shutter

0

EPI

1

DIA

2

Camera

3

Unknown

int ShutterType2

Type of second shutter.

See Also 
_AddOptConf, DeleteOptConf

BackupOptConf

Description 

 BackupOptConf(
   char *Filename
);

This function saves settings of the current optical configurations to an XML file.

Parameters

char *Filename

Full path to the XML file. E.g. C:\backup\backup1.xml

See Also 
RestoreOptConf

DeleteOptConf

Description 

 DeleteOptConf(
    CurrOptConf
);

This function deletes the specified optical configuration.

Parameters

CurrOptConf

Name of optical configuration that will be deleted.

Note

Objective of the same name will not be deleted.

See Also 
AddOptConf, DeleteObjective

DeleteOptConfs

Description 

 DeleteOptConfs();

This function deletes all optical configurations.

EnableSelectOCFromFilter

Description 

 EnableSelectOCFromFilter(
   int  Enabled
);

Changes status of the Select corresponding optical configuration when filter changed options within the Edit > Options window.

Parameters

int Enabled

0

Disabled.

1

Enabled.

GetOptConfCount

Description 

int GetOptConfCount();

This function returns a number of defined optical configurations.

Return Values

int

A number of defined optical configurations.

GetOptConfName

Description 

 GetOptConfName(
   int  Index,
   char *CurrOptConf,
   int  ObjectiveNameMaxLength
);

This function returns the pointer to the name of an optical configuration determined by the Index parameter (position of the configuration in the configurations list). It represents one line of a virtual ordered list of the defined optical configurations.

Parameters

int Index

Index number (zero-based).

char *CurrOptConf

The name of the optical configuration according to the Index parameter.

int ObjectiveNameMaxLength

Maximal optical configuration name length. If the name has more characters than defined, it is shortened automatically.

GetSelectedOptConf

Description 

 GetSelectedOptConf(
   char *OptConfObj,
   char *OptConfCam,
   char *OptConfMic,
   int  ObjectiveNameMaxLength
);

This function returns names of active optical configurations that have an objective, camera, or a microscope settings assigned to them.

Parameters

char *OptConfObj

Returns the name of the active optical configuration which has an objective is assigned to.

char *OptConfCam

Returns the name of the active optical configuration which has a camera settings assigned to.

char *OptConfMic

Returns the name of the active optical configuration which has microscope settings assigned to.

int ObjectiveNameMaxLength

Maximal optical configuration name length. If the name has more characters than defined, it is shortened automatically.

RestoreOptConf

Description 

 RestoreOptConf(
   char *Filename
);

This function loads optical configuration settings from an .xml file.

Parameters

char *Filename

Full path to the XML file. E.g. C:\backup\backup1.xml

See Also 
BackupOptConf

RestoreOptConfEx

Description 

 RestoreOptConfEx(
   char *Filename,
   int  Options
);

This function loads optical configuration settings from an .xml file.

Parameters

char *Filename

Full path to the XML file. E.g. C:\backup\backup1.xml

int Options

This parameter specifies how to deal with items which already exist in the software.

0

Opens a dialog window and asks the user what to do.

1

Imports all items from the file. If an item already exists in the software it will be overwritten.

2

Imports only items which do not already exist in the application.

3

Imports all items from the file. If an item already exists in the software, an index number will be appended to its name.

4

Deletes all items in the software and imports all items from the file.

See Also 
BackupOptConf

SelectOptConf

Description 

 SelectOptConf(
   char  OptConf
);

This function selects the specified optical configuration and makes it active.

Parameters

char OptConf

Name of the optical configuration.

See Also 
_ExploreOptConf, _ExploreObjectives

SetOpticalConfChanged

Description 

 SetOpticalConfChanged(
   int  OpticalConf
);

This function corresponds to the Edit > General Options > Appearance > When optical configuration settings changed combo box. Sets the behaviour after changing the settings of the Optical Configuration.

Parameters

int OpticalConf

Action after changing the settings

0

Highlight Optical Configuration button

1

Deselect Optical Configuration

2

Save all changes

See Also 
_GeneralOptions

SetSaveCameraSetting

Description 

 SetSaveCameraSetting(
   int  SaveSetting
);

This function corresponds to the Edit > General Options > General > Save all camera settings to optical configuration automatically check box. Sets a behaviour after changing camera settings.

Parameters

int SaveSetting

Save all camera settings to optical configuration automatically

See Also 
_GeneralOptions

SetSaveExposure

Description 

 SetSaveExposure(
   int  SaveExposure
);

Sets status of the Save brightness to optical configuration automatically option. See Edit > Options .

Parameters

int SaveExposure

0

Enabled

1

Disabled

See Also 
_GeneralOptions

SetSaveExposureSetting

Description 

 SetSaveExposureSetting(
   int  SaveExposure
);

Sets status of the Save brightness to optical configuration automatically option. See Edit > Options .

Parameters

int SaveExposure

0

Enabled

1

Disabled

UnselectOptConf

Description 

 UnselectOptConf(
   char  CurrOptConf
);

This function deactivates an active optical configuration.

Parameters

char CurrOptConf

The name of an active optical configuration to be unselected (deactivated).

Note

This function is called when you right click an active optical configuration button and select the Unselect command from the context menu.

_AddOptConf

This function runs the Calibration > New Optical Configuration command.

Description 

 _AddOptConf();

This function opens the New Optical Configuration dialog window.

See Also 
_ExploreOptConf

_BackupOptConf

Description 

 _BackupOptConf();

This function displays the Export Optical Configurations dialog window. The current set of optical configurations can be saved via this window.

_ExploreOptConf

This function runs the Calibration > Optical Configurations command.

Description 

 _ExploreOptConf();

The function displays the Optical Configurations dialog window.

_OptConfSelStimulDevice

Description 

 _OptConfSelStimulDevice();

This function opens a dialog window which selects an optical configuration used by the stimulation device.

_RestoreOptConf

Description 

 _RestoreOptConf();

This function displays the Import Optical Configurations dialog window. Optical configurations previously saved can be loaded via this window.

_ShutterSelStimulDevice

Description 

 _ShutterSelStimulDevice();

Opens the Use Shutter as Stimulation Device window enabling to select which shutters are used as stimulation devices.

Stg_ConnectDevice

Description 

 Stg_ConnectDevice(
   char *PhysicalDeviceName
);

Connects a physical device specified by its full name. The device must exist in the device manager device list and must be currently disconnected.

Parameters

char *PhysicalDeviceName

Full name of physical device to be dis/connected.

Stg_DisconnectDevice

Description 

 Stg_DisconnectDevice(
   char *PhysicalDeviceName
);

Disconnects the physical device specified by its full name. The device must exist in the device manager device list and must be currently connected.

Parameters

char *PhysicalDeviceName

Full name of physical device to be dis/connected.

Stg_IsStatusStored

Description 

 Stg_IsStatusStored(
   char *PhysicalDeviceKey,
   char *LogicalDeviceType,
   char *LogicalDeviceKey,
   char *StatusName
);

Finds out whether the specified status is stored or not.

Parameters

char *PhysicalDeviceKey

Name of the physical device as shown in the Device Manager.

char *LogicalDeviceType

String determining the type of the logical device.

char *LogicalDeviceKey

Name of the logical device as shown in the Device Manager.

char *StatusName

String used for naming, ascertaining, setting the device status.

For an example use case, please see: Stg_StatusStoreAs.

Stg_StatusGet

Description 

 Stg_StatusGet(
   char *PhysicalDeviceKey,
   char *LogicalDeviceType,
   char *LogicalDeviceKey,
   char  Buffer
);

This function can be used to find out which device status was set the last. The status is changed after you call the Stg_StatusSet function. Stg_StatusGet will return "".

Parameters

char *PhysicalDeviceKey

Name of the physical device as shown in the Device Manager.

char *LogicalDeviceType

String determining the type of the logical device.

char *LogicalDeviceKey

Name of the logical device as shown in the Device Manager.

char Buffer

Allocated space for the status name.

For an example use case, please see: Stg_StatusStoreAs.

Stg_StatusSet

Description 

 Stg_StatusSet(
   char *PhysicalDeviceKey,
   char *LogicalDeviceType,
   char *LogicalDeviceKey,
   char *StatusName,
   int  StatusUseCache
);

Loads the status and sets it to the device.

Parameters

char *PhysicalDeviceKey

Name of the physical device as shown in the Device Manager.

char *LogicalDeviceType

String determining the type of the logical device.

char *LogicalDeviceKey

Name of the logical device as shown in the Device Manager.

char *StatusName

String used for naming, ascertaining, setting the device status.

int StatusUseCache

0

The device is set using all settings.

1

The device is set using only changed setting values.

For an example use case, please see: Stg_StatusStoreAs.

Stg_StatusStoreAs

Description 

 Stg_StatusStoreAs(
   char *PhysicalDeviceKey,
   char *LogicalDeviceType,
   char *LogicalDeviceKey,
   char *StatusName
);

Stores the device status into C:\ProgramData\Laboratory Imaging\Platform\DeviceStatusStorage.bin.

Parameters

char *PhysicalDeviceKey

Name of the physical device as shown in the Device Manager.

char *LogicalDeviceType

String determining the type of the logical device.

char *LogicalDeviceKey

Name of the logical device as shown in the Device Manager.

char *StatusName

String used for naming, ascertaining, setting the device status.

Example use case showing dynamic changing of the XY stage settings:

char buffer[1000];
int buffer_size;
// Nikon / Prior stage versions:
char *physDevKey = "Nikon Ti"; //"ProScan III";
char *logDevType = "XY";       //"XY";
char *logDevKey = "XYDrive";   //"XY Drive";
// You can store status for the given (physDevKey, logDevType, logDevKey) using Stg_StatusStoreAs(physDevKey, logDevType, logDevKey,"SLOW");
if(1 == Stg_IsStatusStored(physDevKey, logDevType, logDevKey,"SLOW"))
{
   // 1 means cache will be used if available -> only differences are set and the function executes faster:
   Stg_StatusSet(physDevKey, logDevType, logDevKey,"SLOW",1); 
   StgMoveXY(1000.00000,1000.00000,1);
}
if(1 == Stg_IsStatusStored(physDevKey, logDevType, logDevKey,"FAST"))
{
   // You can find out which device status was set last by using:
   Stg_StatusGet(physDevKey, logDevType, logDevKey, buffer);
   // Please note that if the status is changed after you call Stg_StatusSet, StgStatusGet will return ""
   Int_CreateWindow(1, "Current status", WP_TOPLEFT, 0, 0, 800, 400, buffer, 1, 1, 0, 1, 1, 1, "Courier,,10");
   if(strcpy(buffer,"FAST")) // not equal
   {
      Stg_StatusSet(physDevKey, logDevType, logDevKey,"FAST",1); // use cache again
   }
   StgMoveXY(-1000.00000,-1000.00000,1);
}    
SwitchObjectiveAlert

Description 

 SwitchObjectiveAlert();

If turned on (default state), a message box with a warning text is displayed when switching between oil and water/air objectives.

_ApplyObjectivesXYOffset

This function runs the Devices > Apply Objectives XY Offset command.

Description 

 _ApplyObjectivesXYOffset();

Applies XY offsets between objectives based on the values set in the Objective XY Offset dialog window.

_DeviceManagerv2

This function runs the Devices > Device Manager command.

Description 

 _DeviceManagerv2(
   int  OverviewMode
);

Opens the Device Manager dialog window.

Parameters

int OverviewMode

Turns on/off the system overview.

0

Overview mode OFF.

1

Overview mode ON.

_JoystickManager

Description 

 _JoystickManager();

Opens the Device Manager dialog window displaying all connected joysticks and foot pedals together with their plugins shown in the combo box. Move the joystick/pedal to highlight it in the list.

This function is supported by the Filter Particle Analysis application.

_ListOfPoints

This function runs the Devices > List of Points command.

Description 

 _ListOfPoints();

This function displays the list of points for Multipoint Acquisition.

_ManageDevices

Description 

TRUE _ManageDevices();

Displays a dialog box allowing the user to manage the installed devices.

Return Values

TRUE (1)

Dialog was shown

FALSE (0)

Dialog could not be created

See Also 
Stg_IsLightPresent, Stg_IsFilterPresent, Stg_IsShutterPresent, Stg_IsNosepiecePresent

CopyUserData

Description 

 CopyUserData(
   char *UserName,
   char *UserNameDestination
);

Copies the user settings such as OCs, other user settings and visibility of modality buttons.

Parameters

char *UserName

User name.

char *UserNameDestination

User name to which the settings are copied.

DeleteLightPathLastUsed

Description 

 DeleteLightPathLastUsed(
   char *Name
);

Deletes the last used light path.

Parameters

char *Name

Name of the light path.

DeleteUserData

Description 

 DeleteUserData(
   char *UserName
);

Deletes all device manager data for the specified user.

Parameters

char *UserName

User name.

GetLightPathCount

Description 

 GetLightPathCount();

Retrieves the number of light paths used.

GetLightPathIndexName

Description 

 GetLightPathIndexName(
   int  Index,
   char *Name,
   int  MaxTextLength
);

Retrieves the name of the light path specified by the index.

Parameters

int Index

Index number (zero-based).

char *Name

Name of the light path.

int MaxTextLength

Maximum text length for the light path name.

GetCurrentLightPathName

Description 

 GetCurrentLightPathName(
   char *Name,
   int  MaxTextLength
);

Retrieves the name of the currently selected light path.

Parameters

char *Name

Name of the light path.

int MaxTextLength

Maximum text length for the light path name.

SelectLightPath

Description 

 SelectLightPath(
   char *Name
);

Selects the light path specified by its name.

Parameters

char *Name

Name of the light path.

SelectSetupAndHWConfiguration

This function runs the Devices > Select HW Configuration command.

Description 

 SelectSetupAndHWConfiguration();

Opens the Setup and Configuration dialog enabling the user to select a hardware configuration or Offline Analysis.

SelectSetupAndHWConfigurationNoDialog

Description 

 SelectSetupAndHWConfigurationNoDialog(
   char *SetupName,
   char *HWConfigName
);

Selects the specified Hardware Setup and Hardware Configuration without showing the Setup and Configuration dialog window.

Parameters

char *SetupName

Name of the hardware setup as it is shown in the Device Manager tab.

char *HWConfigName

Name of the hardware configuration shown in the Device Manager tab when selecting Rename. If the user uses the same name for two hardware configurations each of them having a different camera, the function cannot be used.

ShowDeviceControlDocker

Description 

 ShowDeviceControlDocker(
   int  Show
);

This function is not used.

Parameters

int Show

Index of the element which should be shown or hidden.

0

Hide the pane.

1

Show the pane.

ShowDeviceManagerPad

This function runs the Devices > Show Lightpath Scheme command.

Description 

 ShowDeviceManagerPad(
   int  Show
);

Opens the Lightpath Scheme.

Parameters

int Show

Index of the element which should be shown or hidden.

0

Hide the pane.

1

Show the pane.