www.pudn.com > Ì廿֯Âë.rar > slicer.h, change:2001-12-05,size:1114b


#ifndef __slicer_h__ 
#define __slicer_h__ 
 
#include "color.h" 
#include "transfunc.h" 
#include "volume.h" 
 
enum SliceOrientation { SO_XY, SO_XZ, SO_YZ }; 
 
//===== class Volume ============================================= 
 
class Slicer 
{ 
private: 
   Volume *m_volume; 
   TransferFunction *m_tf; 
   int m_slice_num; 
   int m_slice_width; 
   int m_slice_height; 
   int m_slice_size; 
   int m_slice_pos; 
   int m_slice_draw_width; 
   int m_slice_draw_height; 
   float m_slice_zoom; 
   rgba *m_slice_data; 
   SliceOrientation m_slice_orientation; 
 
   int m_threshold; 
   bool m_threshold_enabled; 
   bool m_usetf; 
  
   void SetSlicePixel(int x, int y, data_t data); 
 
public: 
	Slicer(Volume *vol, TransferFunction *tf); 
	~Slicer(); 
 
   void SetSliceOrientation(SliceOrientation so); 
   void SetSlicePos(int pos); 
   void SetSliceDrawSize(int width, int height); 
   int GetSliceNum(); 
   int GetSliceWidth(); 
   int GetSliceHeight(); 
 
   void SetThreshold(int threshold); 
   void UseThreshold(bool use); 
   void UseTransFunc(bool use); 
 
   void glDrawSlice(); 
}; 
 
#endif