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

mitkCUDAEndoscopySliceScene.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 __mitkCUDAEndoscopySliceScene_h
00011 #define __mitkCUDAEndoscopySliceScene_h
00012 
00013 #include "mitkCUDAVolumeRenderingIncludes.h"
00014 #include "mitkSceneBase.h"
00015 #include "modules/mitkCUDAEndoscopySliceRendering.h"
00016 
00017 class mitkSceneParam;
00018 
00022 class MITK_CUDA_VOLUME_RENDERING_API mitkCUDAEndoscopySliceScene : public mitkSceneBase
00023 {
00024 public:
00025     MITK_TYPE(mitkCUDAEndoscopySliceScene,mitkSceneBase)
00026     mitkCUDAEndoscopySliceScene();
00027 
00031     virtual void RenderGL();
00032 
00037     void SetVolumeTexture(mitkCUDAVolumeTexture* tex);
00038 
00043     mitkCUDAVolumeTexture* GetVolumeTexture();
00044 
00050     void SetVolumeInfo(int dims[3], float spacings[3]);
00051 
00055     void SetHorizontial() { m_Horizontial=true; } 
00059     void SetVertical() { m_Horizontial=false; } 
00064     bool IsHorizontial() { return m_Horizontial;}
00065 
00070     void SetGridSpacing(float spacing) { m_GridSpacing=spacing; }
00071 
00076     float GetGridSpacing() { return m_GridSpacing; }
00077 
00082     void SetSceneParam(mitkSceneParam* sceneParam) { m_SceneParam=sceneParam; }
00083 
00088     mitkSceneParam* GetSceneParam() { return m_SceneParam;}
00089 
00095     void SetWidthCenter(float windowWidth,float windowCenter);
00096 
00101     void SetWindowWidth(float windowWidth);
00102 
00107     void SetWindowCenter(float windowCenter);
00108 
00113     float GetWindowWidth();
00114 
00119     float GetWindowCenter();
00120 
00124     virtual void OnMouseDown(int mouseButton, bool ctrlDown, bool shiftDown, int xPos, int yPos);
00128     virtual void OnMouseUp(int mouseButton, bool ctrlDown, bool shiftDown, int xPos, int yPos);
00132     virtual void OnMouseMove(bool ctrlDown, bool shiftDown, int xPos, int yPos);
00136     virtual void OnMouseWheel(bool ctrlDown, bool shiftDown, int xPos, int yPos, int delta);
00137 
00142     void SetRotateRadPerPixel(float radPerPixel) { m_RadPerPixel=radPerPixel;}
00143 
00148     float GetRotateRadPerPixel() const { return m_RadPerPixel; }
00149 
00150 
00151     mitkCUDAEndoscopySliceRendering& GetKernelModule() { return m_module; }
00152 
00153 
00154 protected:
00155     virtual ~mitkCUDAEndoscopySliceScene();
00156 
00157     int m_OldMouseX,m_OldMouseY;
00158 
00159 private:
00160     mitkCUDAEndoscopySliceScene(const mitkCUDAEndoscopySliceScene&);
00161     void operator = (const mitkCUDAEndoscopySliceScene&);
00162 
00163 private:
00164     mitkCUDAEndoscopySliceRendering m_module;
00165     bool m_glewInit;
00166     bool m_Horizontial;
00167     float m_GridSpacing;
00168     mitkSceneParam* m_SceneParam;
00169 
00170     float m_RadPerPixel;
00171 
00172     float m_oldWidth,m_oldCenter;
00173     bool m_AdjustingWidthCenter;
00174     bool m_Panning;
00175     bool m_Turning;
00176 
00177 };
00178 
00179 #endif

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