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

mitkCUDASegmentedVRScene.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 __mitkCUDASegmentedVRScene_h
00011 #define __mitkCUDASegmentedVRScene_h
00012 
00013 #include "mitkRCPtr.h"
00014 #include "mitkVis2Scene3D.h"
00015 #include "mitkCUDAVolumeRenderingIncludes.h"
00016 #include "modules/mitkCUDASegmentedVR.h"
00017 #include "mitkICVolume.h"
00018 #include "mitkRGBATransferFunction1D.h"
00019 #include "mitkPerformanceCounter.h"
00020 
00021 class mitkSegmentedVolumeLut;
00022 
00029 class MITK_CUDA_VOLUME_RENDERING_API mitkCUDASegmentedVRScene : public mitkVis2Scene3D
00030 {
00031 public:
00032     MITK_TYPE(mitkCUDASegmentedVRScene,mitkVis2Scene3D)
00033     mitkCUDASegmentedVRScene();
00034 
00038     virtual void RenderGL();
00039 
00044     void SetData(mitkICVolume *data);
00045 
00050     void SetMaskVolume(mitkICVolume *data);
00051 
00056     mitkICVolume* GetMaskVolume();
00057 
00061     void SetDataModified();
00062 
00066     void SetMaskModified();
00067 
00074     void SetBackGroundColor(float r,float g, float b);
00075 
00082     void GetBackGroundColor(float &r,float &g, float &b);
00083 
00088     mitkRGBATransferFunction1D* GetTransferFunction(int index);
00089 
00094     void SetTransferFunction(int index, mitkRGBATransferFunction1D* tf);
00095 
00101     void SetStdSampleDistance(float stdSampleDistance);
00102 
00108     float GetStdSampleDistance();
00109 
00114     void SetShade(bool shade);
00115     
00120     bool GetShade();
00121 
00125     void ShadeOn();
00126     
00130     void ShadeOff();
00131 
00138     void SetLightDirection(float x,float y,float z);
00139     
00146     void GetLightDirection(float &x,float &y,float &z);
00147 
00152     void SetLightIntensity(float intensity);
00153     
00160     void SetLightColor(float r,float g,float b);
00161 
00166     void SetAmbient(float value);
00167     
00172     float GetAmbient();
00173 
00178     void SetDiffuse(float value);
00179     
00184     float GetDiffuse();
00185 
00190     void SetSpecular(float value);
00191     
00196     float GetSpecular();
00197 
00202     void SetSpecularPower(float value);
00203     
00208     float GetSpecularPower();
00209 
00214     void RotateLightDirection(bool turnOn);
00215 
00219     virtual void OnMouseDown(int mouseButton, bool ctrlDown, bool shiftDown, int xPos, int yPos);
00223     virtual void OnMouseUp(int mouseButton, bool ctrlDown, bool shiftDown, int xPos, int yPos);
00227     virtual void OnMouseMove(bool ctrlDown, bool shiftDown, int xPos, int yPos);
00228 
00233     void SetIllustrativeShading(int illustrative);
00234 
00239     bool GetIllustrativeShading();
00240 
00245     void SetCroppingBounds(const float CroppingBounds[6]);
00246 
00251     void GetCroppingBounds(float CroppingBounds[6]);
00252 
00253     mitkCUDASegmentedVR& GetKernelModule() { return m_module; }
00254     
00255 
00256 protected:
00257     virtual ~mitkCUDASegmentedVRScene();
00258     virtual void GetSize3D(float size[3]);
00259 
00260 private:
00261     mitkCUDASegmentedVRScene(const mitkCUDASegmentedVRScene&);
00262     void operator = (const mitkCUDASegmentedVRScene&);
00263 
00264 private:
00265     mitkRCPtr<mitkICVolume> m_Data;
00266     mitkRCPtr<mitkICVolume> m_Mask;
00267     mitkRCPtr<mitkRGBATransferFunction1D>* m_TFs;
00268     mitkLocalVersion* m_TFVersions;
00269 
00270     int m_SampleNumber;
00271 
00272     mitkSegmentedVolumeLut *m_CPU_LUT;
00273 
00274     mitkCUDASegmentedVR m_module;
00275     
00276     bool m_glewInit;
00277     bool m_dataModified;
00278     bool m_maskModified;
00279 
00280     bool m_RotateLightDirection;
00281     bool m_RotatingLightDirection;
00282 
00283     mitkVis2Vector4 m_OldLightDirection;
00284 
00285     TimeAverager m_TimeAverager1;
00286 };
00287 
00288 #endif

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