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

mitkCUDAIsosurfaceVRScene.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 __mitkCUDAIsosurfaceVRScene_h
00011 #define __mitkCUDAIsosurfaceVRScene_h
00012 
00013 #include "mitkRCPtr.h"
00014 #include "mitkVis2Scene3D.h"
00015 #include "mitkCUDAVolumeRenderingIncludes.h"
00016 #include "modules/mitkCUDAIsosurfaceVR.h"
00017 #include "mitkICVolume.h"
00018 
00025 class MITK_CUDA_VOLUME_RENDERING_API mitkCUDAIsosurfaceVRScene : public mitkVis2Scene3D
00026 {
00027 public:
00028     MITK_TYPE(mitkCUDAIsosurfaceVRScene,mitkVis2Scene3D)
00029     mitkCUDAIsosurfaceVRScene();
00030 
00034     virtual void RenderGL();
00035 
00040     void SetData(mitkICVolume *data);
00041 
00045     void SetDataModified();
00046 
00053     void SetBackGroundColor(float r,float g, float b);
00054 
00061     void GetBackGroundColor(float& r,float& g,float& b);
00062     
00067     void SetIsovalue(float isovalue);
00068 
00073     float GetIsovalue();
00074 
00081     void SetSurfaceColor(float r,float g,float b);
00082 
00089     void GetSurfaceColor(float &r,float &g,float &b);
00090 
00097     void SetLightDirection(float x,float y,float z);
00098 
00105     void GetLightDirection(float &x,float &y,float &z);
00106 
00111     void SetLightIntensity(float intensity);
00112 
00119     void SetLightColor(float r,float g,float b);
00120 
00125     
00126     void SetAmbient(float value);
00131     float GetAmbient();
00132 
00137     void SetDiffuse(float value);
00138 
00143     float GetDiffuse();
00144 
00149     void SetSpecular(float value);
00150 
00155     float GetSpecular();
00156 
00161     void SetSpecularPower(float value);
00162 
00167     float GetSpecularPower();
00168 
00169     // Ray Casting
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 SetIllustrativeShading(int illustrative);
00195 
00200     bool GetIllustrativeShading();
00201 
00206     void SetCroppingBounds(const float CroppingBounds[6]);
00207 
00212     void GetCroppingBounds(float CroppingBounds[6]);
00213 
00214     mitkCUDAIsosurfaceVR& GetKernelModule() { return m_module; }
00215 
00216 protected:
00217     virtual ~mitkCUDAIsosurfaceVRScene();
00218     virtual void GetSize3D(float size[3]);
00219 
00220 private:
00221     mitkCUDAIsosurfaceVRScene(const mitkCUDAIsosurfaceVRScene&);
00222     void operator = (const mitkCUDAIsosurfaceVRScene&);
00223     
00224 private:
00225     mitkRCPtr<mitkICVolume> m_Data;
00226     
00227 
00228     mitkCUDAIsosurfaceVR m_module;
00229     
00230     bool m_glewInit;
00231     bool m_dataModified;
00232 
00233     bool m_RotateLightDirection;
00234     bool m_RotatingLightDirection;
00235 
00236     mitkVis2Vector4 m_OldLightDirection;
00237 };
00238 
00239 #endif

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