annotationobject.h

来自「3D reconstruction, medical image process」· C头文件 代码 · 共 54 行

H
54
字号
#ifndef _ANNOTATIONOBJECT_H_#define _ANNOTATIONOBJECT_H_#include <math.h>static const COLORREF LINECOLOR=RGB(0,135,195);static const COLORREF AREACOLOR=RGB(245,239,126);static const COLORREF VOLUMECOLOR=RGB(245,153,119);static const int VOLUME=0;static const int AREA=1;static const int LINE=2;class RxMeasurement{public:	int nType;	double fMeasurement;	BOOL bValid;	// not finished yet 	COLORREF color;	CPoint ptTextOffset; };class RxLine : public RxMeasurement{public:	int iFrom[3], iTo[3];	CPoint ptFrom, ptTo;	RxLine() { color=LINECOLOR; ptTextOffset=CPoint(20,-100); }	double MakeDistance() {		int delta[3];		delta[0] = iTo[0] - iFrom[0];		delta[1] = iTo[1] - iFrom[1];		delta[2] = iTo[2] - iFrom[2];		fMeasurement = sqrt(delta[0]*delta[0] + delta[1]*delta[1] + delta[2]*delta[2]);		return fMeasurement;	}};class RxArea : public RxMeasurement{public:	double a,b;		// ellipse, mm	int x,y,z;	RxArea() { color=AREACOLOR; ptTextOffset=CPoint(-100,20);}};class RxVolume : public RxMeasurement{public:	int x,y,z;	RxVolume() { color=VOLUMECOLOR; ptTextOffset=CPoint(100,-50);}};#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?