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

📄 wzvoxmap.hxx

📁 Delaunay三角形的网格剖分程序
💻 HXX
字号:
#ifndef wzvoxmap_hxx#define wzvoxmap_hxx#include "wzrange.hxx"typedef  short unsigned int wzGrayValue;const wzGrayValue  wzWhite = 0xff;const wzGrayValue  wzBlack = 0x00;class wzGrayScaleTable{  wzSimpleRange ranges;  wzArray<wzGrayValue>  min;  wzArray<wzGrayValue>  max;  wzArray<wzByte>  value;  wzByte mvalue;public:  wzGrayScaleTable();  wzIndex addRange(wzByte v, wzGrayValue min, wzGrayValue max);  wzByte operator()(wzGrayValue v) const;};// overlap rule: for a given gray value, the first non-trivial range counts;// (this convention makes testing faster)class wzGrayScaleVoxmap{  wzArray<wzGrayValue>	g;  int Lx;  int Ly;  int Lz;public:  int      lx() const {return Lx;}  int      ly() const {return Ly;}  int      lz() const {return Lz;}  wzGrayValue  operator()(int x, int y, int z) const     {return g[x+Lx*(y+Ly*z)];}  wzGrayValue& operator()(int x, int y, int z)    {return g[x+Lx*(y+Ly*z)];}  wzGrayScaleVoxmap(int lx, int ly, int lz);  //  wzGrayScaleVoxmap(wzString file);  //  void    save(wzString fname) const;  //  int     print() const;};class wzByteVoxmap{protected:  wzArray<wzByte>	map;	// one byte per pixel	  int	Lx;		// pixel in x-direction	  int	Ly;		// pixel in y-direction  int	Lz;		// pixel in z-direction  int	Lv;		// number of values (0..Lv-1)public:  int     lx() const {return Lx;}  int     ly() const {return Ly;}  int     lz() const {return Lz;}  wzByte  operator()(int x, int y, int z) const     {return map[x+Lx*(y+Ly*z)];}  wzByte& operator()(int x, int y, int z)    {return map[x+Lx*(y+Ly*z)];}  wzByteVoxmap(int lx, int ly, int lz);  // does not initialize values!!  wzByteVoxmap(const wzGrayScaleVoxmap& tmap, 		 const wzGrayScaleTable& table);  // wzByteVoxmap(wzString header, wzString data);  // wzByteVoxmap(wzString fname, const wzGrayScaleTable& table);};#endif

⌨️ 快捷键说明

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