ROI

_BinaryFromMaskND, _BinaryToMask, _DrawAutoDetectROI, _DrawSimpleROI, _IntersectBinaryWithMask, _LoadROI, _MeasROIProperties, _MoveBinaryFromMaskND, _MoveBinaryToMask, _SaveROIAs, _SimpleROIEditor, _TrackingROIEditor, AddMovingROIs, BinaryFromMask, BinaryFromMaskND, BinarySwapMask, BinaryToMask, BinaryToMaskMP, ChangeROIType, ClearMeasROI, ColorizeAllROIObjects, CombineROI, CopyAllROIs, CopyROI, CopyROIToBinaryEx, CreateBezierROI, CreateDocumentFromROI, CreateDocumentFromSelectedROIs, CreateEllipseROI, CreateLineROI, CreatePolygonROI, CreateRectangleROI, DeleteROI, DuplicateROI, ExportTrackedROIsToXML, GetROICount, GetROIIdFromIndex, GetROIIndexFromID, GetROIInfo, GetROIPos, GetSelectedROIs, InflateROI, IntersectBinaryWithMask, IntersectBinaryWithMaskND, InvertROI, InvertROIAdd, KeepROIsWithIntensity, LoadROI, LockROI, MaskEdit, MaskOn, MeasROIProperties, MoveBinaryFromMask, MoveBinaryFromMaskND, MoveBinaryToMask, MoveBinaryToMaskMP, MoveTrackedBinaryToMask, PasteROI, ProfileFromROI, RemoveAllTouchingROIs, RemoveTouchingROIs, RenumberAllROIObjects, ROIFromInvertedGraticule, ROIShowAllTracks, ROIShowLabels, ROIShowStimulationButtons, ROIStatisticsExportRawToExcel, ROIStatisticsExportRawToFile, ROIStatisticsGetData, SaveROIAs, SelectAllROIs, SelectAllVectorsAndROIs, SelectROI, SetROIColor, SetROIPos, SetRoiVisibility, ShowMeasROI, ToggleDecInfo, ToggleMeasROI, ToggleRoi_MolecularCentroid, ToggleSnapToMolecules, TrackedBinaryToMask, TrackingBinaryByID

AddMovingROIs

Description 

 AddMovingROIs();

This function enables you to measure the movement characteristics of moving ROIs (ROIs which change position over time within one image sequence). Objects defined within the Tracking control window will be erased. The Tracking feature is needed to perform this function.

BinaryFromMask

This function runs the Reference > Binary <- ROI command.

Description 

 BinaryFromMask();

This function copies the mask image to the current binary image.

See Also 
BinaryToReference, BinaryFromReference, BinarySwapReference, BinaryToMask, BinarySwapMask

BinaryFromMaskND

Interactive command to this function: ROI > Copy ROI to Binary

Description 

 BinaryFromMaskND(
   int  NDDimension
);

This function converts the current ROIs to a binary layer. It works on ND document and the dimensions/frames to be affected are defined by the parameter.

Parameters

int NDDimension

Frame selection of the ND document.

0

Current frame

1

Time dimension

2

Multipoint dimension

4

Z dimension

15

All frames (the whole ND document).

16

Selection - the frames/dimensions selected by mouse within the ND control bar will be affected.

Note

Value combination is also possible (e.g.: M+T=3, Z+T=5, M+Z=6).

Note

Combinations of the NDDimension parameter values are allowed. E.g. 3 stands for MP+T dimension.

BinarySwapMask

This function runs the ROI > Swap Binary with ROI command.

Description 

 BinarySwapMask();

This function swaps the mask and the current binary images.

See Also 
BinaryToReference, BinaryFromMask, BinarySwapReference, BinaryToMask, BinaryFromReference

BinaryToMask

This function runs the Reference > Binary -> ROI command.

Interactive command to this function: ROI > Copy Binary to ROI

Description 

 BinaryToMask();

This function copies the current binary image to the mask image.

See Also 
BinaryToReference, BinaryFromMask, BinarySwapReference, BinarySwapMask, BinaryFromReference

BinaryToMaskMP

Description 

 BinaryToMaskMP();

This function transforms all binary objects of a multipoint ND2 document to ROIs. Each point will contain a different set of ROIs.

ChangeROIType

Description 

 ChangeROIType(
   int  RoiId,
   int  RoiType
);

This function sets the type of the selected ROI. Different ROI types are used for different purposes.

Parameters

int RoiId

ROI ID.

int RoiType

Type of the ROI.

0

Standard

1

Background

2

Reference

3

Stimulation

ClearMeasROI

This function runs the ROI > Delete All ROIs command.

Description 

 ClearMeasROI();

This function erases all ROI objects (the whole measurement ROI).

ColorizeAllROIObjects

This function runs the ROI > Colorize command.

Description 

 ColorizeAllROIObjects();

Resets colors of all ROIs to default.

CombineROI

Description 

int CombineROI(
   char *RoiOp,
   int  DstRoiId,
   int  SrcRoiId
);

Performs logical operation (AND, OR, XOR, SUB) between two ROIs (DstRoi and SrcRoi) defined by their IDs. The result of this operation is in DstRoi. All properties (Color, Line thickness) of DstRoi are maintained. SrcRoi is deleted by this operation. If the two ROIs do not overlap, DstRoi is not altered and SrcRoi is deleted.

Parameters

char *RoiOp

The logical operation to be performed between the source and the destination ROI. The ROIs must be overlapping.

AND

Makes intersection

OR

Combines the ROIs together into an union.

XOR

Leaves both ROIs except the intersection.

SUB

Makes a subtraction (DstROI - SrcROI).

int DstRoiId

Destination ROI ID.

int SrcRoiId

Source ROI ID.

Return Values

int

Negative value indicates an error.

See Also 
_DrawSimpleROI, CreateBezierROI, CreateEllipseROI, CreatePolygonROI, CreateRectangleROI, DeleteROI, DuplicateROI, GetROIInfo, InflateROI

CopyAllROIs

This function runs the ROI > Copy All ROIs command.

Description 

 CopyAllROIs();

This function copies all ROIs to clipboard.

CopyROI

Description 

 CopyROI();

This function copies the current Measurement ROI area to internal memory.

See Also 
PasteROI

CopyROIToBinaryEx

Description 

 CopyROIToBinaryEx(
   char *BinLayerNameDst,
   int  RoiId
);

This function enables you to create a binary layer under a selected ROI.

Parameters

char *BinLayerNameDst

Name of the destination binary layer(s) which will be created by the function.

Note

Some functions accept a list of binary layers. A coma-separated list of names is expected. If the list is in another format than expected or NULL, default names will be used.

int RoiId

ROI ID.

CreateBezierROI

Description 

int CreateBezierROI(
   double  SrcPoints,
   int  PointsNumber,
   dword  ColorRGB
);

Creates a new bezier ROI and returns its ID. Array of its nodes must be supplied.

Parameters

double SrcPoints

Array of points. Even indices correspond to X coordinates, odd indices correspond to Y coordinates. The size of the array must be twice as big as the number of points.

int PointsNumber

Number of points in the array.

dword ColorRGB

The color parameter specifies the color of the ROI. Use predefined color constants (RGB_BLUE (16711680), RGB_CYAN (16776960), RGB_GREEN (65280), RGB_MAGENTA (16711935), RGB_RED (255), RGB_WHITE (16777215), RGB_BLACK (0), RGB_YELLOW (65535) or RGB_DEFAULT (2147483647)) or any RGB value. See RGB function for details.

Return Values

int

The function returns ID of a newly created ROI.

>0

ROI ID

<0

The function failed.

See Also 
_DrawSimpleROI, CreateEllipseROI, CreatePolygonROI, CreateRectangleROI, CombineROI, DeleteROI, DuplicateROI, GetROIInfo, InflateROI, RGB

CreateDocumentFromROI

Description 

 CreateDocumentFromROI(
   int  RoiId,
   int  NDTLoop,
   int  NDMPLoop,
   int  NDZLoop
);

This function creates a new document based on selected ROI. This new document contains the ROI in selected ND dimensions.

Parameters

int RoiId

ROI ID.

int NDTLoop

0

apply to the current loop only

1

apply to the whole Time dimension

int NDMPLoop

Apply to Multi Point dimension.

0

apply to the current loop only

1

apply to the whole Multi Point dimension

int NDZLoop

Apply to Z dimension

0

apply to the current loop only

1

apply to the whole Z Series dimension

CreateDocumentFromSelectedROIs

This function runs the ROI > Create Documents from Selected ROIs command.

Description 

 CreateDocumentFromSelectedROIs(
   int  NDTLoop,
   int  NDMPLoop,
   int  NDZLoop
);

This function creates one or more new images containing just the area of active ROIs. If a moving ROI or a shape-changing ROI is selected, the minimum area to contain all the ROI positions and shapes will be used.

Parameters

int NDTLoop

0

apply to the current loop only

1

apply to the whole Time dimension

int NDMPLoop

Apply to Multi Point dimension.

0

apply to the current loop only

1

apply to the whole Multi Point dimension

int NDZLoop

Apply to Z dimension

0

apply to the current loop only

1

apply to the whole Z Series dimension

CreateEllipseROI

Description 

int CreateEllipseROI(
   int  CenterX,
   int  CenterY,
   int  Width,
   int  Height,
   double  AngleRot,
   dword  ColorRGB
);

Creates a new ellipse ROI and returns its ID.

Parameters

int CenterX

X coordinate of the center.

int CenterY

Y coordinate of the center.

int Width

Image width in pixels.

int Height

Image height in pixels.

double AngleRot

Orientation of the X axis (width) of the ROI object. The angle is in degrees rising clockwise.

dword ColorRGB

The color parameter specifies the color of the ROI. Use predefined color constants (RGB_BLUE (16711680), RGB_CYAN (16776960), RGB_GREEN (65280), RGB_MAGENTA (16711935), RGB_RED (255), RGB_WHITE (16777215), RGB_BLACK (0), RGB_YELLOW (65535) or RGB_DEFAULT (2147483647)) or any RGB value. See RGB function for details.

Return Values

int

The function returns ID of a newly created ROI.

>0

ROI ID

<0

The function failed.

See Also 
_DrawSimpleROI, CreateBezierROI, CreatePolygonROI, CreateRectangleROI, CombineROI, DeleteROI, DuplicateROI, GetROIInfo, InflateROI, RGB

CreateLineROI

Description 

 CreateLineROI(
   double  X1,
   double  Y1,
   double  X2,
   double  Y2,
   dword  ColorRGB
);

Creates a new line ROI and returns its ID. The start and the end point must be defined.

Parameters

double X1

The X coordinate of the start point [px].

double Y1

The Y coordinate of the start point [px].

double X2

The X coordinate of the end point [px].

double Y2

The Y coordinate of the end point [px].

dword ColorRGB

The color parameter specifies the color of the ROI. Use predefined color constants (RGB_BLUE (16711680), RGB_CYAN (16776960), RGB_GREEN (65280), RGB_MAGENTA (16711935), RGB_RED (255), RGB_WHITE (16777215), RGB_BLACK (0), RGB_YELLOW (65535) or RGB_DEFAULT (2147483647)) or any RGB value. See RGB function for details.

See Also 
RGB

CreatePolygonROI

Description 

int CreatePolygonROI(
   double  SrcPoints,
   int  PointsNumber,
   dword  ColorRGB
);

Creates a new polygon ROI and returns its ID. Array of its vertices must be supplied.

Parameters

double SrcPoints

Array of points. Even indices correspond to X coordinates, odd indices correspond to Y coordinates. The size of the array must be twice as big as the number of points.

int PointsNumber

Number of points in the array.

dword ColorRGB

The color parameter specifies the color of the ROI. Use predefined color constants (RGB_BLUE (16711680), RGB_CYAN (16776960), RGB_GREEN (65280), RGB_MAGENTA (16711935), RGB_RED (255), RGB_WHITE (16777215), RGB_BLACK (0), RGB_YELLOW (65535) or RGB_DEFAULT (2147483647)) or any RGB value. See RGB function for details.

Return Values

int

The function returns ID of a newly created ROI.

>0

ROI ID

<0

The function failed.

See Also 
_DrawSimpleROI, CreateBezierROI, CreateEllipseROI, CreateRectangleROI, CombineROI, DeleteROI, DuplicateROI, GetROIInfo, InflateROI, RGB

CreateRectangleROI

Description 

int CreateRectangleROI(
   int  CenterX,
   int  CenterY,
   int  Width,
   int  Height,
   double  AngleRot,
   dword  ColorRGB
);

Creates a new rectangle ROI and returns its ID.

Parameters

int CenterX

X coordinate of the center.

int CenterY

Y coordinate of the center.

int Width

Image width in pixels.

int Height

Image height in pixels.

double AngleRot

Orientation of the X axis (width) of the ROI object. The angle is in degrees rising clockwise.

dword ColorRGB

The color parameter specifies the color of the ROI. Use predefined color constants (RGB_BLUE (16711680), RGB_CYAN (16776960), RGB_GREEN (65280), RGB_MAGENTA (16711935), RGB_RED (255), RGB_WHITE (16777215), RGB_BLACK (0), RGB_YELLOW (65535) or RGB_DEFAULT (2147483647)) or any RGB value. See RGB function for details.

Return Values

int

The function returns ID of a newly created ROI.

>0

ROI ID

<0

The function failed.

See Also 
_DrawSimpleROI, CreateBezierROI, CreateEllipseROI, CreatePolygonROI, CombineROI, DeleteROI, DuplicateROI, GetROIInfo, InflateROI, RGB

DeleteROI

Description 

 DeleteROI(
   int  RoiId
);

Removes one ROI from the current image.

Parameters

int RoiId

ROI ID.

See Also 
_DrawSimpleROI, ClearMeasROI, CreateBezierROI, CreateEllipseROI, CreatePolygonROI, CreateRectangleROI, DuplicateROI, GetROIInfo, GetROIIdFromIndex, InflateROI

DuplicateROI

Description 

int DuplicateROI(
   int  RoiId,
   int  DeltaX,
   int  DeltaY,
   dword  ColorRGB
);

This function creates a copy of the specified ROI.

Parameters

int RoiId

ROI ID.

int DeltaX

The change of position in X direction (px).

int DeltaY

The change of position in Y direction (px).

dword ColorRGB

The color parameter specifies the color of the ROI. Use predefined color constants (RGB_BLUE (16711680), RGB_CYAN (16776960), RGB_GREEN (65280), RGB_MAGENTA (16711935), RGB_RED (255), RGB_WHITE (16777215), RGB_BLACK (0), RGB_YELLOW (65535) or RGB_DEFAULT (2147483647)) or any RGB value. See RGB function for details.

Return Values

int

The function returns ID of a newly created ROI.

>0

ROI ID

<0

The function failed.

See Also 
_DrawSimpleROI, CreateBezierROI, CreateEllipseROI, CreatePolygonROI, CreateRectangleROI, CombineROI, DeleteROI, GetROIInfo, InflateROI, RGB

ExportTrackedROIsToXML

Description 

 ExportTrackedROIsToXML(
   char *OutputFolder,
   char *XMLFilename,
   char *BDMLId,
   char *Title,
   char *Version,
   char *Release,
   char *Description,
   char *DataType,
   char *Organism,
   char *BasedOn,
   char *Contributors,
   char *ContactName,
   char *Email,
   char *Organization,
   char *Summary
);

Exports tracked ROIs from a timelapse document to a selected folder as a .xml file (BDML format). The resulting .xml file contains entered user metadata and a list of individual ROIs (description of their contour and affiliation to a track). Affiliation to a track is based on the ROI ID. By default, the title parameter uses a file name.

Parameters

char *OutputFolder

Path to the folder where the output file is created.

char *XMLFilename

Name of the output .xml file. It is set to output.xml by default.

char *BDMLId

UUID. Automatically generated by default.

char *Title

Title name.

char *Version

Version. 1 by default.

char *Release

Release. Date of the macro execution by default.

char *Description

Brief image text description. Maximum length is 2047 characters. This image information is supported by LIM, JPEG2000, TIFF and ND2 image formats.

char *DataType

Data type.

char *Organism

Organism.

char *BasedOn

Based on.

char *Contributors

Contributors.

char *ContactName

Contact name.

char *Email

E-mail.

char *Organization

Organization.

char *Summary

Summary.

GetROICount

Description 

int GetROICount();

Returns the number of visible ROIs in the image.

Return Values

int

Number of visible ROIs

See Also 
ShowMeasROI, GetROIIdFromIndex, SelectROI

GetROIIdFromIndex

Description 

int GetROIIdFromIndex(
   int  RoiIndex
);

Returns the ID of the n-th visible ROI.

Parameters

int RoiIndex

ROI index among visible ROIs. The first index is 0, the last can be obtained using function GetROICount-1

Return Values

int

ID of the ROI. The function returns -1 if the object was not found.

  
int i, id;
int count;
count = GetROICount();
for (i = 0; i<count; ++i)
{
   id = GetROIIdFromIndex(i);
   SelectROI(id, TRUE);
}

See Also 
GetROICount, GetROIIndexFromID

GetROIIndexFromID

Description 

int GetROIIndexFromID(
   int  RoiId
);

Returns the index of the ROI among visible ROIs in the image.

Parameters

int RoiId

ROI ID.

Return Values

int

Index of ROI among visible ROIs in the image. The function returns -1 if the object was not found.

See Also 
GetROICount, GetROIIdFromIndex

GetROIInfo

Description 

 GetROIInfo(
   int  RoiId,
   int *LpBBoxL,
   int *LpBBoxT,
   int *LpBBoxR,
   int *LpBBoxB,
   int *LpCenterX,
   int *LpCenterY,
   int *LpMinFeret,
   int *LpMaxFeret,
   double *LpRotation,
   dword *lpColorRGB
);

This function retrieves parameters of a given ROI specified by its ID.

Parameters

int RoiId

ROI ID.

int *LpBBoxL

Left bounding box coordinate.

int *LpBBoxT

Top bounding box coordinate.

int *LpBBoxR

Right bounding box coordinate.

int *LpBBoxB

Bottom bounding box coordinate.

int *LpCenterX

X coordinate of the Center.

int *LpCenterY

Y coordinate of the Center.

int *LpMinFeret

If the ROI was an ellipse it is the minor axis.

int *LpMaxFeret

If the ROI was an ellipse it is the major axis.

double *LpRotation

The Orientation of the main axis (along MaxFerret). This value can be directly used in CreateEllipseROI.

dword *lpColorRGB

RGB color of the ROI.

See Also 
_DrawSimpleROI, CreateBezierROI, CreateEllipseROI, CreatePolygonROI, CreateRectangleROI, CombineROI, DeleteROI, DuplicateROI, InflateROI

GetROIPos

Description 

 GetROIPos(
   int  RoiId,
   int *pPosX,
   int *pPosY
);

Returns the position (coordinate of the top-left corner of the bounding rectangle around the ROI) of one ROI in the current image. The parameters are filled on output.

Parameters

int RoiId

ROI ID.

int *pPosX

Pointer to the X coordinate.

int *pPosY

Pointer to the Y coordinate.

See Also 
GetROIIdFromIndex, SetROIPos

GetSelectedROIs

Description 

 GetSelectedROIs(
   int *LpRoiId
);

This function returns names of the selected ROIs.

Parameters

int *LpRoiId

Pointer to the ROI ID.

InflateROI

Description 

 InflateROI(
   int  RoiId,
   int  DeltaX,
   int  DeltaY
);

This function stretches (inflates or deflates) the specified ROI according to the parameters.

Parameters

int RoiId

ROI ID.

int DeltaX

The amount of pixels the ROI inflates or deflates (negative value) to the left and right.

int DeltaY

The amount of pixels the ROI inflates or deflates (negative value) to the top and bottom.

See Also 
_DrawSimpleROI, CreateBezierROI, CreateEllipseROI, CreatePolygonROI, CreateRectangleROI, CombineROI, DeleteROI, DuplicateROI, GetROIInfo

IntersectBinaryWithMask

Description 

 IntersectBinaryWithMask();

The function intersects all selected (visible) binary layers with a ROI mask.

See Also 
_IntersectBinaryWithMask, IntersectBinaryWithMaskND

IntersectBinaryWithMaskND

Description 

 IntersectBinaryWithMaskND(
   int  NDTLoop,
   int  NDMPLoop,
   int  NDZLoop
);

The function intersects all selected (visible) binary layers with a ROI mask.

Parameters

int NDTLoop

0

apply to the current loop only

1

apply to the whole Time dimension

int NDMPLoop

Apply to Multi Point dimension.

0

apply to the current loop only

1

apply to the whole Multi Point dimension

int NDZLoop

Apply to Z dimension

0

apply to the current loop only

1

apply to the whole Z Series dimension

See Also 
_IntersectBinaryWithMask, IntersectBinaryWithMask

InvertROI

This function runs the ROI > Invert ROI command.

Description 

 InvertROI();

This function inverts the currently used ROI(s).

InvertROIAdd

This function runs the ROI > Create Inverted ROI command.

Description 

 InvertROIAdd();

The current ROI(s) are inverted and this inversion is inserted into the image as a new ROI.

KeepROIsWithIntensity

Description 

 KeepROIsWithIntensity(
   int  MinIntensity,
   int  MaxIntensity
);

This function deletes ROIs with intensity outside the range defined by the MinIntensity and MaxIntensity parameters.

Parameters

int MinIntensity

Minimal intensity value.

int MaxIntensity

Maximal intensity value.

LoadROI

Interactive command to this function: ROI > Load ROI

Description 

 LoadROI(
   char *Filename,
   int  FitROI
);

This function loads a region of interest previously saved to a bitmap image by the SaveROIAs function.

Parameters

char *Filename

The path and the name of the file.

int FitROI

Fit the Measurement ROI if its size does not match the image?

0

No fitting

1

Fit ROI image.

LockROI

Description 

 LockROI(
   int  RoiId,
   int  Enabled
);

This function locks the selected ROI to prevent unwanted changes and shifts in position.

1 = locked ROI.

Parameters

int RoiId

ROI ID.

int Enabled

0

Disabled.

1

Enabled.

MaskEdit

This function runs the ROI > Raster ROI Editor command.

Description 

 MaskEdit();

This function displays the Tool window and allows the mask image editing.

See Also 
ImageEdit

MaskOn

Description 

 MaskOn(
   int  Mask
);

This function activates or deactivates mask. This function is called from the Mask On command (Measure menu).

Parameters

int Mask

Activates or deactivates the mask.

0

mask off

1

mask on

See Also 
MeasureField, ScanObjects, MeasFrame

MeasROIProperties

Description 

 MeasROIProperties(
   int  MeasROIColor,
   double  MeasROILineWidth,
   int  MeasROIFillColor,
   int  MeasROIOpacity
);

This function sets the visual properties of the measurement ROI.

Parameters

int MeasROIColor

Contour color as 32bit signed integer (hexadecimal form: 0xffRRGGBB) or 0 for transparent.

double MeasROILineWidth

Contour line width [px].

int MeasROIFillColor

Fill color as 32bit signed integer (hexadecimal form: 0xffRRGGBB).

int MeasROIOpacity

Opacity of the Measurement ROI between 0 and 100; 0 for fully transparent (do not use Param3 for opacity).

MoveBinaryFromMask

Description 

 MoveBinaryFromMask();

This function creates binary objects in a binary layer from ROIs.

MoveBinaryFromMaskND

Interactive command to this function: ROI > Move ROI to Binary

Description 

 MoveBinaryFromMaskND(
   int  NDDimension
);

This function creates binary objects in a binary layer from ROIs.

Parameters

int NDDimension

Frame selection of the ND document.

0

Current frame

1

Time dimension

2

Multipoint dimension

4

Z dimension

15

All frames (the whole ND document).

16

Selection - the frames/dimensions selected by mouse within the ND control bar will be affected.

Note

Value combination is also possible (e.g.: M+T=3, Z+T=5, M+Z=6).

MoveBinaryToMask

Interactive command to this function: ROI > Move Binary to ROI

Description 

 MoveBinaryToMask();

This function moves the current binary image to the Measurement ROI.

See Also 
BinaryToMask

MoveBinaryToMaskMP

This function runs the Reference > Binary -> ROI per Multi Point command.

Description 

 MoveBinaryToMaskMP();

This function moves current binary image to Measurement ROI in all points of a multipoint image.

MoveTrackedBinaryToMask

Description 

 MoveTrackedBinaryToMask();

Converts the selected tracked binaries into ROIs.

Note

This function requires tracked binaries or one binary over all frames.

PasteROI

This function runs the ROI > Paste ROI command.

Description 

 PasteROI();

This function pastes the Measurement ROI area (copied to internal memory via the CopyROI function) to the current image. The current Measurement ROI will be replaced.

ProfileFromROI

Description 

 ProfileFromROI(
   int  ProfileFromMedialAxis,
   int  RoiId
);

Creates a profile line from the selected ROI and displays it inside the Intensity Profile tab.

Parameters

int ProfileFromMedialAxis

This function is not used at the moment. It will be implemented in near future.

int RoiId

ROI ID.

ROIFromInvertedGraticule

This function runs the ROI > ROI from Inverted Graticules command.

Description 

 ROIFromInvertedGraticule();

Replaces all ROIs on the current image with the new ROIs created from the current graticule. This function is recommended to use only with rectangular, circle or simple circle graticule types.

ROIShowAllTracks

Description 

 ROIShowAllTracks(
   int  ShowMeasROI
);

If multiple moving ROIs are defined, the trajectory of the currently selected ROI is displayed by default. This function displays trajectories of all moving ROIs at once.

Parameters

int ShowMeasROI

Show all trajectories?

0

Show trajectory of the selected moving ROI.

1

Show trajectories of all moving ROIs.

ROIShowLabels

This function runs the ROI > Show/Hide ROI Labels command.

Description 

 ROIShowLabels(
   int  ShowMeasROI
);

This function hides/displays the ROI labels of the current image.

Parameters

int ShowMeasROI

State of the control.

0

Hides ROI labels

1

Displays ROI labels

ROIShowStimulationButtons

Description 

 ROIShowStimulationButtons(
   int  ShowMeasROI
);

If a ROI is assigned to the current stimulation device, this function can be used to turn on the stimulation buttons during live.

Parameters

int ShowMeasROI

0

Hides the ROI layer

1

Displays the ROI layer

ROIStatisticsExportRawToExcel

Description 

 ROIStatisticsExportRawToExcel();

This function exports the data of ROI Statistics control window to MS Excel (if installed). It opens Excel and inserts the data to a table.

ROIStatisticsExportRawToFile

Description 

 ROIStatisticsExportRawToFile(
   char *Path
);

This function exports the data of the ROI Statistics control window to a text file.

Parameters

char *Path

Name and path of the file to be created.

ROIStatisticsGetData

Description 

 ROIStatisticsGetData(
   int  RoiStatBin,
   int  RoiStatRow,
   double *RoiStatData,
   int *lpunit
);

This function retrieves data from the ROI Statistics table.

Parameters

int RoiStatBin

Select the column of the table.

0

Whole image

1

Binary

int RoiStatRow

Table row.

-1

Area Fraction.

1-7

One of the measured features listed in the table.

double *RoiStatData

The retrieved data.

int *lpunit

Points to calibration unit. Filled on output.

0

Pixels

1

Nanometers

2

Micrometers

3

Millimeters

4

Centimeters

5

Decimeters

6

Meters

7

Kilometers

8

Mils

9

Inches

Note

Returns -1 for non-dimensional data.

RemoveAllTouchingROIs

This function runs the ROI > Remove All ROIs Touching Image Borders command.

Description 

 RemoveAllTouchingROIs();

This function removes all ROIs touching the image border.

RemoveTouchingROIs

Description 

 RemoveTouchingROIs();

This function removes only selected ROIs touching the image borders.

RenumberAllROIObjects

This function runs the ROI > Renumber command.

Description 

 RenumberAllROIObjects();

This function renumbers all ROIs, when some of them were deleted, to keep numbering continuity.

SaveROIAs

Interactive command to this function: ROI > Save ROI As

Description 

 SaveROIAs(
   char *Filename
);

This function saves the current Measurement ROI as a tif/png/bmp file.

Parameters

char *Filename

The path and the name of the file.

SelectAllROIs

Description 

 SelectAllROIs(
   int  RoiSelect
);

Selects or deselects all visible ROIs in the image.

Parameters

int RoiSelect

Selection state of ROI

1, TRUE

Selected

0, FALSE

Deselected

See Also 
SelectROI

SelectROI

Description 

 SelectROI(
   int  RoiId,
   int  RoiSelect
);

Sets the selection state of the ROI. Please note that selecting one ROI does not automatically deselect the other ROIs.

Parameters

int RoiId

ROI ID.

int RoiSelect

Selection state of ROI

1, TRUE

Selected

0, FALSE

Deselected

See Also 
SelectAllROIs, GetROICount

SetROIColor

Description 

 SetROIColor(
   int  RoiId,
   dword  ColorRGB
);

Sets the position of one ROI in the current image.

Parameters

int RoiId

ROI ID.

dword ColorRGB

The color parameter specifies the color of the ROI. Use predefined color constants (RGB_BLUE (16711680), RGB_CYAN (16776960), RGB_GREEN (65280), RGB_MAGENTA (16711935), RGB_RED (255), RGB_WHITE (16777215), RGB_BLACK (0), RGB_YELLOW (65535) or RGB_DEFAULT (2147483647)) or any RGB value. See RGB function for details.

SetROIPos

Description 

 SetROIPos(
   int  RoiId,
   int  PosX,
   int  PosY
);

Sets the position (top-left corner) of one ROI in the current image.

Parameters

int RoiId

ROI ID.

int PosX

X coordinate in [px].

int PosY

Y coordinate in [px].

See Also 
GetROIIdFromIndex

SetRoiVisibility

Description 

 SetRoiVisibility(
   int  RoiSelect
);

This function sets the visibility of the ROI.

Parameters

int RoiSelect

Selection state of ROI

1, TRUE

Selected

0, FALSE

Deselected

ShowMeasROI

Description 

 ShowMeasROI(
   int  ShowMeasROI
);

This function hides/displays the Measurement Region of Interest layer of the current image.

Parameters

int ShowMeasROI

0

Hides the ROI layer

1

Displays the ROI layer

ToggleDecInfo

Description 

 ToggleDecInfo();

Shows/hides the deconvolution information.

ToggleMeasROI

This function runs the View > Layers > ROI command.

Description 

 ToggleMeasROI();

This function can hide/display the Measurement Region of Interest layer in the picture. It corresponds to the Measurement ROI button of the document window.

ToggleRoi_MolecularCentroid

Description 

 ToggleRoi_MolecularCentroid();

Turns the molecular centroid on/off.

ToggleSnapToMolecules

Description 

 ToggleSnapToMolecules();

Turns the Snap to Molecules function on/off. If this function is on, hovering over a molecule displays a symbol indicating which molecule is the nearest.

TrackedBinaryToMask

Description 

 TrackedBinaryToMask();

This function converts binary objects previously processed by automatic tracking to ROI objects. ROIs changing over time are created.

See Also 
TrackBinaries

TrackingBinaryByID

Description 

 TrackingBinaryByID();

Binary objects may be used as the source data for the Tracking algorithm. This function performs the tracking using binary objects IDs (object #1 is tracked throughout the image sequence, etc.). The binary IDs are created by indexing binary objects of each frame dully from top-left to bottom-right corner.

_BinaryFromMaskND

This function runs the ROI > Copy ROI to Binary command.

Description 

 _BinaryFromMaskND();

This function opens a window where it is possible to select frames (dimensions) which will be affected by the function. Once you press OK, a binary layer will be created from the current ROI.

See Also 
BinaryFromMaskND

_BinaryToMask

This function runs the ROI > Copy Binary to ROI command.

Description 

 _BinaryToMask();

This function copies the binary image to the ROI.

_DrawAutoDetectROI

This function runs the ROI > Auto Detect ROI command.

Description 

int _DrawAutoDetectROI();

This function switches mouse cursor to the ROI auto-detection mode. A ROI is created after user interaction.

Return Values

int

Index of inserted ROI.

_DrawSimpleROI

Description 

 _DrawSimpleROI(
   int  ProbeObjectType
);

This function switches NIS-Elements to a mode of drawing the Measurement ROI. The parameter selects its shape.

Parameters

int ProbeObjectType

0

Rectangular ROI

1

Elliptic ROI

2

Polygonal ROI

3

Polygonal Bezier ROI

5

Line ROI

6

Polyline ROI

8

Circular ROI

9

Circular - three points ROI

10

Circular - n points ROI

11

Circular - radius ROI

12

Elliptic - 4 points ROI

13

Square ROI

15

Auto detect ROI

16

Auto detect All ROI

17

Auto detect - Bubble segmentation

_IntersectBinaryWithMask

Description 

 _IntersectBinaryWithMask();

This function intersects all selected (visible) binary layers with ROI mask. On a ND document it shows a dialog with dimensions and calls the appropriate function.

See Also 
IntersectBinaryWithMask, IntersectBinaryWithMaskND

_LoadROI

This function runs the ROI > Load ROI command.

Description 

 _LoadROI();

This function displays the Open Image dialog window. A previously saved Measurement ROI image can be loaded via this dialog.

_MeasROIProperties

Description 

 _MeasROIProperties();

This function displays the Measurement ROI Properties dialog window. Border line color, its width, fill color, and opacity can be set from that window.

_MoveBinaryFromMaskND

This function runs the ROI > Move ROI to Binary command.

Description 

 _MoveBinaryFromMaskND();

This function moves the ROI to the current binary image.

_MoveBinaryToMask

This function runs the ROI > Move Binary to ROI command.

Description 

 _MoveBinaryToMask();

This function moves current binary image to the Measurement ROI.

_SaveROIAs

This function runs the ROI > Save ROI As command.

Description 

 _SaveROIAs();

This function displays the Save As dialog box from where the current Measurement ROI can be saved as a tif/png/bmp file.

_SimpleROIEditor

This function runs the ROI > Simple ROI Editor command.

Description 

 _SimpleROIEditor();

It starts the simplified ROI editor allowing user to draw new ROIs.

_TrackingROIEditor

Description 

 _TrackingROIEditor();

This function edits ROIs in time.

SelectAllVectorsAndROIs

Description 

 SelectAllVectorsAndROIs();

This function enables the user to select all annotations, measurement objects and ROI objects.