Graticules

_Graticules3DProperties, _GraticulesProperties, _LoadGraticuleMask, _SaveGraticuleMask, AddBinaryToGraticuleMask, CreateSpecialGraticuleMask, DefaultGridPosition, DefaultGridPositionEx, DefineGraticuleMask, Get_GraticuleOptions, GetGraticuleXPosition, GetGraticuleYPosition, Graticules3DProperties, GraticulesProperties, LoadGraticuleMask, MoveGraticuleToCenter, SaveGraticuleMask, SetGraticuleMaskOpacity, SetGraticulePosition, ShowGraticule, ToggleGraticule

AddBinaryToGraticuleMask

This function runs the Add Binary to Graticule Mask command.

Description 

 AddBinaryToGraticuleMask();

This function appends the selected (visible) binary layers to the original contents of the Graticule mask.

CreateSpecialGraticuleMask

Description 

 CreateSpecialGraticuleMask(
   char  MaskName,
   int  Color,
   double  AngleRot
);

This function draws a special low-resolution graticule used for asbestos measurement. The MeasureAsbestos mask name is the only graticule supported by this function.

Parameters

char MaskName

MeasureAsbestos is the only supported mask name.

int Color

The RGB color as a 32bit integer. Use the RGB function to get the value.

double AngleRot

Defines angle of rotation of the graticule.

The Color parameter accepts also two predefined values: (0 = red, 1 = black).

DefaultGridPosition

This function runs the Move Graticules to Center command.

Description 

 DefaultGridPosition();

This function restores the default position of the current grid.

Note

Default position of the grids origin is located in the center of the screen.

See Also 
ShowGraticule, ShowScale

DefaultGridPositionEx

Description 

 DefaultGridPositionEx(
   int  GridPosType
);

Former function restoring the default position of the current grid.

Parameters

int GridPosType

Grid position.

DefineGraticuleMask

Interactive command to this function: Binary > Mask > Define Mask by Threshold

Description 

 DefineGraticuleMask();

Defines the binary mask image for graticules. The function uses the current binary image as data for the graticules mask.

See Also 
BinaryFromGraticuleMask

GetGraticuleXPosition

Description 

int GetGraticuleXPosition();

Returns the X position of the current graticule center.

Return Values

int

x - position of the graticule center

See Also 
GetGraticuleYPosition, SetGraticulePosition

GetGraticuleYPosition

Description 

int GetGraticuleYPosition();

Returns the Y position of the current graticule center.

Return Values

int

y - position of the graticule center

See Also 
GetGraticuleXPosition, SetGraticulePosition

Get_GraticuleOptions

Description 

 Get_GraticuleOptions(
   int *LpGridType,
   double *LpGridDensity,
   int *LpGridColor
);

This function gets the current graticule's parameters.

Parameters

int *LpGridType

Graticule grid type. This parameter is filled in on output.

0

Rectangle.

1

Circle.

2

Cross.

3

Vertical ruler.

4

Horizontal ruler.

5

Mask.

6

Horizontal scalebar.

7

Simple cross.

8

Vertical scalebar.

9

Simple circle.

10

cross.

double *LpGridDensity

Graticule grid density. This parameter is filled in on output.

int *LpGridColor

Graticule grid color(colors). This parameter is filled in on output.

0

Black/Black.

1

White/white.

2

Red/red.

3

Green/green.

4

Blue/blue.

5

yellow/yellow.

6

Magenta/magenta.

7

Cyan/cyan

8

Red/blue.

9

Red/green.

10

Green/blue.

Graticules3DProperties

Description 

 Graticules3DProperties(
   int  Grid3DType,
   int  Grid3DColor1,
   int  Grid3DColor2,
   int  Grid3DColor3,
   double  GridDensity,
   int  AutoSize
);

This function sets the grid appearance.

Parameters

int Grid3DType

Grid type

1

XY plane grid on bottom

2

YZ plane grid on bottom

3

XY+YZ plane grid on bottom

4

XZ plane grid on bottom

5

XY+XZ plane grid on bottom

6

YZ+XZ plane grid on bottom

7

XY+YZ+XZ plane grid on bottom

8

Bounding box on bottom

16

Halved bounding box on bottom

257

XY plane grid on top

258

YZ plane grid on top

259

XY+YZ plane grid on top

260

XZ plane grid on top

261

XY+XZ plane grid on top

262

YZ+XZ plane grid on top

263

XY+YZ+XZ plane grid on top

264

Bounding box on top

272

Halved bounding box on top

int Grid3DColor1

The main grid color as a 32bit signed integer (hexadecimal form: 0xffRRGGBB) or 0 for transparent.

int Grid3DColor2

The main grid color as a 32bit signed integer (hexadecimal form: 0xffRRGGBB) or 0 for transparent.

int Grid3DColor3

The main grid color as a 32bit signed integer (hexadecimal form: 0xffRRGGBB) or 0 for transparent.

double GridDensity

Manual grid density in calibration units or pixels if the image is uncalibrated (this parameter is ignored if autosized).

int AutoSize

Grid density autosize.

0

Manual

1

Automatic

GraticulesProperties

This function runs the Binary > Mask > Mask Properties command.

Interactive command to this function: View > Layers Properties > Graticules Properties

Description 

 GraticulesProperties(
   int  GridType,
   int  GridColor,
   int  GridColorSecond,
   double  LineWidth,
   double  GridDensity,
   int  AutoSize
);

This function sets the type, color, line width, and grid density of the graticule.

Parameters

int GridType

Grid type:

0

Rectangular

1

Circle

2

Cross

3

Vertical ruler

4

Horizontal ruler

5

Graticule mask

6

Simple Circle

7

Simple Cross

int GridColor

The main grid color as a 32bit signed integer (hexadecimal form: 0xffRRGGBB) or 0 for transparent.

int GridColorSecond

The second grid color in the same form as above.

double LineWidth

Line width in pixels.

double GridDensity

Manual grid density in calibration units or pixels if the image is uncalibrated (this parameter is ignored if autosized).

int AutoSize

Grid density autosize.

0

Manual

1

Automatic

LoadGraticuleMask

Interactive command to this function: Binary > Mask > Load Mask

Description 

 LoadGraticuleMask(
   char *Filename,
   int  FitGraticule
);

This function loads the selected image to the graticules plane.

Parameters

char *Filename

The path and the name of the file.

int FitGraticule

This parameter defines how the image will be treated after loading if its dimension does not fit the graticules plane.

0

Dimensions of the image will be preserved or cropped.

1

The image will be stretched to the graticules plane.

See Also 
SaveGraticuleMask

MoveGraticuleToCenter

Description 

 MoveGraticuleToCenter();

This function moves the currently displayed graticule to the center of the document as if the graticule was switched on for the first time.

SaveGraticuleMask

Interactive command to this function: Binary > Mask > Save Mask

Description 

 SaveGraticuleMask(
   char *Filepath
);

This function saves the graticules image to the specified image file.

Parameters

char *Filepath

Defines the complete path to the folder of interest.

Note

If the parameter is used to load images, use e.g.: C:\Images\*.tif

See Also 
LoadGraticuleMask

SetGraticuleMaskOpacity

This function runs the Binary > Mask > Mask Transparency command.

Description 

 SetGraticuleMaskOpacity(
   double  GridOpacity
);

This function sets the opacity of the graticule mask in percent.

Parameters

double GridOpacity

Opacity of the graticule mask in percent.

SetGraticulePosition

Description 

 SetGraticulePosition(
   int  GraticulesXPos,
   int  GraticulesYPos
);

Moves the graticule to the new position inside the current image. The position is treated as the center for most graticule types, but as a top-left corner for the binary mask.

Parameters

int GraticulesXPos

X coordinate of the new position.

int GraticulesYPos

Y coordinate of the new position.

See Also 
GetGraticuleXPosition, GetGraticuleYPosition

ShowGraticule

Description 

 ShowGraticule(
   int  GraticulesVisible
);

The function shows or hides graticules.

Parameters

int GraticulesVisible

Displays or hides graticules.

1, TRUE

Displays graticules.

0, FALSE

Hides graticules.

See Also 
ShowScale, ShowFrame

ToggleGraticule

This function runs the View > Layers > Graticules command.

Description 

 ToggleGraticule();

This function displays/hides the graticule layer.

_Graticules3DProperties

Description 

 _Graticules3DProperties();

This function displays the 3D Graticules properties window which sets all the graticule appearance properties. It works with the Compatibility engine set in the 3D Renderer Settings.

_GraticulesProperties

This function runs the View > Layers Properties > Graticules Properties command.

Description 

 _GraticulesProperties();

This function displays the Graticules Properties dialog window.

_LoadGraticuleMask

This function runs the Binary > Mask > Load Mask command.

Description 

 _LoadGraticuleMask();

This function displays a dialog window which selects a file with the graticule, previously exported via the _SaveGraticuleMask function. TIFF, BMP, and PNG images can be imported.

See Also 
_SaveGraticuleMask

_SaveGraticuleMask

This function runs the Binary > Mask > Save Mask command.

Description 

 _SaveGraticuleMask();

The function saves the current graticule mask. It shows a Save As dialog box.

See Also 
_LoadGraticuleMask