Clean

_CloseHolesBinary, _ConnectObjectsBinary, _ConnectObjectsBinaryGa3, _CreateCentroidsBinary, _SmoothBinary, _SmoothBinaryND, CleanBinary, CleanBinaryND, CloseHolesBinary, CloseHolesBinaryND, ConnectObjectsBinary, ConnectObjectsBinaryGa3, ConnectObjectsBinaryND, CreateCentroidsBinary, CreateCentroidsBinaryND, SmoothBinary, SmoothBinaryND

CleanBinary

Interactive command to this function: Binary > Clean

Description 

 CleanBinary(
   int  Count,
   int  MatrixType
);

This function removes small objects from binary image. An interactive equivalent is the _CleanBinary function.

Parameters

int Count

Number of iterations.

int MatrixType

Type of the structuring element used for the processing with the center in the enhanced pixel.

2

3

4

5

Note

The function is performed in two steps. Firstly, the binary image is eroded Number times by structuring element. Then the remaining objects are conditionally dilated within the boundaries of the original image or in other words are reconstructed to their original shape. This is used frequently to remove small or noisy objects.

CleanBinaryND

Description 

 CleanBinaryND(
   int  Count,
   int  MatrixType,
   int  NDTLoop,
   int  NDMPLoop,
   int  NDZLoop
);

This function removes small objects from the binary image.

Parameters

int Count

Number of iterations.

int MatrixType

Type of the structuring element used for the processing with the center in the enhanced pixel.

2

3

4

5

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

Note

The function is performed in two steps. Firstly, the binary image is eroded Number times by structuring element. Then the remaining objects are conditionally dilated within the boundaries of the original image or in other words are reconstructed to their original shape. This is used frequently to remove small or noisy objects.

CloseHolesBinary

Interactive command to this function: Binary > Close Holes

Description 

 CloseHolesBinary(
   int  Count,
   int  MatrixType
);

This function removes small holes from current binary image. An interactive equivalent is the _CloseHolesBinary function.

Parameters

int Count

Number of iterations.

int MatrixType

Type of the structuring element used for the processing with the center in the enhanced pixel.

2

3

4

5

CloseHolesBinaryND

Description 

 CloseHolesBinaryND(
   int  Count,
   int  MatrixType,
   int  NDTLoop,
   int  NDMPLoop,
   int  NDZLoop
);

This function removes small holes from current binary image. An interactive equivalent is the _CloseHolesBinary function.

Parameters

int Count

Number of iterations.

int MatrixType

Type of the structuring element used for the processing with the center in the enhanced pixel.

2

3

4

5

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

ConnectObjectsBinary

Description 

 ConnectObjectsBinary(
   int  DistLen
);

This function connects neighboring binary objects. The distance between two objects to be connected must be smaller than the defined length.

Parameters

int DistLen

Distance in [px].

ConnectObjectsBinaryGa3

Description 

 ConnectObjectsBinaryGa3(
   int  iMaximalDistance,
   int  NDDimension
);

Connects binary objects which are closer to each other than the specified distance by a thin line.

Parameters

int iMaximalDistance

Distance in [px].

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).

ConnectObjectsBinaryND

Description 

 ConnectObjectsBinaryND(
   int  DistLen,
   int  NDTLoop,
   int  NDMPLoop,
   int  NDZLoop
);

This function connects neighboring binary objects on an ND document. The distance between two objects to be connected must be smaller than the defined length.

Parameters

int DistLen

Distance in [px].

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

CreateCentroidsBinary

Description 

 CreateCentroidsBinary(
   int  CentroidType
);

This function calculates and marks centroids of all binary objects. Single-pixel objects will be created.

Parameters

int CentroidType

Algorithm to be used.

0

Just binary

1

Weighted Binary/Bright

2

Weighted Binary/Dark

CreateCentroidsBinaryND

Description 

 CreateCentroidsBinaryND(
   int  CentroidType,
   int  NDTLoop,
   int  NDMPLoop,
   int  NDZLoop
);

This function calculates and marks centroids of all binary objects of the specified ND dimension. Single-pixel objects will be created.

Parameters

int CentroidType

Algorithm to be used.

0

Just binary

1

Weighted Binary/Bright

2

Weighted Binary/Dark

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

SmoothBinary

Interactive command to this function: Binary > Smooth

Description 

 SmoothBinary(
   int  Count
);

Smooths contours of all binary image objects.

Parameters

int Count

Number of iterations.

SmoothBinaryND

Description 

 SmoothBinaryND(
   int  Count,
   int  NDTLoop,
   int  NDMPLoop,
   int  NDZLoop
);

This function smooths binary image contours.

Parameters

int Count

Number of iterations.

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

_CloseHolesBinary

This function runs the Binary > Close Holes command.

Description 

 _CloseHolesBinary();

This function displays the Close Holes on Binary Image dialog box.

_ConnectObjectsBinary

Description 

 _ConnectObjectsBinary();

Opens the Connect Objects on Binary Image dialog window.

_ConnectObjectsBinaryGa3

Description 

 _ConnectObjectsBinaryGa3();

Opens Connect Objects Binary dialog window.

See Also 
ConnectObjectsBinaryGa3

_CreateCentroidsBinary

Description 

 _CreateCentroidsBinary();

This function opens a window which calculates and marks centroids of the binary objects. Single-pixel objects will be created.

_SmoothBinary

This function runs the Binary > Smooth command.

Description 

 _SmoothBinary();

This function displays a dialog window where the user shall set number of iterations. Depending on the type of the current image (ND or non-ND), either the SmoothBinary or the SmoothBinaryND function is called.

_SmoothBinaryND

Description 

 _SmoothBinaryND();

Opens a dialog window where you can define and run the Smooth operation on the current binary image.