c#语言的参考了MedicalViewerDemo的代码,发现无法设置单位为cm,
cell.MeasurementUnit = MedicalViewerMeasurementUnit.Centimeters;
cell.CalibrateRuler(1.0, MedicalViewerMeasurementUnit.Centimeters);
MedicalViewerDemo的源码如下:
private void applyButton_Click(object sender, EventArgs e)
{
int subCellIndex = (_chkApplyToAll.Checked) ? -1 : -2;
((MainForm)this.Owner).ApplyToAll = _chkApplyToAll.Checked;
foreach (MedicalViewerMultiCell cell in ((MainForm)this.Owner).Viewer.Cells)
{
if (cell.Selected)
cell.CalibrateRuler(_txtDistance.Value, (MedicalViewerMeasurementUnit)(_cmbUnit.SelectedIndex), subCellIndex);
}
}
而c++ 语言的都是显示cm,c#都是显示in单位,切都设置无效 c++如图:
c#如图:
|