矩形2代码如下
//矩形2按钮功能 private void button2_Click(object sender, EventArgs e) { hWindowControl1.Focus(); HTuple hv_Row = null, hv_Column = null; HTuple hv_Phi = null, hv_Length1 = null, hv_Length2 = null; HOperatorSet.DrawRectangle2(settingWindow, out hv_Row, out hv_Column, out hv_Phi, out hv_Length1, out hv_Length2); if (this.checkBox1.Checked) { HOperatorSet.GenEmptyObj(out settingROI); settingROI.Dispose(); HOperatorSet.GenRectangle2(out settingROI, hv_Row, hv_Column, hv_Phi, hv_Length1, hv_Length2); HOperatorSet.WriteRegion(settingROI, pathModel + @"\ROIregion.reg");