Main Page   Compound List   File List   Compound Members  

CTData.h

00001 // CTData.h: interface for the CCTData class.
00002 //
00004 
00005 #if !defined(AFX_CTDATA_H__B88F1DF0_961E_48F0_A1F3_D85BFC5863A1__INCLUDED_)
00006 #define AFX_CTDATA_H__B88F1DF0_961E_48F0_A1F3_D85BFC5863A1__INCLUDED_
00007 
00008 #if _MSC_VER > 1000
00009 #pragma once
00010 #endif // _MSC_VER > 1000
00011 
00012 #include "MyMathUtils.h"
00013 #include "fftw.h"
00014 
00015 extern int shift;
00016 
00017 const int fact=340;   //factor used for scaling in OpenGL
00018 
00019 const double pi=3.1415926535;
00020 const double pi_mul_2=6.28318530718;
00021 
00022 
00023 
00028 class CCTData  
00029 {
00030 
00031 public:
00032 
00033         int dimX;   //number of data elements in x-direction
00034         int dimY;   //number of data elements in y-direction
00035         int dimZ;   //number of data elements in z-direction
00036         int dimU;   //number of data elements to be rendered in u-direction
00037         int dimV;   //number of data elements to be rendered in v-direction
00038 
00039 //      float data[dimX][dimY][dimZ];         //array of data to be transformed for FHT3D
00040 //      float show[dimU][dimV];               //array of data to be transformed for FHT2D
00041         fftw_complex *data;                   //array of data to be transformed for FFT3D
00042         fftw_complex *show;                   //array of data to be transformed for FFT2D
00043         GLubyte *show1;                                           //array of data to be rendered
00044         fftwnd_plan p2D;                      //plan to perform FFT2D
00045         fftwnd_plan p3D;                      //plan to perform FFT3D
00046         float hlp[256];                       //helper array
00047         Vektor3f viewPoint[4];                //coordinate cross
00048         Vektor3f viewDir;                     //viewing direction
00049 
00056         struct Header
00057         {
00058                 short xDim, yDim, zDim;
00059         };
00060 
00061         Header header;
00062 
00063 
00068         CCTData()
00069         {
00070                 Initialize();   
00071         }
00072 
00073 
00078         virtual ~CCTData()
00079         {
00080                 Destroy();
00081         }
00082 
00086         void showData();
00087 
00094         void extractPlane();
00095 
00099         void getData(CString fileName);
00100 
00105         void setViewDir();
00106 
00110         void setViewPoints();
00111 
00115         void drawViewPoints();
00116 
00120         void RotateViewX(float angle);
00121 
00125         void RotateViewY(float angle);
00126 
00127 protected:
00128 
00132         void Initialize();
00133 
00139         void Destroy();
00140 
00147         int linear(float t, float *coeff);
00148 
00152         void FHT3D();
00153 
00157         void FHT2D();
00158 
00162         void FFT3D();
00163 
00167         void FFT2D();
00168 
00172         void shift3D();
00173 
00177         void shift2D();
00178 
00182         float sqr(float d);
00183 
00190         void vector_hartley_transform(float* v, unsigned long size,     long stride);
00191 
00192 
00193 };
00194 
00195 #endif // !defined(AFX_CTDATA_H__B88F1DF0_961E_48F0_A1F3_D85BFC5863A1__INCLUDED_)

Generated on Sun Dec 16 15:49:30 2001 for Fourier Volume Renderer by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001