private void OnHMouseUp(object sender, HMouseEventArgs e) { double z_byte = MyGlobal.GoSDK.z_byte_resolution == 0 ? ((int)255 / MyGlobal.globalConfig.zRange): MyGlobal.GoSDK.z_byte_resolution; double z_start = MyGlobal.GoSDK.zStart == 0 ? MyGlobal.globalConfig.zStart : MyGlobal.GoSDK.zStart; HObject reg; HOperatorSet.Threshold(MyGlobal.ImageMulti[idx][1], out reg, z_start, 50); HTuple per, min, max, range; HOperatorSet.MinMaxGray(reg, MyGlobal.ImageMulti[idx][1], 0, out min, out max, out range); byte[] grayArr = new byte[5]; grayArr[0] = (byte)Math.Ceiling(((double)min + (double)(range / 5) - z_start) * z_byte); grayArr[1] = (byte)Math.Ceiling(((double)min + (double)(range / 4) - z_start) * z_byte); grayArr[2] = (byte)Math.Ceiling(((double)min + (double)(range / 4 * 2) - z_start) * z_byte); grayArr[3] = (byte)Math.Ceiling(((double)min + (double)(range / 4 * 3) - z_start) * z_byte); grayArr[4] = (byte)Math.Ceiling(((double)max - (double)(range / 5) - z_start) * z_byte); PseudoColor.markColor(pictureBox1, pictureBox2, grayArr, z_byte, z_start); reg.Dispose(); hWindow_Final1.hWindowControl.HMouseUp -= OnHMouseUp; hWindow_Final1.hWindowControl.HMouseWheel -= OnHMouseUp; }
void Update() { range = GetComponent <Light>().range; intensity = GetComponent <Light>().intensity; color = GetComponent <Light>().color; }