00001 #ifndef _VUVOLUMEBCCUNIMODAL3D_H_ 00002 #define _VUVOLUMEBCCUNIMODAL3D_H_ 00003 00004 #include "../unimodal.h" 00005 00006 class vu1512; 00007 typedef vu1512 vuVolumeBccUnimodal3d; 00008 00010 class vu1512 : public vu151 00011 { 00012 public: 00014 vu1512(); 00016 vu1512(const vu1512& inst); 00017 00019 vu1512& operator=(const vu1512& rhs); 00020 00022 dword getDim1Size(void) const; 00024 dword getDim2Size(void) const; 00026 dword getDim3Size(void) const; 00027 00029 00032 dword getSpacing(void) const; 00033 00035 int getDim1Origin(void) const; 00037 int getDim2Origin(void) const; 00039 int getDim3Origin(void) const; 00040 00044 vuVector getVoxelPosition(int x, int y, int z) const; 00045 00047 vuVector getCenter() const { 00048 return getVoxelPosition(m_Dim1Size, m_Dim2Size, m_Dim3Size)*0.5f; 00049 } 00050 00051 protected: 00053 00057 virtual bool read(FILE *file); 00059 00061 virtual bool write(FILE *file); 00062 00063 static const float T = 1.41421356; 00064 00065 protected: 00067 dword m_Dim1Size; 00069 dword m_Dim2Size; 00071 dword m_Dim3Size; 00072 00074 dword m_Spacing; 00075 00077 int m_Dim1Origin; 00079 int m_Dim2Origin; 00081 int m_Dim3Origin; 00082 public: 00084 void preview(int hint=0); 00085 00086 private: 00087 void drawBox(float sx, float sy, float sz); 00088 }; 00089 00090 #endif