Description
Convert the calibration from one unit to another.
-
Return Type
-
None
-
Syntax
-
object.ConvertToUnit newUnit
The ConvertToUnit Method syntax has these parts: |
| object | An expression evaluating to an object of type McSpatialCalib. | | newUnit | Required. A mcSpatialUnit enumeration, as described in settings. | Settings The settings for newUnit are:
 | mcsuPixel | 0 | |
 | mcsuOther | 1 | |
 | mcsuNanometer | 2 | |
 | mcsuMicrometer | 3 | |
 | mcsuMillimeter | 4 | |
 | mcsuCentimeter | 5 | |
 | mcsuMeter | 6 | |
 | mcsuKilometer | 7 | |
 | mcsuInch | 8 | |
 | mcsuFoot | 9 | |
 | mcsuYard | 10 | |
 | mcsuMile | 11 | |
Remarks
This is related to the Unit property. Changing the Unit property changes the interpretation of the PixelSizeX and PixelSizeY properties, for instance a value of .1 now being considered .1 miles instead of .1 microns. Using this ConvertToUnit method, the previous calibration of .1 microns would be converted to the equivalent calibration in the new unit, so a calibration of 10 um per pixel converted to millimeters would be .01 mm per pixel. This conversion cannot take place if the calibration is not currently based on an absolute physical unit from the list given in the Unit property documentation, or is based on the mcsuPixel or mcsuCustom units.
|