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

mitkImageView.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 
00011 #ifndef __mitkImageView_h
00012 #define __mitkImageView_h
00013 
00014 #include "mitkImageScene.h"
00015 #include "mitkView.h"
00016 
00041 class MITK_VISUALIZATION_API mitkImageView : public mitkView
00042 {
00043 public:
00044     MITK_TYPE(mitkImageView,mitkView)
00045 
00046     virtual void PrintSelf(ostream& os);
00047     
00067     void GetDataValueAndCoordinate(int mIdx, int x, int y, int &vx, int &vy, int &vz, float &rValue, float &gValue, float &bValue)
00068     {
00069         m_ImageScene->GetDataValueAndCoordinate(mIdx,x,y,vx,vy,vz,rValue,gValue,bValue);
00070     }
00071 
00085     void GetVolumeCoordinate(int mIdx, int x, int y, int &vx, int &vy, int &vz)
00086     {
00087         m_ImageScene->GetVolumeCoordinate(mIdx,x,y,vx,vy,vz);
00088     }
00089 
00100     void GetViewCoordinate(int mIdx, int vx, int vy, int vz, int &sx, int &sy)
00101     {
00102         m_ImageScene->GetViewCoordinate(mIdx,vx,vy,vz,sx,sy);
00103     }
00104 
00114     //void GetObjectCoordinate(int x, int y, float &ox, float &oy);
00115 
00123     //void GetObjectCoordinateDelta(int dx, int dy, float &odx, float &ody);
00124 
00130     void AdjustWidthCenter(float deltX, float deltY)
00131     {
00132         m_ImageScene->AdjustWidthCenter(deltX,deltY);
00133     }
00134 
00139     float GetWindowWidth()
00140     {
00141         return m_ImageScene->GetWindowWidth();
00142     }
00143 
00148     float GetWindowCenter()
00149     {
00150         return m_ImageScene->GetWindowCenter();
00151     }
00152 
00157     void SetWindowWidth(float winWidth)
00158     {
00159         m_ImageScene->SetWindowWidth(winWidth);
00160     }
00161 
00166     void SetWindowCenter(float winCenter)
00167     {
00168         m_ImageScene->SetWindowCenter(winCenter);
00169     }
00170 
00174     void ResetWindowWidthCenter()
00175     {
00176         m_ImageScene->ResetWindowWidthCenter();
00177     }
00178 
00183     void EnableCrossArrow() 
00184     {
00185         m_ImageScene->EnableCrossArrow();
00186     }
00187 
00192     void DisableCrossArrow() 
00193     {
00194         m_ImageScene->DisableCrossArrow();
00195     }
00196 
00203     void SetCrossArrow(bool isEnabled) 
00204     {
00205         m_ImageScene->SetCrossArrow(isEnabled);
00206     }
00207 
00214     bool GetCrossArrow() 
00215     {
00216         return m_ImageScene->GetCrossArrow();
00217     }
00218 
00223     void SetCrossArrowWidth(int width) 
00224     {
00225         m_ImageScene->SetCrossArrowWidth(width);
00226     }
00227 
00232     void SetCrossArrowHeight(int height) 
00233     {
00234         m_ImageScene->SetCrossArrowHeight(height);
00235     }
00236 
00241     int GetCrossArrowWidth() 
00242     {
00243         return m_ImageScene->GetCrossArrowWidth();
00244     }
00245 
00250     int GetCrossArrowHeight()
00251     {
00252         return m_ImageScene->GetCrossArrowHeight();
00253     }
00254 
00259     void SetCrossArrowPositionX(float xPos) 
00260     {
00261         m_ImageScene->SetCrossArrowPositionX(xPos);
00262     }
00263 
00268     void SetCrossArrowPositionY(float yPos) 
00269     {
00270         m_ImageScene->SetCrossArrowPositionY(yPos);
00271     }
00279     void SetCrossArrowPosition(int mIdx, int vx, int vy)
00280     {
00281         m_ImageScene->SetCrossArrowPosition(mIdx,vx,vy);
00282     }
00283 
00288     float GetCrossArrowPositionX() 
00289     {
00290         return m_ImageScene->GetCrossArrowPositionX();
00291     }
00292 
00297     float GetCrossArrowPositionY() 
00298     {
00299         return m_ImageScene->GetCrossArrowPositionY();
00300     }
00301 
00305     void ResetCrossArrowPosition()
00306     {
00307         m_ImageScene->ResetCrossArrowPosition();
00308     }
00309 
00310     mitkImageScene * GetImageScene() {return m_ImageScene;}
00311 
00312     mitkImageView();
00313 
00314     
00315 protected:
00316     virtual ~mitkImageView();   
00317     mitkImageScene *m_ImageScene;
00318 
00319 private:
00320     mitkImageView(const mitkImageView&);
00321     void operator=(const mitkImageView&);
00322 
00323 };
00324 
00325 //inline void mitkImageView::GetObjectCoordinate(int x, int y, float &ox, float &oy)
00326 //{
00327 //  float invScale = 1.0f / m_Scale;
00328 //  ox = (2.0f * (x - m_ViewPort[0]) / m_ViewPort[2] - 1.0f - m_TransX) * invScale;
00329 //  oy = (2.0f * (y - m_ViewPort[1]) / m_ViewPort[3] - 1.0f + m_TransY) * invScale;
00330 //}
00331 //
00332 //inline void mitkImageView::GetObjectCoordinateDelta(int dx, int dy, float &odx, float &ody)
00333 //{
00334 //  float invScale = 1.0f / m_Scale;
00335 //  odx = 2.0f * dx * invScale / m_ViewPort[2];
00336 //  ody = - 2.0f * dy * invScale / m_ViewPort[3];
00337 //}
00338 
00339  
00340 //#define DEFINED_mitkImageView
00341  
00342 
00343 
00344 #endif
00345 

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