00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef __mitkEndoscopySliceScene_h
00011 #define __mitkEndoscopySliceScene_h
00012
00013 #include "mitkVisualization2Includes.h"
00014 #include "mitkSceneBase.h"
00015 #include "modules/mitkEndoscopySliceRendering.h"
00016
00017 class mitkSceneParam;
00018
00022 class MITK_VISUALIZATION2_API mitkEndoscopySliceScene : public mitkSceneBase
00023 {
00024 public:
00025 MITK_TYPE(mitkEndoscopySliceScene,mitkSceneBase)
00026 mitkEndoscopySliceScene();
00027
00031 virtual void RenderGL();
00032
00037 void SetVolume(mitkCoherentVolume* vol);
00038
00043 mitkCoherentVolume* GetVolume();
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 mitkEndoscopySliceRendering& GetKernelModule() { return m_module; }
00151
00152
00153 protected:
00154 virtual ~mitkEndoscopySliceScene();
00155
00156 int m_OldMouseX,m_OldMouseY;
00157
00158 private:
00159 mitkEndoscopySliceScene(const mitkEndoscopySliceScene&);
00160 void operator = (const mitkEndoscopySliceScene&);
00161
00162 private:
00163 mitkEndoscopySliceRendering m_module;
00164 bool m_Horizontial;
00165 float m_GridSpacing;
00166 mitkSceneParam* m_SceneParam;
00167
00168 float m_RadPerPixel;
00169
00170 float m_oldWidth,m_oldCenter;
00171 bool m_AdjustingWidthCenter;
00172 bool m_Panning;
00173 bool m_Turning;
00174
00175 };
00176
00177 #endif