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

mitkCUDAVersatileVRScene.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 __mitkCUDAVersatileVRScene_h
00011 #define __mitkCUDAVersatileVRScene_h
00012 
00013 #include "mitkRCPtr.h"
00014 #include "mitkVis2Scene3D.h"
00015 #include "mitkCUDAVolumeRenderingIncludes.h"
00016 #include "modules/mitkCUDAVersatileVR.h"
00017 #include "mitkICVolume.h"
00018 #include "mitkRGBATransferFunction1D.h"
00019 
00026 class MITK_CUDA_VOLUME_RENDERING_API mitkCUDAVersatileVRScene : public mitkVis2Scene3D
00027 {
00028 public:
00029     MITK_TYPE(mitkCUDAVersatileVRScene,mitkVis2Scene3D)
00030     mitkCUDAVersatileVRScene();
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(int index);
00069 
00074     void SetTransferFunction(int index, mitkRGBATransferFunction1D* tf);
00075 
00076     void SetStdScalarDifference(float stdScalarDifference);
00077     float GetStdScalarDifference();
00078 
00084     void SetStdSampleDistance(float stdSampleDistance);
00085 
00091     float GetStdSampleDistance();
00092 
00099     void SetLightDirection(float x,float y,float z);
00100     
00107     void GetLightDirection(float &x,float &y,float &z);
00108 
00113     void SetLightIntensity(float intensity);
00114     
00121     void SetLightColor(float r,float g,float b);
00122 
00127     void SetAmbient(float value);
00128     
00133     float GetAmbient();
00134 
00139     void SetDiffuse(float value);
00140     
00145     float GetDiffuse();
00146 
00151     void SetSpecular(float value);
00152     
00157     float GetSpecular();
00158 
00163     void SetSpecularPower(float value);
00164     
00169     float GetSpecularPower();
00170 
00175     void RotateLightDirection(bool turnOn);
00176 
00180     virtual void OnMouseDown(int mouseButton, bool ctrlDown, bool shiftDown, int xPos, int yPos);
00184     virtual void OnMouseUp(int mouseButton, bool ctrlDown, bool shiftDown, int xPos, int yPos);
00188     virtual void OnMouseMove(bool ctrlDown, bool shiftDown, int xPos, int yPos);
00189 
00194     void SetCroppingBounds(const float CroppingBounds[6]);
00195 
00200     void GetCroppingBounds(float CroppingBounds[6]);
00201 
00206     void SetPreintegration(bool preInt);
00207 
00212     bool GetPreintegration();
00213 
00214     mitkCUDAVersatileVR& GetKernelModule() { return m_module; }
00215     
00216 
00217 protected:
00218     virtual ~mitkCUDAVersatileVRScene();
00219     virtual void GetSize3D(float size[3]);
00220 
00221 private:
00222     mitkCUDAVersatileVRScene(const mitkCUDAVersatileVRScene&);
00223     void operator = (const mitkCUDAVersatileVRScene&);
00224 
00225 private:
00226     mitkRCPtr<mitkICVolume> m_Data;
00227     mitkRCPtr<mitkRGBATransferFunction1D> m_TFs[4];
00228 
00229     mitkLocalVersion m_TFVersions[4];
00230 
00231     mitkCUDAVersatileVR m_module;
00232     
00233     bool m_glewInit;
00234     bool m_dataModified;
00235 
00236     bool m_RotateLightDirection;
00237     bool m_RotatingLightDirection;
00238 
00239     mitkVis2Vector4 m_OldLightDirection;
00240 
00241     bool m_PreIntegration;
00242 };
00243 
00244 #endif

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