📄 rxysegment.h
字号:
// RxySegment.h: interface for the RxySegment class.////////////////////////////////////////////////////////////////////////#if !defined(AFX_RXYSEGMENT_H__9340C34E_80D4_4EDD_BE02_61F3B9F34051__INCLUDED_)#define AFX_RXYSEGMENT_H__9340C34E_80D4_4EDD_BE02_61F3B9F34051__INCLUDED_#if _MSC_VER > 1000#pragma once#endif // _MSC_VER > 1000class JJBinaryVolume;class RxProgressWnd;class RxMaskVolume;#include "primitive.h"class CQ{public: int GetQElement(int nIndex); bool IsFull(); bool IsEmpty(); int Dequeue(); void Enqueue(int nIndex); void Clear(); int GetItemCount() { return (m_nIndexEnqueue-m_nIndexDequeue); } int GetEnqueueCount() { return m_nIndexEnqueue; } int GetDequeueCount() { return m_nIndexDequeue; } CQ(int MaxCount); // CQ class 积己磊 ~CQ(); // CQ class 家戈磊protected: int m_nMaxElement; // Q sizeprivate: int *m_pQElement; int m_nIndexDequeue; int m_nIndexEnqueue;};class RxySegment {public: float ContourTracking_CurvatureCalculation(RxMaskVolume* pMask, int &nCnt, int nStart, int nEnd); float CalculateDistance(CPoint pt1, CPoint pt2); int ConnectTwoPoints(CPoint pt1, CPoint pt2, int nSliceNum, unsigned short* pTempVolume, RxMaskVolume* pMask, RxMaskVolume* pLRMask); float CalculateCurvature(CPoint prev, CPoint curr, CPoint next); int m_nReduceRate; int m_nBifurcationStep; int m_nThreshold; int m_nIterationSmoothing; int m_nNumOfErosion; // Number of erosion for left and right lung separation float m_fRemoveBack; int m_nOffsetL; int m_nOffsetAR; int m_nOffsetAF; int m_nThresholdAR; int m_nThresholdAF; int m_nSliceOffset; float m_fCarinaRatio; float m_fQueueRatio; int m_nVisualize; CPoint* m_ptSeed; unsigned char* m_pLabel; unsigned char* m_pLowLabel; int m_iSliceSize; unsigned int m_iVolumeSize; int m_iVolX, m_iVolY, m_iSliceNum; int m_nStopCriteriaR, m_nStopCriteriaF; int m_nAirwaySrgStepUpperR, m_nAirwaySrgStepUpperF; int m_nAirwaySrgStepLowerR, m_nAirwaySrgStepLowerF; bool m_bPostProcessing; float m_fTolerance; int m_nBifurThreshold; // 捞 农扁 捞惑狼 哪器惩飘肺 哎扼瘤搁 bifurcation栏肺 埃林 bool m_bLungSeparation; int m_nVesselThresholdR, m_nVesselThresholdF; // variable for smoothing unsigned int** m_ppFeatureR, ** m_ppFeatureL; unsigned short *m_nNumOfFeatureR, *m_nNumOfFeatureL; RxySegment(); virtual ~RxySegment(); BOOL SRG3D_LineMinMax(float SeedX, float SeedY, float SeedZ, unsigned short *pImg, BYTE *pLabel, int nMin, int nMax, RxProgressWnd *pWndProgress ); BOOL SRG2D_MinMax(float SeedX, float SeedY, unsigned short *pImg, BYTE *pLabel, int nMin, int nMax); BOOL SRG2D_8n_forLineTracking(CPoint seed2D, unsigned char *pImg, BYTE *pLabel, int iteration_step, CPoint* pContour, int &nNumOfPoint); BOOL EdgeDetection(int nMode); BOOL SegmentUpperAirway(RxPoint3D<int> point, BYTE *pLabel, unsigned short *pVolume, int nMin, int nMaxTrachea, int &nMax, int nStopCriteria, int nStep, RxPoint3D<int> &ptBifurcation); BOOL SRG_26connected(RxPoint3D<int> point, BYTE *pLabel, unsigned short *pVolume, int nMin, int nMaxTrachea, int nMax, int nStopCriteria, int nSrgStep); BOOL MedianFilter(unsigned short *pSrc, unsigned short *pDst, int width, int height); BOOL Open(unsigned char* pSrc, unsigned char* pDst, int width, int height, int iIter); BOOL Close(unsigned char* pSrc, unsigned char* pDst, int width, int height, int iIter); BOOL Close_CircleMask(unsigned char *pSrc, unsigned char *pDst, int width, int height, int iIter); BOOL Erose(unsigned char *pSrc, unsigned char *pDst, int width, int height, int iIter); BOOL Dilate(unsigned char *pSrc, unsigned char *pDst, int width, int height, int iIter); BOOL Dilate_CircleMask(unsigned char *pSrc, unsigned char *pDst, int width, int height, int iIter); BOOL Erose_CircleMask(unsigned char *pSrc, unsigned char *pDst, int width, int height, int iIter); void ControlProgress(RxProgressWnd *pProWnd); void Segmentation(int nMode); void Segmentation_For_Airway(int nMode); void Segmentation_For_Vessel(int nMode); void Segmentation_For_Perfusion(int nMode); void NoduleSegmentation(int nMode); BOOL AirwaySegmentation(unsigned short* pVolume, unsigned short* pTempVolume, int nMode, bool bSubtract); void LungSegmentation(unsigned short* pTempVolume); void LungSegmentation_WithoutVessel(unsigned short* pTempVolume);// void SearchBoundingBox(unsigned short* pVolume, unsigned short* pTempVolume, RxProgressWnd *pWndProgress); void Find2DSeedPoint(unsigned short* pTempVolume, int thresholdmin, int thresholdmax); void SetPatientNumber(); void Evaluation(int nMode); int OptimalThresholding(unsigned short *pTempVolume, int &threshold); int CalculateHistogram(unsigned short *pTempVolume); int AutomaticThresholdSelection(unsigned short *pTempVolume); void swap(int *a, int *b); void swap(float *a, float *b);};#endif // !defined(AFX_RXYSEGMENT_H__9340C34E_80D4_4EDD_BE02_61F3B9F34051__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -