LImageViewer::CalibrateCell

Summary

Calibrates the selected ruler inside the specific cell or sub-cell.

Syntax

#include "ltwrappr.h"

L_INT LImageViewer::CalibrateCell(nCellIndex, nSubCellIndex, dLength, uUnit, dTargetLength, uTargetUnit, uFlags)

Parameters

L_INT nCellIndex

A zero based index of the cell on which the function's effect will be applied.

L_INT nSubCellIndex

A zero-based index into the image list attached to the cell specified in nCellIndex. This sub-cell will be calibrated. Pass -1 to apply this effect on all sub-cells. Pass -2 to apply this effect on the selected sub-cell.

L_DOUBLE dLength

Value that represents the old length of the virtual ruler.

L_UINT uUnit

Value that specifies the unit of measure for the virtual ruler length. Possible values are:

Value Meaning
CONTAINER_RULERUNIT_INCHES [0] Inches.
CONTAINER_RULERUNIT_FEET [1] Feet.
CONTAINER_RULERUNIT_MICROMETERS [2] Micrometers.
CONTAINER_RULERUNIT_MILLIMETERS [3] Millimeters.
CONTAINER_RULERUNIT_CENTIMETERS [4] Centimeters.
CONTAINER_RULERUNIT_METERS [5] Meters.

L_DOUBLE dTargetLength

Value that represents the length to be assigned to the virtual ruler. The unit of measure for the length is specified by the value of the uTargetUnit parameter.

L_UINT uTargetUnit

Value that specifies the unit of measure for the virtual ruler length. Possible values are:

Value Meaning
CONTAINER_RULERUNIT_INCHES [0] Inches.
CONTAINER_RULERUNIT_FEET [1] Feet.
CONTAINER_RULERUNIT_MICROMETERS [2] Micrometers.
CONTAINER_RULERUNIT_MILLIMETERS [3] Millimeters.
CONTAINER_RULERUNIT_CENTIMETERS [4] Centimeters. This is the default value.
CONTAINER_RULERUNIT_METERS [5] Meters.

L_UINT uFlags

Flags that indicate the direction to which the calibration is applied. Possible values are:

Value Meaning
CONTAINER_CALIBRATERULER_BOTH [0] Calibrate both axes.
CONTAINER_CALIBRATERULER_VERTICAL [1] Calibrate vertical axis only.
CONTAINER_CALIBRATERULER_HORIZONTAL [2] Calibrate horizontal axis only.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

This function does not require that the annotation ruler to be present in order to calibrate the cell.

The user is expected to send a length along with the unit of measure, and then send a new length with the new unit of measure for the cell being calibrated.

Required DLLs and Libraries

See Also

Functions

Topics

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Medical Image Viewer C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.