📄 rxyconnectedcomponent.h
字号:
// RxyConnectedComponent.h: interface for the RxyConnectedComponent class.////////////////////////////////////////////////////////////////////////#if !defined(AFX_RXYCONNECTEDCOMPONENT_H__A2FA002E_1A51_4448_A2F7_C9942F3031B3__INCLUDED_)#define AFX_RXYCONNECTEDCOMPONENT_H__A2FA002E_1A51_4448_A2F7_C9942F3031B3__INCLUDED_#if _MSC_VER > 1000#pragma once#endif // _MSC_VER > 1000#include "primitive.h"class RxProgressWnd;class RxyConnectedComponent {protected: static int GetState(unsigned short *pMap, int nWidth, int nHeight, int nDepth, int x, int y, int z); static void SetLabelByState(unsigned short *pMap, int nWidth, int nHeight, int nDepth, int x, int y, int z, int *nLabel, int nState, unsigned int *pTable); static int FindFinalLabel(unsigned int *pTable, unsigned short nNowLabel);// static int FindFinalLabel(unsigned short *pTable, unsigned short nNowLabel); static int MapFillingWithSortedLabel(unsigned int *pTable, unsigned short *pMap, int nImageSize);// static int MapFillingWithSortedLabel(unsigned short *pTable, unsigned short *pMap, int nImageSize); static int GetState_26n(unsigned short *pMap, int nWidth, int nHeight, int nDepth, int x, int y, int z); static void SetLabelByState_26n(unsigned short *pMap, int nWidth, int nHeight, int nDepth, int x, int y, int z, int *nLabel, int nState, unsigned int *pTable);// static void SetLabelByState_26n(unsigned short *pMap, int nWidth, int nHeight, int nDepth, int x, int y, int z, int *nLabel, int nState, unsigned short *pTable); enum { COMP_NONE = 0, COMP_NEW = 10, COMP_XB_Y_Z = 20, //COMP_X COMP_X_YB_Z = 30, //COMP_Y COMP_X_Y_ZB = 40, //COMP_Z COMP_XB_YB_Z =50, //COMP_XY COMP_X_YB_ZB =60, //COMP_YZ COMP_XB_Y_ZB =70, //COMP_XBYZB COMP_XB_YB_ZB =80, // COMP_XBYBZB COMP_XA_Y_ZB = 90, //COMP_Z_XA COMP_XA_YB_Z = 100, // COMP_XAYBZ COMP_X_YA_ZB = 110, // COMP_XYAZB COMP_XA_YA_ZB = 120, //COMP_XAYAZB COMP_XA_YB_ZB = 130, // COMP_XAYBZB COMP_XB_YA_ZB = 140, // COMP_XBYAZB // XBYZ, 13 COMP_DIFF_XBYZ_XYBZ = 150, // COMP_DIFF_X_Y COMP_DIFF_XBYZ_XYZB = 160, // COMP_DIFF_X_Z COMP_DIFF_XBYZ_XBYBZ = 170, // COMP_DIFF_X_XY COMP_DIFF_XBYZ_XYBZB = 180, COMP_DIFF_XBYZ_XBYZB = 190, COMP_DIFF_XBYZ_XAYBZ = 200, COMP_DIFF_XBYZ_XAYZB = 210, COMP_DIFF_XBYZ_XYAZB = 220, COMP_DIFF_XBYZ_XBYAZB = 230, COMP_DIFF_XBYZ_XAYBZB = 240, COMP_DIFF_XBYZ_XAYAZB = 250, COMP_DIFF_XBYZ_XBYBZB = 260, // XYBZ, 11 COMP_DIFF_XYBZ_XYZB = 270, COMP_DIFF_XYBZ_XBYBZ = 280, COMP_DIFF_XYBZ_XYBZB = 290, COMP_DIFF_XYBZ_XBYZB = 300, COMP_DIFF_XYBZ_XAYBZ = 310, COMP_DIFF_XYBZ_XAYZB = 320, COMP_DIFF_XYBZ_XYAZB = 330, COMP_DIFF_XYBZ_XBYAZB = 340, COMP_DIFF_XYBZ_XAYBZB = 350, COMP_DIFF_XYBZ_XAYAZB = 360, COMP_DIFF_XYBZ_XBYBZB = 370, // XYZB, 5 COMP_DIFF_XYZB_XBYBZ = 380, COMP_DIFF_XYZB_XYBZB = 390, COMP_DIFF_XYZB_XBYZB = 400, COMP_DIFF_XYZB_XAYBZ = 410, COMP_DIFF_XYZB_XAYZB = 420, COMP_DIFF_XYZB_XYAZB = 430, COMP_DIFF_XYZB_XBYAZB = 440, COMP_DIFF_XYZB_XAYBZB = 450, COMP_DIFF_XYZB_XAYAZB = 460, COMP_DIFF_XYZB_XBYBZB = 470, // XBYBZ, 10 COMP_DIFF_XBYBZ_XYBZB = 480, COMP_DIFF_XBYBZ_XBYZB = 490, COMP_DIFF_XBYBZ_XAYBZ = 500, COMP_DIFF_XBYBZ_XAYZB = 510, COMP_DIFF_XBYBZ_XYAZB = 520, COMP_DIFF_XBYBZ_XBYAZB = 530, COMP_DIFF_XBYBZ_XAYBZB = 540, COMP_DIFF_XBYBZ_XAYAZB = 550, COMP_DIFF_XBYBZ_XBYBZB = 560, // XYBZB, 2 COMP_DIFF_XYBZB_XBYZB = 570, COMP_DIFF_XYBZB_XAYBZ = 580, COMP_DIFF_XYBZB_XAYZB = 590, COMP_DIFF_XYBZB_XYAZB = 600, COMP_DIFF_XYBZB_XBYAZB = 610, COMP_DIFF_XYBZB_XAYBZB = 620, COMP_DIFF_XYBZB_XAYAZB = 630, COMP_DIFF_XYBZB_XBYBZB = 640, // XBYZB, 4 COMP_DIFF_XBYZB_XAYBZ = 650, COMP_DIFF_XBYZB_XAYZB = 660, COMP_DIFF_XBYZB_XYAZB = 670, COMP_DIFF_XBYZB_XBYAZB = 680, COMP_DIFF_XBYZB_XAYBZB = 690, COMP_DIFF_XBYZB_XAYAZB = 700, COMP_DIFF_XBYZB_XBYBZB = 710, // XAYBZ, 12 COMP_DIFF_XAYBZ_XAYZB = 720, COMP_DIFF_XAYBZ_XYAZB = 730, COMP_DIFF_XAYBZ_XBYAZB= 740, COMP_DIFF_XAYBZ_XAYBZB= 750, COMP_DIFF_XAYBZ_XAYAZB= 760, COMP_DIFF_XAYBZ_XBYBZB= 770, // XAYBZB, 3 COMP_DIFF_XAYBZB_XYAZB = 780, //8 COMP_DIFF_XAYBZB_XBYAZB= 790, // 7 COMP_DIFF_XAYBZB_XAYZB= 800, //6 COMP_DIFF_XAYBZB_XAYAZB= 810, // 9 COMP_DIFF_XAYBZB_XBYBZB= 820, // 1 // XYAZB, 8 COMP_DIFF_XYAZB_XBYAZB= 830, COMP_DIFF_XYAZB_XBYBZB= 840, COMP_DIFF_XYAZB_XAYZB = 850, COMP_DIFF_XYAZB_XAYAZB= 860, // XBYAZB, 7 COMP_DIFF_XBYAZB_XAYZB = 870, COMP_DIFF_XBYAZB_XAYAZB = 880, COMP_DIFF_XBYAZB_XBYBZB = 890, // XBYBZB, 1 COMP_DIFF_XBYBZB_XAYZB = 900, COMP_DIFF_XBYBZB_XAYAZB = 910, // XAYZB, 6 COMP_DIFF_XAYZB_XAYAZB = 920, // XAYAZB, 9 COMP_DIFF_XBYZ_XYBZ_XYZB = 930, COMP_DIFF_XBYBZ_XYBZB_XBYZB = 940, COMP_DIFF_XBYBZ_XYBZB_XYAZB = 950, COMP_DIFF_XBYBZ_XYBZB_XAYZB = 960, COMP_DIFF_XBYBZ_XYBZB_XAYBZ = 970, COMP_DIFF_XBYBZ_XBYZB_XYAZB = 980, COMP_DIFF_XBYBZ_XBYZB_XAYZB = 990, COMP_DIFF_XBYBZ_XBYZB_XAYBZ = 1000, COMP_DIFF_XYBZB_XBYZB_XYAZB = 1010, COMP_DIFF_XYBZB_XBYZB_XAYZB = 1020, COMP_DIFF_XYBZB_XBYZB_XAYBZ = 1030, COMP_DIFF_XBYZ_XYBZ_XBYBZ = 1040, COMP_DIFF_XBYZ_XYBZ_XAYBZ = 1050, COMP_DIFF_XBYZ_XYZB_XBYBZ = 1060, COMP_DIFF_XBYZ_XYZB_XAYBZ = 1070, COMP_DIFF_XYBZ_XYZB_XBYBZ = 1080, COMP_DIFF_XYBZ_XYZB_XAYBZ = 1090, COMP_DIFF_XBYZ_XBYBZ_XAYBZ = 1100, COMP_DIFF_XYZB_XBYBZ_XAYBZ = 1110, COMP_DIFF_XYBZ_XBYBZ_XAYBZ = 1120, /* COMP_DIFF_XBYZ_XYBZ_XYZB = 930, COMP_DIFF_XBYBZ_XYBZB_XBYZB = 940, COMP_DIFF_XYBZ_XBYBZ_XAYBZ = 950, COMP_DIFF_XBYBZ_XYBZB_XYAZB = 960, COMP_DIFF_XBYBZ_XYBZB_XAYZB = 970, COMP_DIFF_XBYBZ_XYBZB_XAYBZ = 980, COMP_DIFF_XBYBZ_XBYZB_XYAZB = 990, COMP_DIFF_XBYBZ_XBYZB_XAYZB = 1000, COMP_DIFF_XBYBZ_XBYZB_XAYBZ = 1010, COMP_DIFF_XYBZB_XBYZB_XYAZB = 1020, COMP_DIFF_XYBZB_XBYZB_XAYZB = 1030, COMP_DIFF_XYBZB_XBYZB_XAYBZ = 1040, COMP_DIFF_XBYZ_Y_XY = 1050, COMP_DIFF_XBYZ_Y_XAYBZ = 1060, COMP_DIFF_XBYZ_Z_XY = 1070, COMP_DIFF_XBYZ_Z_XAYBZ = 1080, COMP_DIFF_XYBZ_Z_XY = 1090, COMP_DIFF_XYBZ_Z_XAYBZ = 1100, COMP_DIFF_XBYZ_XY_XAYBZ = 1110, // COMP_DIFF_XYBZ_XY_XAYBZ = 1120, COMP_DIFF_XYZB_XY_XAYBZ = 1120, */ COMP_SAME = 1130 }; public: RxyConnectedComponent(); virtual ~RxyConnectedComponent(); static int GetConnectedComponent(unsigned char *pMap, int nWidth, int nHeight, int nDepth, int nNumComp, int nThreshold, RxProgressWnd *pWndProgress=NULL); static int GetConnectedComponent_26n(unsigned char *pMap, int nWidth, int nHeight, int nDepth, int nThreshold, RxProgressWnd *pWndProgress=NULL); static int RemoveSmallComp(unsigned char *pMap, int nWidth, int nHeight, int nDepth, int nThreshold); static void ControlProgress(RxProgressWnd *pProWnd);};#endif // !defined(AFX_RXYCONNECTEDCOMPONENT_H__A2FA002E_1A51_4448_A2F7_C9942F3031B3__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -