Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

mitkCUDAFullVRScene.h

00001 /*=========================================================================
00002 
00003   Program:   3DMed
00004   Date:      $Date: 2014-02-25 18:30:00 +0800 $
00005   Version:   $Version: 4.6.0 $
00006   Copyright: MIPG, Institute of Automation, Chinese Academy of Sciences
00007 
00008 =========================================================================*/
00009 
00010 #ifndef __mitkCUDAFullVRScene_h
00011 #define __mitkCUDAFullVRScene_h
00012 
00013 #include "mitkRCPtr.h"
00014 #include "mitkVis2Scene3D.h"
00015 #include "mitkCUDAVolumeRenderingIncludes.h"
00016 #include "modules/mitkCUDAFullVR.h"
00017 #include "mitkICVolume.h"
00018 #include "mitkRGBATransferFunction1D.h"
00019 
00026 class MITK_CUDA_VOLUME_RENDERING_API mitkCUDAFullVRScene : public mitkVis2Scene3D
00027 {
00028 public:
00029     MITK_TYPE(mitkCUDAFullVRScene,mitkVis2Scene3D)
00030     mitkCUDAFullVRScene();
00031 
00035     virtual void RenderGL();
00036 
00041     void SetData(mitkICVolume *data);
00042 
00046     void SetDataModified();
00047 
00054     void SetBackGroundColor(float r,float g, float b);
00055 
00062     void GetBackGroundColor(float &r,float &g, float &b);
00063 
00068     mitkRGBATransferFunction1D* GetTransferFunction();
00069 
00074     void SetTransferFunction(mitkRGBATransferFunction1D* tf);
00075 
00081     void SetStdSampleDistance(float stdSampleDistance);
00082 
00088     float GetStdSampleDistance();
00089 
00094     void SetShade(bool shade);
00095     
00100     bool GetShade();
00101 
00105     void ShadeOn();
00106     
00110     void ShadeOff();
00111 
00118     void SetLightDirection(float x,float y,float z);
00119     
00126     void GetLightDirection(float &x,float &y,float &z);
00127 
00132     void SetLightIntensity(float intensity);
00133     
00140     void SetLightColor(float r,float g,float b);
00141 
00146     void SetAmbient(float value);
00147     
00152     float GetAmbient();
00153 
00158     void SetDiffuse(float value);
00159     
00164     float GetDiffuse();
00165 
00170     void SetSpecular(float value);
00171     
00176     float GetSpecular();
00177 
00182     void SetSpecularPower(float value);
00183     
00188     float GetSpecularPower();
00189 
00194     void RotateLightDirection(bool turnOn);
00195 
00199     virtual void OnMouseDown(int mouseButton, bool ctrlDown, bool shiftDown, int xPos, int yPos);
00203     virtual void OnMouseUp(int mouseButton, bool ctrlDown, bool shiftDown, int xPos, int yPos);
00207     virtual void OnMouseMove(bool ctrlDown, bool shiftDown, int xPos, int yPos);
00208     
00213     void SetIllustrativeShading(int illustrative);
00214 
00219     bool GetIllustrativeShading();
00220 
00225     void SetCroppingBounds(const float CroppingBounds[6]);
00226 
00231     void GetCroppingBounds(float CroppingBounds[6]);
00232 
00237     void SetPreintegration(bool preInt);
00238 
00243     bool GetPreintegration();
00244 
00245     mitkCUDAFullVR& GetKernelModule() { return m_module; }
00246     
00247 
00248 protected:
00249     virtual ~mitkCUDAFullVRScene();
00250     virtual void GetSize3D(float size[3]);
00251 
00252 private:
00253     mitkCUDAFullVRScene(const mitkCUDAFullVRScene&);
00254     void operator = (const mitkCUDAFullVRScene&);
00255 
00256 private:
00257     mitkRCPtr<mitkICVolume> m_Data;
00258     mitkRCPtr<mitkRGBATransferFunction1D> m_TF;
00259 
00260     mitkLocalVersion m_TFVersion;
00261 
00262     mitkCUDAFullVR m_module;
00263     
00264     bool m_glewInit;
00265     bool m_dataModified;
00266 
00267     bool m_RotateLightDirection;
00268     bool m_RotatingLightDirection;
00269 
00270     mitkVis2Vector4 m_OldLightDirection;
00271 
00272     bool m_PreIntegration;
00273 };
00274 
00275 #endif

Generated on Tue Feb 25 15:00:36 2014 for MITK (Medical Imaging ToolKit) by  doxygen 1.4.3