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

mitkCUDAAugmentedSurfaceVRScene.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 __mitkCUDAAugmentedSurfaceVRScene_h
00011 #define __mitkCUDAAugmentedSurfaceVRScene_h
00012 
00013 #include "mitkRCPtr.h"
00014 #include "mitkVis2Scene3D.h"
00015 #include "mitkCUDAVolumeRenderingIncludes.h"
00016 #include "modules/mitkCUDAAugmentedSurfaceVR.h"
00017 #include "mitkICVolume.h"
00018 #include "mitkRGBATransferFunction1D.h"
00019 
00027 class MITK_CUDA_VOLUME_RENDERING_API mitkCUDAAugmentedSurfaceVRScene : public mitkVis2Scene3D
00028 {
00029     struct PeelingWidget;
00030     class PeelingWidgetList;
00031 public:
00032     MITK_TYPE(mitkCUDAAugmentedSurfaceVRScene,mitkVis2Scene3D)
00033     mitkCUDAAugmentedSurfaceVRScene();
00034 
00038     virtual void RenderGL();
00039 
00044     void SetData(mitkICVolume *data);
00045 
00049     void SetDataModified();
00050 
00057     void SetBackGroundColor(float r,float g, float b);
00058 
00065     void GetBackGroundColor(float& r,float& g,float& b);
00066     
00071     void SetIsovalue(float isovalue);
00072 
00077     float GetIsovalue();
00078 
00085     void SetLightDirection(float x,float y,float z);
00086 
00093     void GetLightDirection(float &x,float &y,float &z);
00094 
00099     void SetLightIntensity(float intensity);
00100 
00107     void SetLightColor(float r,float g,float b);
00108 
00113     void SetAmbient(float value);
00114 
00119     float GetAmbient();
00120 
00125     void SetDiffuse(float value);
00126 
00131     float GetDiffuse();
00132 
00137     void SetSpecular(float value);
00138 
00143     float GetSpecular();
00144 
00149     void SetSpecularPower(float value);
00150 
00155     float GetSpecularPower();
00156 
00161     void SetDensityFactor(float densityFactor);
00162 
00167     float GetDensityFactor();
00168 
00173     mitkRGBATransferFunction1D* GetTransferFunction();
00174 
00179     void SetTransferFunction(mitkRGBATransferFunction1D* tf);
00180 
00185     void RotateLightDirection(bool turnOn);
00186 
00190     virtual void OnMouseDown(int mouseButton, bool ctrlDown, bool shiftDown, int xPos, int yPos);
00194     virtual void OnMouseUp(int mouseButton, bool ctrlDown, bool shiftDown, int xPos, int yPos);
00198     virtual void OnMouseMove(bool ctrlDown, bool shiftDown, int xPos, int yPos);
00199 
00203     void BeginAddPeelingWidget();
00207     int GetCurrentWidgetLayerNumber();
00211     void SetCurrentWidgetLayerNumber(int number);
00215     void RemoveCurrentPeelingWidget();
00216 
00221     void SetCroppingBounds(const float CroppingBounds[6]);
00222 
00227     void GetCroppingBounds(float CroppingBounds[6]);
00228 
00229     mitkCUDAAugmentedSurfaceVR& GetKernelModule() { return m_module; }
00230 
00231 protected:
00232     virtual ~mitkCUDAAugmentedSurfaceVRScene();
00233     virtual void GetSize3D(float size[3]);
00234 
00235 private:
00236     mitkCUDAAugmentedSurfaceVRScene(const mitkCUDAAugmentedSurfaceVRScene&);
00237     void operator = (const mitkCUDAAugmentedSurfaceVRScene&);
00238 
00239     void _renderPeelWidget(const PeelingWidget& widget);
00240     void _renderPickedPeelWidget(const PeelingWidget& widget);
00241 
00242     void _updatePeelBuffer();
00243     void _pick(int x,int y);
00244     
00245 private:
00246     mitkRCPtr<mitkICVolume> m_Data;
00247     mitkRCPtr<mitkRGBATransferFunction1D> m_TF;
00248 
00249     mitkLocalVersion m_TFVersion;
00250 
00251     mitkCUDAAugmentedSurfaceVR m_module;
00252 
00253     bool m_glewInit;
00254     bool m_dataModified;
00255 
00256     bool m_RotateLightDirection;
00257     bool m_RotatingLightDirection;
00258     
00259     mitkVis2Vector4 m_OldLightDirection;
00260 
00262     PeelingWidgetList *m_PeelingWidgetList;
00263     bool m_AddPeelingWidget;
00264     bool m_AddingPeelingWidget;
00265 
00266     bool m_PeelDraging;
00267     int m_PickedPeelingWidgetID;
00268     int m_PeelDragVertexID;
00269 
00270 };
00271 
00272 #endif

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