Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

specfvr.h

Go to the documentation of this file.
00001 #ifndef _vu1112118_H_
00002 #define _vu1112118_H_
00003 
00004 #include <string>
00005 #include <fstream.h>
00006 
00007 #include "vuSimpleTypes.h"
00008 #include "vuVector.h"
00009 #include "vuColour31a.h"
00010 #include "vuImage.h"
00011 #include "vuSpectralImage.h"
00012 
00013 #include "SimpleDefs.h"
00014 #include "Filter.h"
00015 #include "VolSet.h"
00016 
00017 #include "../intensity.h"
00018 
00019 class vu1112118;
00020 typedef vu1112118 vuVolumeRegularUnimodal3d1B1ValSpecFVR;
00021 
00022 class vu1112118 : public vu111211
00023 {
00024 public:
00025     vu1112118();
00026     ~vu1112118();
00027 
00029     virtual bool read();
00030 
00032     virtual bool readRaw(void);
00033 
00035     void render();
00036 
00038     void setLight(const vuColour31a& light);
00039     
00041     void setViewVectors(const vuVector& view,const vuVector& up,const vuVector& right);
00042 
00043     friend void exit_fun();
00044     
00045     // Assignment operator for the volume class.
00046     vu1112118& operator=(const vu1112118& rhs);
00047 
00052     void preprocess(void);
00053 
00055     void updateSImage();
00056 
00057     void write_fvr(char* out);// const;
00058     bool read_fvr(ifstream& fin, dword XSize, dword YSize, dword ZSize, dword d_size);
00059 
00060     bool doTempFilesExist(string fileName);
00061     void ensureTempDirectory();
00062 
00063  public:
00064     // Scale and bias the frequency slice into the rgb
00065     // slice.
00066     void scaleAndBias(void);
00067     
00068     void setDepthCueing(bool flag);
00069     
00070     void setIsDiffuseShading(bool flag);
00071     bool isDiffuseShading();
00072 
00073     void reset_refine();
00074 
00075     void doRefresh() {
00076         m_Volumes.m_Recomp = true;
00077     }
00078     
00079     void setLightDir(const vuVector &lightdir) {
00080         m_LightDir = lightdir;
00081     }
00082 
00087     void doSpectral(bool doit=true);
00088     
00089 //window management
00091     void resize(int w, int h);
00092     
00094     bool keyboard(unsigned char key, int x, int y);
00095 
00096     float getZeroPas() {
00097         return m_ZeroPad;
00098     }
00099 
00100     void setOversample(float oversample) {
00101         m_Oversample = oversample;
00102     }
00103     void setZeroPad(float zeropad) {
00104         m_ZeroPad = zeropad;
00105     }
00106 
00107     float getOversample() {
00108         return m_Oversample;
00109     }
00110 
00111     vuImage* getImage() {
00112         return &m_Image;
00113     }
00114             
00115  private:
00116     VolumeSet   m_Volumes;
00117     float       m_ZeroPad;
00118     float       m_Oversample;
00119         
00120     SpecFVRNS::Filter *m_Filter;
00121 
00122     int     m_ScreenWidth;
00123     int     m_ScreenHeight;
00124     float   m_SliceXScale;
00125     float   m_SliceYScale;
00126     float   m_Scale;
00127 
00128     int m_currFilter;
00129 
00130     vuSpectralImage m_SImage;
00131     vuImage         m_Image;
00132         
00134     dword num_div;
00135     dword x_pass_add;
00136     dword y_pass_add;
00137 
00138     dword x_stop;
00139     dword y_stop;
00140     dword x_pass;
00141     dword y_pass;
00142     
00143     dword refined;
00144 
00145     float m_LightIntensity;
00146     bool m_Relight;             
00147     bool m_DoSpectral;          
00148     
00149     vuVector m_LightDir;
00150     
00151 };
00152 
00153 #endif

Generated on Wed Dec 15 21:20:31 2004 for vuVolume by  doxygen 1.3.9.1