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

mitkImageView Class Reference

mitkImageView - a view to display 2D images More...

#include <mitkImageView.h>

Inherits mitkView.

Inheritance diagram for mitkImageView:

Inheritance graph
[legend]
Collaboration diagram for mitkImageView:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual void PrintSelf (ostream &os)
void GetDataValueAndCoordinate (int mIdx, int x, int y, int &vx, int &vy, int &vz, float &rValue, float &gValue, float &bValue)
void GetVolumeCoordinate (int mIdx, int x, int y, int &vx, int &vy, int &vz)
void GetViewCoordinate (int mIdx, int vx, int vy, int vz, int &sx, int &sy)
void AdjustWidthCenter (float deltX, float deltY)
float GetWindowWidth ()
float GetWindowCenter ()
void SetWindowWidth (float winWidth)
void SetWindowCenter (float winCenter)
void ResetWindowWidthCenter ()
void EnableCrossArrow ()
void DisableCrossArrow ()
void SetCrossArrow (bool isEnabled)
bool GetCrossArrow ()
void SetCrossArrowWidth (int width)
void SetCrossArrowHeight (int height)
int GetCrossArrowWidth ()
int GetCrossArrowHeight ()
void SetCrossArrowPositionX (float xPos)
void SetCrossArrowPositionY (float yPos)
void SetCrossArrowPosition (int mIdx, int vx, int vy)
float GetCrossArrowPositionX ()
float GetCrossArrowPositionY ()
void ResetCrossArrowPosition ()

Detailed Description

mitkImageView - a view to display 2D images

mitkImageView is a 2d view to display 2-dimensional images. The purpose of providing it is for the convenience. To display 2d images, you must create one or several image models(mitkImageModel) firstly, then add them using the function

 AddModel() 
. Same as mitkView, mitkImageView can be easily integrated into any user interface toolkit, such as MFC in Microsoft Visual C++, VCL in Borland C++ Builder, Trolltech Qt, etc. The following code snippet demonstrate this point:
    mitkImageView *aView = new mitkImageView;
    //Set the parent window, and fill out the whole parent window
    aView->SetParent(parentWindowId);  
    aView->SetLeft(0);
    aView->SetTop(0);
    aView->SetWidth(parentWindowWidth);
    aView->SetHeight(parentWindowHeight);   
    aView->Show();
So mitkImageView only requires a parent window id and then can integrate into that window seamless. From Mitk 2.3, mitkImageView is decomposed into mitkGLWindow and mitkImageScene, it is recommanded to use those two classes instead of this one. This class serves as a wrapper that provides the compatibility to the tranditional routines.


Member Function Documentation

void mitkImageView::AdjustWidthCenter float  deltX,
float  deltY
[inline]
 

Adjust the window width and window center of this view

Parameters:
deltX Specify the change of the window width
deltY Specify the change of the window center

void mitkImageView::DisableCrossArrow  )  [inline]
 

Set the cross arrow to disable. If the cross arrow is enabled, the view will draw a cross arrow and a rectangle centered in the cross.

void mitkImageView::EnableCrossArrow  )  [inline]
 

Set the cross arrow to enable. If the cross arrow is enabled, the view will draw a cross arrow and a rectangle centered in the cross.

bool mitkImageView::GetCrossArrow  )  [inline]
 

Get the status of cross arrow. If the cross arrow is enabled, the view will draw a cross arrow and a rectangle centered in the cross.

Returns:
Return true, the cross arrow is enabled. Return false, the cross arrow is disabled.

int mitkImageView::GetCrossArrowHeight  )  [inline]
 

Get the height of the rectangle associated with the cross arrow.

Returns:
Return the height of the rectangle.

float mitkImageView::GetCrossArrowPositionX  )  [inline]
 

Get the x coordinate of the cross arrow center.

Returns:
Return the x coordinate of the cross arrow center.

float mitkImageView::GetCrossArrowPositionY  )  [inline]
 

Get the y coordinate of the cross arrow center.

Returns:
Return the y coordinate of the cross arrow center.

int mitkImageView::GetCrossArrowWidth  )  [inline]
 

Get the width of the rectangle associated with the cross arrow.

Returns:
Return the width of the rectangle.

void mitkImageView::GetDataValueAndCoordinate int  mIdx,
int  x,
int  y,
int &  vx,
int &  vy,
int &  vz,
float &  rValue,
float &  gValue,
float &  bValue
[inline]
 

Get the data value and volume coordinate at a specified view coordinate.

Parameters:
mIdx Specify the ith model. The data value and volume coordinate are got from this model.
x Specify the x coordinate in this view
y Specify the y coordinate in this view
vx Return the x coordinate in the volume. It is calculate by transforming the point(x,y) from view coordinate to volume coordinate.
vy Return the y coordinate in the volume. It is calculate by transforming the point(x,y) from view coordinate to volume coordinate.
vz Return the z coordinate in the volume. It is calculate by transforming the point(x,y) from view coordinate to volume coordinate.
rValue Return the red component of the data value at point(vx, vy, vz) in the volume. If the volume is gray image(single channel), then rValue = gValue = bValue
gValue Return the green component of the data value at point(vx, vy, vz) in the volume. If the volume is gray image(single channel), then rValue = gValue = bValue
bValue Return the blue component of the data value at point(vx, vy, vz) in the volume. If the volume is gray image(single channel), then rValue = gValue = bValue

void mitkImageView::GetViewCoordinate int  mIdx,
int  vx,
int  vy,
int  vz,
int &  sx,
int &  sy
[inline]
 

Get the view (screen) coordinate at a specified volume coordinate.

Parameters:
mIdx Specify the ith model. The data value and volume coordinate are got from this model.
vx the x coordinate in the volume.
vy the y coordinate in the volume.
vz the z coordinate in the volume.
x return the x coordinate in this view
y return the y coordinate in this view

void mitkImageView::GetVolumeCoordinate int  mIdx,
int  x,
int  y,
int &  vx,
int &  vy,
int &  vz
[inline]
 

Get the volume coordinate at a specified view coordinate.

Parameters:
mIdx Specify the ith model. The data value and volume coordinate are got from this model.
x Specify the x coordinate in this view
y Specify the y coordinate in this view
vx Return the x coordinate in the volume. It is calculate by transforming the point(x,y) from view coordinate to volume coordinate.
vy Return the y coordinate in the volume. It is calculate by transforming the point(x,y) from view coordinate to volume coordinate.
vz Return the z coordinate in the volume. It is calculate by transforming the point(x,y) from view coordinate to volume coordinate.

float mitkImageView::GetWindowCenter  )  [inline]
 

Get the window center of this view

Returns:
Return the window center of this view

float mitkImageView::GetWindowWidth  )  [inline]
 

Get the window width of this view

Returns:
Return the window width of this view

virtual void mitkImageView::PrintSelf ostream &  os  )  [virtual]
 

Print the necessary information about this object for the debugging purpose.

Parameters:
os The specified ostream to output information.

Reimplemented from mitkView.

void mitkImageView::ResetCrossArrowPosition  )  [inline]
 

Reset the center position and the rectangle size to the default value.

void mitkImageView::ResetWindowWidthCenter  )  [inline]
 

Reset the window width and center to the default value.

void mitkImageView::SetCrossArrow bool  isEnabled  )  [inline]
 

Set the status of cross arrow. If the cross arrow is enabled, the view will draw a cross arrow and a rectangle centered in the cross.

Parameters:
isEnabled isEnabled=true, Set the cross arrow to enable. isEnabled=false, Set the cross arrow to disable.

void mitkImageView::SetCrossArrowHeight int  height  )  [inline]
 

Set the height of the rectangle associated with the cross arrow.

Parameters:
height Specify the height of the rectangle.

void mitkImageView::SetCrossArrowPosition int  mIdx,
int  vx,
int  vy
[inline]
 

Set the cross arrow position according the volume coordinates of the mIdx'th model.

Parameters:
mIdx the index of the model (should be a mitkImageModel)
vx the x-coordinate in the volume space
vy the y-coordinate in the volume space

void mitkImageView::SetCrossArrowPositionX float  xPos  )  [inline]
 

Set the x coordinate of the cross arrow center.

Parameters:
xPos Specify the x coordinate of the cross arrow center.

void mitkImageView::SetCrossArrowPositionY float  yPos  )  [inline]
 

Set the y coordinate of the cross arrow center.

Parameters:
yPos Specify the y coordinate of the cross arrow center.

void mitkImageView::SetCrossArrowWidth int  width  )  [inline]
 

Set the width of the rectangle associated with the cross arrow.

Parameters:
width Specify the width of the rectangle.

void mitkImageView::SetWindowCenter float  winCenter  )  [inline]
 

Set the window center of this view

Parameters:
winCenter Specify the new window center of this view

void mitkImageView::SetWindowWidth float  winWidth  )  [inline]
 

Set the window width of this view

Parameters:
winWidth Specify the new window width of this view


The documentation for this class was generated from the following file:
Generated on Tue Feb 25 15:03:20 2014 for MITK (Medical Imaging ToolKit) by  doxygen 1.4.3