XYZ

_Stg_LargeImageStageScanning, _Stg_LargeImageStageScanningWithZ, _Stg_LargeImageStageScanningWMacro, _StgConfig, _StgInitiate, _StgSetupScan, Stg_LargeImageScan, Stg_LargeImageScanArea, Stg_LargeImageStageScanWithName, Stg_LinearActuator_GetDescription, Stg_LinearActuator_GetPosition, Stg_LinearActuator_SetPosition, Stg_LoadLastFocusSurfacePoints, Stg_RemoveFocusSurfacePoints, Stg_SetLargeImageQuietMode, Stg_SetLargeImageStageScanningMacro, Stg_SetLargeImageStageZParams, StgEnableJoystick, StgGetList, StgGetListEx, StgGetPos, StgInitiate, StgJoystickOff, StgJoystickOn, StgMove, StgMoveXYZScan, StgScan, StgScanCaptureOnEachScan, StgScanDir, StgScanEllipse, StgScanEx, StgScanFocus, StgScanMacro, StgScanOrigin, StgScanRange, StgScanReturn, StgScanStatus, StgScanSystem, StgStopScan, StgToggleJoystick

StgEnableJoystick

Description 

 StgEnableJoystick(
   int  EnableJoystick
);

Sets stage joystick status (enable/disable).

Parameters

int EnableJoystick

Joystick status (enable/disable)

TRUE

Enable joystick

FALSE

Disable joystick

Return Values

DR_OK (1)

Joystick status was set

DR_NOTAVAILABLE (-4)

Stage is not connected

DR_NOTAUTOMATIC (-5)

Stage is not in automatic mode

DR_UNKNOWNERROR (-1)

Set joystick status failed

See Also 
StgEnableJoystickXY, StgEnableJoystickZ

StgGetList

Description 

int StgGetList(
   double *StgArrayX,
   double *StgArrayY,
   int  StgArrayCount
);

Returns XY coordinates of the list points.

Parameters

double *StgArrayX

Pointer to X array.

double *StgArrayY

Pointer to Y array.

int StgArrayCount

Count

Return Values

int

Number of points stored in the Arrays.

See Also 
StgGetListEx

StgGetListEx

Description 

 StgGetListEx(
   double *StgArrayX,
   double *StgArrayY,
   double *StgArrayZ,
   int  StgArrayCount
);

This function returns the number of points stored in the Arrays.

Parameters

double *StgArrayX

Pointer to X array.

double *StgArrayY

Pointer to Y array.

double *StgArrayZ

Pointer to Z array.

int StgArrayCount

Count

See Also 
StgGetList

StgGetPos

Description 

 StgGetPos(
   double *LpStgX,
   double *LpStgY,
   double *LpStgZ
);

Retrieves the current position [microns] of the stage.

Parameters

double *LpStgX

x coordinate [µm] to be filled

double *LpStgY

y coordinate [µm] to be filled

double *LpStgZ

z coordinate [µm] to be filled

Return Values

DR_OK (1)

All retrieved coordinates are valid

DR_PARTIALLYOK (2)

Only some retrieved coordinates are valid

DR_NOTAVAILABLE (-4)

Stage is not connected

DR_NOTCALIBRATED (-6)

Is available only uncalibrated Z axis

DR_NOTINITIALIZED (-7)

Stage is not initialized

DR_UNKNOWNERROR (-1)

Retrieving current position failed

See Also 
StgGetPosXY, StgGetPosZ

StgInitiate

Interactive command to this function: Devices > Initiate stage

Description 

int StgInitiate();

Initialize the stage and defines working ranges.

Return Values

int

1, DR_OK

Stage was fully initialized

2, DR_PARTIALLYOK

Stage was partially initialized

-4, DR_NOTAVAILABLE

Stage is not connected

-5, DR_NOTAUTOMATIC

Stage is not in automatic mode

-1, DR_UNKNOWNERROR

Stage initialization failed

-7, DR_NOTINITIALIZED

Stage not initialized

See Also 
StgInitiateXY

StgJoystickOff

Description 

 StgJoystickOff();

Disables the stage joystick.

Return Values

DR_OK (1)

Joystick was disabled

DR_NOTAVAILABLE (-4)

Stage is not connected

DR_NOTAUTOMATIC (-5)

Stage is not in automatic mode

DR_UNKNOWNERROR (-1)

Disable joystick failed

See Also 
StgEnableJoystick

StgJoystickOn

Description 

 StgJoystickOn();

Enables the stage joystick.

Return Values

DR_OK (1)

Joystick was enabled

DR_NOTAVAILABLE (-4)

Stage is not connected

DR_NOTAUTOMATIC (-5)

Stage is not in automatic mode

DR_UNKNOWNERROR (-1)

Enable joystick failed

See Also 
StgEnableJoystick

StgMove

Description 

int StgMove(
   double  x,
   double  y,
   double  z,
   int  relative
);

Moves the stage to specified position [µm].

Parameters

double x

x destination coordinate [µm]

double y

y destination coordinate [µm]

double z

z destination coordinate [µm]

int relative

Movement type (absolute/relative).

0, MOVE_ABSOLUTE

Absolute movement

1, MOVE_RELATIVE

Relative movement

Return Values

int

1, DR_OK

Stage moved to specified position

2, DR_PARTIALLYOK

Stage partially moved to specified position

-4, DR_NOTAVAILABLE

Stage is not connected

-6, DR_NOTCALIBRATED

Is available only uncalibrated Z axis

-7, DR_NOTINITIALIZED

Stage is not initialized

-5, DR_NOTAUTOMATIC

Stage is not in automatic mode

-1, DR_UNKNOWNERROR

Stage move failed

See Also 
StgMoveXY, StgMoveZ

StgMoveXYZScan

Description 

 StgMoveXYZScan(
   int  Index,
   int  relative
);

This function moves XYZ stage to a position of the point generated by function StgGeneratePointsForXYOverview. This function also updates the XYZOverview control (visited points will be highlighted).

Parameters

int Index

Index number (zero-based).

int relative

Movement type (absolute/relative).

0, MOVE_ABSOLUTE

Absolute movement

1, MOVE_RELATIVE

Relative movement

See Also 
StgGeneratePointsForXYOverview, StgMoveXYScan

StgScan

This function runs the Devices > Scan command.

Description 

 StgScan();

This function scans according to the set parameters.

See Also 
_StgSetupScan, StgScanMacro, StgScanFocus, StgScanOrigin, StgScanReturn, StgScanRange

StgScanCaptureOnEachScan

Description 

 StgScanCaptureOnEachScan(
   int  Enabled
);

This function specifies whether to perform capture during XY stage scan or not. To adjust this option in GUI, run the _StgSetupScan function.

Parameters

int Enabled

0

Disabled.

1

Enabled.

See Also 
StgScan

StgScanDir

Description 

 StgScanDir(
   int  ScanDirection
);

This function changes the scanning algorithm.

Parameters

int ScanDirection

For values 0,1,2,3 - first scan one line in X direction then change Y, another line in X direction ... For values 4,5,6,7 - first scan one line in Y direction then change X, another line in Y direction ...

0

X negative, Y negative

1

X negative, Y positive

2

X positive, Y negative

3

X positive, Y positive

4

Y negative, X negative

5

Y negative, X positive

6

Y positive, X negative

7

Y positive, X positive

See Also 
_StgSetupScan, StgScanMacro, StgScanFocus, StgScanOrigin, StgScanReturn, StgScanRange

StgScanEllipse

Description 

 StgScanEllipse(
   double  InsideEllipse
);

This function defines the scanning region for the StgScan function.

Parameters

double InsideEllipse

0

The rectangle scanning is performed.

1

The function scans inside the ellipse that is defined by scanning rectangle.

StgScanEx

Description 

long StgScanEx(
   double *StgArrayX,
   double *StgArrayY,
   int  StgArrayCount
);

The function returns arrays of x and y coordinates for the scan defined by StgScanXXX functions. It allows you to control of movement in the macro in the loop instead of calling the StgScan function. See the example below.

Parameters

double *StgArrayX

Pointer to X array

double *StgArrayY

Pointer to Y array

int StgArrayCount

Count

Return Values

long

The function returns number of points stored in the Arrays.

double             x[10000], y[10000], z;
long               num, i, cbCount;   
Live();
_StgSetupScan();
cbCount = 10000;
num = StgScanEx(x, y, cbCount);
if(num < 0) goto error;       //the number of real movements id greater than cbCount-1
if((x[0] < 0) && (y[0] < 0)) 
   {
   StgGetPos(x, y, &z);          //the movement is from current position, NO ellipse
   }
if((x[0] < 0) && (y[0] > 0))
   {
   x[0] = -x[0];
   StgGetPos(NULL, NULL, &z);   //the movement is from current position, YES ellipse
   }
else
   {
   StgGetPos(NULL, NULL, &z);
   }
// go to the start position
StgMove(x[0], y[0], z, FALSE);
Live();
PauseMacro("Scan Begin")
Live();
for(i=1; i<=num; i=i+1)
   {
   StgMove(x[i], y[i], 0, TRUE);
   PauseMacro("Pause")
   }
error:
cbCount = cbCount;
StgScanFocus

Description 

 StgScanFocus(
   int  Type,
   int  Every
);

This function sets focus parameters for scanning mode.

Parameters

int Type

Specifies type of focusing.

0

No focus.

1

Manual Focus.

2

Auto Focus.

int Every

Specifies the focusing frequency.

1

Focus algorithm is applied to an every field.

2

Focus algorithm is applied to an every second field.

3

Focus algorithm is applied to an every third field.

See Also 
_StgSetupScan, StgScanMacro, StgScanOrigin, StgScanRange, StgScanReturn, StgScanSystem

StgScanMacro

Description 

 StgScanMacro(
   int  Enabled,
   char *StgMacro
);

This function sets up execution of a macro for scanning mode (i.e. executing on every field). This function is typically called, when you invoke the Setup Scanning command. An interactive equivalent is the _StgSetupScan function.

Parameters

int Enabled

0

Disabled.

1

Enabled.

char *StgMacro

Specifies filename of macro.

StgScanOrigin

Description 

 StgScanOrigin(
   int  Type,
   int  HorPos,
   int  VerPos
);

This function sets up the starting coordinate for scanning mode. This function is typically called, when you invoke the Setup Scanning command. An interactive equivalent is _StgSetupScan function.

Parameters

int Type

Specifies origin type (fixed or free).

0

Current coordinates of the stage before scanning are used.

1

Fixed coordinates specified by HorPos and VerPos limits.

int HorPos

X coordinate of the scan origin (ignored for Type=0).

int VerPos

Y coordinate of the scan origin (ignored for Type=0).

See Also 
_StgSetupScan, StgScanMacro, StgScanFocus, StgScanRange, StgScanReturn, StgScanSystem, _StgSetupScan

StgScanRange

Description 

 StgScanRange(
   int  Type,
   int  M,
   double  N
);

This function sets up the range for automatic scanning mode. An interactive equivalent is _StgSetupScan function.

Parameters

int Type

Specifies meaning of M, N variables.

0

M and N values represent the number of fields.

1

M and N values represent the scanning range in millimeters.

int M

Number of fields or range in millimeters in horizontal direction.

double N

Number of fields or range in millimeters in vertical direction.

See Also 
_StgSetupScan, StgScanMacro, StgScanFocus, StgScanOrigin, StgScanReturn, StgScanSystem, _StgSetupScan

StgScanReturn

Description 

 StgScanReturn(
   int  Type
);

This function specifies optional return to the starting position when the scan is finished.

Parameters

int Type

Specifies optional return.

0

No return.

1

Return.

See Also 
_StgSetupScan, StgScanMacro, StgScanFocus, StgScanOrigin, StgScanRange, StgScanSystem

StgScanStatus

Description 

 StgScanStatus(
   int  Enabled
);

When you call StgScanStatus(TRUE) (it corresponds to selected check box Enable Status in the Stage Setup dialog box), then if you run scan the small status window will be shown. The window displays current_field/number_of_fields information while scanning stage is moving. You can also press Cancel button to interrupt the scan.

Parameters

int Enabled

0

Disabled.

1

Enabled.

See Also 
_StgSetupScan, StgScanMacro, StgScanFocus, StgScanOrigin, StgScanRange, StgScanSystem

StgScanSystem

Description 

 StgScanSystem(
   int  Type,
   int  HorStep,
   int  VerStep
);

This function sets up the covering or meander scanning system. This function is typically called, when you invoke the Setup Scanning command. An interactive equivalent is _StgSetupScan function.

Parameters

int Type

Defines type of scanning topology.

0

Covering system. Measurement areas of neighboring fields are touching.

1

Meander system. Scanning steps are defined by following limits.

int HorStep

Horizontal scanning step.

int VerStep

Vertical scanning step.

See Also 
_StgSetupScan, StgScanMacro, StgScanFocus, StgScanOrigin, StgScanReturn, StgScanRange

StgStopScan

Description 

 StgStopScan(
   int  Enabled
);

Via this function the user can stop scanning from within the macro that is bound to every field of the scan.

Example: lets suppose that a scan is defined as 10x10 fields. On each field the number of particles is calculated. If the total number of particles exceeds the limit the StgStopScan function can be called to interrupt the scanning cycle programmatically.

Parameters

int Enabled

0

Disabled.

1

Enabled.

StgToggleJoystick

Description 

 StgToggleJoystick();

Switches stage joystick status (enable->disable or disable->enable).

Return Values

DR_OK (1)

Joystick status was switched

DR_NOTAVAILABLE (-4)

Stage is not connected

DR_NOTAUTOMATIC (-5)

Stage is not in automatic mode

DR_UNKNOWNERROR (-1)

Switch joystick status failed

See Also 
StgToggleJoystickXY, StgToggleJoystickZ

Stg_LargeImageScan

Description 

 Stg_LargeImageScan(
   int  ColCount,
   int  RowCount,
   int  Autofocus,
   int  Overlap,
   int  Tolerance,
   int  UseRegistration,
   int  UseHDR,
   char *LargeImageFilename
);

This function starts large image scan using specified parameters.

Parameters

int ColCount

Number of columns to scan.

int RowCount

Number of rows to scan.

int Autofocus

Enable/disable autofocus and focus surface.

0

Disable autofocus

1

Enable autofocus

2

Enable focus surface

3

Enable both autofocus and focus surface

int Overlap

Image overlap in [%].

0

OFF

1-100

Defines how much the images overlap.

int Tolerance

Image placement tolerance for registration [pixels]. This parameter is obsolete and is provided only for backward compatibility.

int UseRegistration

Use image registration? Image registration tries to find the perfect match of the overlapping parts of images. However, this takes some time to compute.

0

No registration

1

Use registration

int UseHDR

Defines whether HDR is used or not.

0

HDR not used.

1

HDR used.

char *LargeImageFilename

Name of created large image document. If LargeImageFilename is NULL (0) document with default name will be created.

See Also 
Stg_LargeImageScanArea

Stg_LargeImageScanArea

Description 

 Stg_LargeImageScanArea(
   double  StgLeft,
   double  StgRight,
   double  StgTop,
   double  StgBottom,
   int  Autofocus,
   int  Overlap,
   int  Tolerance,
   int  UseRegistration,
   int  UseHDR,
   char *LargeImageFilename
);

This function starts large image scan using specified parameters.

Parameters

double StgLeft

Left stage position [µm].

double StgRight

Right stage position [µm].

double StgTop

Top stage position [µm].

double StgBottom

Bottom stage position [µm].

int Autofocus

Enable/disable autofocus and focus surface.

0

Disable autofocus

1

Enable autofocus

2

Enable focus surface

3

Enable both autofocus and focus surface

int Overlap

Image overlap in [%].

0

OFF

1-100

Defines how much the images overlap.

int Tolerance

Image placement tolerance for registration [pixels]. This parameter is obsolete and is provided only for backward compatibility.

int UseRegistration

Use image registration? Image registration tries to find the perfect match of the overlapping parts of images. However, this takes some time to compute.

0

No registration

1

Use registration

int UseHDR

Defines whether HDR is used or not.

0

HDR not used.

1

HDR used.

char *LargeImageFilename

Name of created large image document. If LargeImageFilename is NULL (0) document with default name will be created.

Note

It is possible to swap the StgLeft/StgRight and StgTop/StgBottom parameters and it will not affect the proper functionality of the function.

See Also 
Stg_LargeImageScan

Stg_LargeImageStageScanWithName

Description 

 Stg_LargeImageStageScanWithName(
   char *DocumentName
);

Performs scanning of a large image according to the defined parameters. A large image with the specified name is created once the scan is successfully completed.

Parameters

char *DocumentName

Name of the image (displayed in the image caption).

Stg_LinearActuator_GetDescription

Description 

 Stg_LinearActuator_GetDescription(
   char *LinearActuatorName,
   double *LinearActuatorRangeMin,
   double *LinearActuatorRangeMax,
   double *LinearActuatorResolution
);

Returns the description of the linear actuator.

Parameters

char *LinearActuatorName

Name of the linear actuator.

double *LinearActuatorRangeMin

Minimal range value of the linear actuator.

double *LinearActuatorRangeMax

Maximal range value of the linear actuator.

double *LinearActuatorResolution

Resolution of the linear actuator.

Stg_LinearActuator_GetPosition

Description 

 Stg_LinearActuator_GetPosition(
   char *LinearActuatorName,
   double *LpLinearActuatorPosition
);

Returns the position of the linear actuator.

Parameters

char *LinearActuatorName

Name of the linear actuator.

double *LpLinearActuatorPosition

Position of the linear actuator.

Stg_LinearActuator_SetPosition

Description 

 Stg_LinearActuator_SetPosition(
   char *LinearActuatorName,
   double  LinearActuatorPosition
);

Sets the position of the linear actuator.

Parameters

char *LinearActuatorName

Name of the linear actuator.

double LinearActuatorPosition

Position of the linear actuator.

Stg_LoadLastFocusSurfacePoints

Description 

 Stg_LoadLastFocusSurfacePoints();

Loads the last known set of focus surface points.

Stg_RemoveFocusSurfacePoints

Description 

 Stg_RemoveFocusSurfacePoints();

Removes all focus surface points.

Stg_SetLargeImageQuietMode

Description 

 Stg_SetLargeImageQuietMode(
   int  mode,
   char *LargeImageFilename
);

This function enables or disables user interactions during large image scanning.

Parameters

int mode

enable/disable questions

0

The user is asked to enter the file name after the scan.

1

Automatic saving after the scan under the given file name.

char *LargeImageFilename

Name of created large image document. If LargeImageFilename is NULL (0) document with default name will be created.

See Also 
Stg_SetLargeImageStageScanningMacro

Stg_SetLargeImageStageScanningMacro

Description 

 Stg_SetLargeImageStageScanningMacro(
   char *MacroFileName
);

This function specifies how to perform large image scanning. If the Filename parameter is NULL, Instead of executing the macro image capture will be performed.

Parameters

char *MacroFileName

Name of the macro file including file path. E.g. C:\macros\mymacro.mac

See Also 
Stg_SetLargeImageQuietMode

Stg_SetLargeImageStageZParams

Description 

 Stg_SetLargeImageStageZParams(
   int  iMode,
   double  dZStep,
   int  iZStackCount
);

This function specifies parameters for Z-Stack or EDF large image scanning.

Parameters

int iMode

Mode of z acquisition during large image scanning.

0

no z acquisition

1

scan z-series

2

scan z-series and combine it into one EDF image

double dZStep

Z step

int iZStackCount

Number of z frames

_StgConfig

Description 

 _StgConfig();

Displays a dialog box allowing the user to configure stage physical device.

Return Values

DR_OK (1)

Dialog was shown and stage was configured

DR_CANCELED (0)

Dialog could not be created or was canceled

DR_NOTAVAILABLE (-4)

Stage is not connected

DR_NOTSUPPORTED (-3)

Stage is not configurable

DR_UNKNOWNERROR (-1)

Stage configuration failed

See Also 
_StgConfigXY, _StgConfigZ

_StgInitiate

This function runs the Devices > Initiate stage command.

Description 

 _StgInitiate();

Displays a dialog box allowing the user to initiate stage.

Return Values

DR_OK (1)

Stage was fully initialized

DR_PARTIALLYOK (2)

Stage was partially initialized

DR_CANCELED (0)

Stage initialization was canceled

DR_NOTAVAILABLE (-4)

Stage is not connected

DR_NOTAUTOMATIC (-5)

Stage is not in automatic mode

DR_UNKNOWNERROR (-1)

Stage initialization failed

See Also 
StgInitiate

_StgSetupScan

This function runs the Devices > Scanning Setup command.

Description 

 _StgSetupScan();

This function corresponds to the Scanning Setup command. The function displays the Define Scanning dialog box for setting up scanning parameters.

See Also 
StgScanMacro, StgScanRange, StgScanReturn, StgScanFocus, StgScanSystem

_Stg_LargeImageStageScanning

Description 

 _Stg_LargeImageStageScanning();

If the active objective is calibrated and a motorized XY stage is initialized, this function displays the large image scanning setup window.

_Stg_LargeImageStageScanningWMacro

This function runs the Acquire > Scan Large Image command.

Description 

 _Stg_LargeImageStageScanningWMacro();

This function displays a GUI window where large-image scanning can be set-up and run.

_Stg_LargeImageStageScanningWithZ

Description 

 _Stg_LargeImageStageScanningWithZ();

This function is not used.