⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 densitytable.h

📁 3D reconstruction, medical image processing from colons, using intel image processing for based clas
💻 H
字号:
#ifndef _DENSITYTABLE_H_#define _DENSITYTABLE_H_#include <xmmintrin.h>#include "SummedAreaTable.h"#define DENSITY_RANGE (4096)class RxDensityTable {protected:		RxSummedAreaTable	m_SAT;	float m_afOpacityCorrectionTable[256];	const __m128 *m_pTable;	// 寇何俊辑 且寸	__m128 *m_pOpacityCorrectedTable;	__m128 *m_pPreIntegratedTable;		void		MakeOpacityCorrectionTable(float fSpacing);	void		MakeOpacityCorrectedDensityTable(float fSpacing);	void		MakePreIntegratedTable();public:	RxDensityTable();	~RxDensityTable();	void		operator=(const RxDensityTable& info);	void		SetSpectrumTable(__m128 *pTable);	void		InitRendering(float fSpacing);	int			IsTransparent(unsigned short nMax, unsigned short nMin) {return !m_SAT.LookUp(nMax, nMin);}	int			IsTransparent(unsigned short nDensity) {return _mm_comieq_ss(m_pOpacityCorrectedTable[nDensity], _mm_setzero_ps());}	// Get Color	__m128		GetColor(unsigned short nDensity) {	return m_pOpacityCorrectedTable[nDensity];}	void		GetColor(int nDensity, float fColor[4]) {_mm_storeu_ps(fColor, m_pOpacityCorrectedTable[nDensity]);}	__m128 GetPreIntegratedColor(int nPrevDensity, int nCurrentDensity) {		int nMaxDensity = __max(nPrevDensity, nCurrentDensity);		int nMinDensity = __min(nPrevDensity, nCurrentDensity);		__m128 vColor = _mm_sub_ps(m_pPreIntegratedTable[nMaxDensity], m_pPreIntegratedTable[nMinDensity]);		int nRange = nMaxDensity - nMinDensity + 1;		__m128 vRange = _mm_set1_ps((float)nRange);	// cvt肺 函券		vRange = _mm_rcp_ps(vRange);		return _mm_mul_ps(vColor, vRange);	}	void		GetPreIntegratedColor(int nPrevDensity, int nCurrentDensity, float fColor[4]) {		int nMaxDensity = __max(nPrevDensity, nCurrentDensity);		int nMinDensity = __min(nPrevDensity, nCurrentDensity);		__m128 vColor = _mm_sub_ps(m_pPreIntegratedTable[nMaxDensity], m_pPreIntegratedTable[nMinDensity-1]);		int nRange = nMaxDensity - nMinDensity + 1;		__m128 vRange = _mm_set1_ps((float)nRange);	// cvt肺 函券		vRange = _mm_rcp_ps(vRange);		_mm_storeu_ps(fColor, _mm_mul_ps(vColor, vRange));	}};#endif

⌨️ 快捷键说明

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