00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef __mitkImageScene_h
00012 #define __mitkImageScene_h
00013
00014 #include "mitkScene.h"
00015 #include "mitkRCPtr.h"
00016 #include "mitkVolume.h"
00017
00039 class MITK_VISUALIZATION_API mitkImageScene : public mitkScene
00040 {
00041 public:
00042 MITK_TYPE(mitkImageScene,mitkScene)
00043
00044 mitkImageScene();
00045 mitkImageScene(mitkSceneContainer* container);
00046
00050 virtual void InitGL();
00054 virtual void ResizeGL(int newX, int newY);
00058 virtual void RenderGL();
00063 virtual mitkManipulator* CreateManipulator();
00083 void GetDataValueAndCoordinate(int mIdx, int x, int y, int &vx, int &vy, int &vz, float &rValue, float &gValue, float &bValue);
00097 void GetVolumeCoordinate(int mIdx, int x, int y, int &vx, int &vy, int &vz);
00108 void GetViewCoordinate(int mIdx, int vx, int vy, int vz, int &sx, int &sy);
00114 void AdjustWidthCenter(float deltX, float deltY);
00119 float GetWindowWidth();
00124 float GetWindowCenter();
00129 void SetWindowWidth(float winWidth);
00134 void SetWindowCenter(float winCenter);
00138 void ResetWindowWidthCenter();
00143 void EnableCrossArrow() {m_CrossArrowEnabled = true;}
00148 void DisableCrossArrow() {m_CrossArrowEnabled = false;}
00155 void SetCrossArrow(bool isEnabled) {m_CrossArrowEnabled = isEnabled;}
00162 bool GetCrossArrow() {return m_CrossArrowEnabled;}
00167 void SetCrossArrowWidth(int width) {m_CrossArrowWidth = width;}
00172 void SetCrossArrowHeight(int height) {m_CrossArrowHeight = height;}
00177 int GetCrossArrowWidth() {return m_CrossArrowWidth;}
00182 int GetCrossArrowHeight() {return m_CrossArrowHeight;}
00187 void SetCrossArrowPositionX(float xPos) {m_CrossArrowPosition[0] = xPos;}
00192 void SetCrossArrowPositionY(float yPos) {m_CrossArrowPosition[1] = yPos;}
00200 void SetCrossArrowPosition(int mIdx, int vx, int vy);
00205 float GetCrossArrowPositionX() {return m_CrossArrowPosition[0];}
00210 float GetCrossArrowPositionY() {return m_CrossArrowPosition[1];}
00214 void ResetCrossArrowPosition();
00218 virtual void ResetScene();
00225 virtual void Translate(float deltX, float deltY, float deltZ = 0);
00233 virtual void Rotate(float deltX, float deltY, float deltZ);
00242 virtual void Rotate(float ax, float ay, float az, float angle) {};
00248 virtual void Rotate(const mitkQuaternion &q) {};
00255 virtual void SetRotation(float x, float y, float z);
00263 virtual void SetRotation(float ax, float ay, float az, float angle) {};
00268 virtual void SetRotation(const mitkQuaternion &q) {};
00274 virtual void Scale(float delt);
00275
00276 protected:
00277 virtual ~mitkImageScene();
00278 void _drawCrossArrow();
00279
00280 bool m_CrossArrowEnabled;
00281 int m_CrossArrowWidth;
00282 int m_CrossArrowHeight;
00283 float m_CrossArrowPosition[2];
00284
00285
00286 private:
00287 void _init();
00288 void _cleanUp();
00289
00290
00291 mitkImageScene(const mitkImageScene&);
00292 void operator=(const mitkImageScene&);
00293
00294 };
00295
00296
00297
00298
00299
00300
00301
00302
00303
00304
00305
00306
00307
00308
00309
00310
00311
00312
00313
00314
00315 #endif
00316