(Document and Medical Imaging toolkits)
Calibrating a ruler means assigning it to a specific length. For example, on a digital X-ray of a hand, you may draw an annotation ruler object along one of the fingers. You know that this distance is supposed to be exactly 6.5 cm. Using the new calibrating functionality, you can calibrate this ruler, all existing rulers, and all newly created rulers, so that they would precisely measure this distance to be 6.5 cm.
In non-automated mode, use the function L_AnnCalibrateRuler to calibrate ruler objects.
In automated mode, calibration is accomplished as follows:
Draw an ANNOBJECT_RULER object.
In the design mode, right-click the object.
Choose Ruler Properties and then Ruler.
Click the Calibrate button to display the dialog below.
In the Ruler Length edit box, enter the length that you want the ruler to be assigned to.
In the Measurement Units combo box, select the corresponding unit.
In most cases, you can leave the values in the 'Advanced Options' as they are. The first time you calibrate a ruler, the 'Current dpi' will give the horizontal and vertical resolutions of the image in dots per inch. For most images, these values will be equal, and the 'dpi Ratio' will be 1:1. However, for some images (i.e. some fax images) the horizontal and vertical resolutions are different. This will be automatically reflected in both the Current dpi and dpi Ratio settings. If you need to change the dpi ratio, enter a new ratio. This ratio must be between (1/100) and 100 inclusive.
If you want the calibration to apply to all newly created rulers, check the corresponding check box. If you check this option, all rulers, polyrulers, cross-products and protractors will adopt the new calibrated values.
If you want the calibration to apply to all existing rulers, check this option. Again, if you use this option, all rulers, polyrulers, cross-products and protractors will be affected.
Click the 'OK' button when you are satisfied with the calibration values.
Note: The calibration does not take an effect, until you click the 'Apply' button on the parent dialog.
You can also specify a second ruler length. This is accomplished first by calling L_AnnCalibrateRuler (specifying 1.0 for the dDpiRatioXtoY parameter), changing the orientation of the ruler, and then calling L_AnnCalibrateRulerSuccessive. Typically, this method is used when a user wants to calibrate a ruler by a horizontal calibration, followed by a vertical calibration. Note that when using this method, the two ruler calibrations can be on ruler(s) of ANY angle. The only requirement the two calibrations must be on rulers that do not have the same orientation (angle between the ruler and the X-axis).
While this function only works on ANNOBJECT_RULER objects, it can be used indirectly to calibrate any or all ruler objects, including ANNOBJECT_POLYRULER, ANNOBJECT_CROSSPRODUCT, and ANNOBJECT_POLYRULER. To do this, calibrate an ANNOBJECT_RULER object, get the resulting resolutions, and assign this resolution to all objects in the container. The example illustrates how to do this.
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document