#include <mitkPolygonWidgetModel2D.h>
Inherits mitkWidgetModel2D.
Inheritance diagram for mitkPolygonWidgetModel2D:
Public Member Functions | |
virtual void | PrintSelf (ostream &os) |
virtual int | Render (mitkScene *scene) |
virtual void | Pick (const WidgetNames &names) |
virtual void | Release () |
void | AddPoint (int sx, int sy) |
void | AddPoint (float x, float y) |
void | AddPoint (float point[2]) |
void | MoveCurrentPoint (int sx, int sy) |
void | MoveCurrentPoint (float x, float y) |
void | MoveCurrentPoint (float point[2]) |
void | SetUnitName (const string &name) |
const string & | GetUnitName () |
float | GetArea () |
float | GetPerimeter () |
bool | GetCurrentPoint (float &x, float &y) |
bool | GetCurrentPoint (int &ix, int &iy) |
int | GetPointsNumber () |
bool | GetPoint (int idx, float &x, float &y) |
bool | GetPoint (int idx, int &ix, int &iy) |
virtual mitkVolume * | GetRegionMask () |
Protected Member Functions | |
virtual void | _onMouseDown (int mouseButton, bool ctrlDown, bool shiftDown, int xPos, int yPos) |
virtual void | _onMouseUp (int mouseButton, bool ctrlDown, bool shiftDown, int xPos, int yPos) |
virtual void | _onMouseMove (bool ctrlDown, bool shiftDown, int xPos, int yPos, int deltaX, int deltaY) |
mitkPolygonWidgetModel2D a 2D widget for displaying an arbitrary polygon in an image scene. It can respond the mouse events and return the current area of this arbitrary polygon. It is supposed to be attached to a 2D data model (e.g. mitkImageModel) and add to a 2D scene (e.g. mitkImageScene), and in other conditions the display could be improper.
|
Deal with mouse down event.
Implements mitkWidgetModel. |
|
Deal with mouse move event.
Implements mitkWidgetModel. |
|
Deal with mouse up event.
Implements mitkWidgetModel. |
|
Add point.
|
|
Add point.
|
|
Add point.
|
|
Get area of this polygon.
|
|
Get currently picked point in the original image.
|
|
Get currently picked point in object space (affected by pixel spacing).
|
|
Get perimeter of this polygon.
|
|
Get the integral coordinates of the ith point in the original image.
|
|
Get the coordinates of the ith point in object space (affected by pixel spacing).
|
|
Get the number of points.
|
|
Get mask image where the value of widget region is 255 and the rest is 0.
Reimplemented from mitkWidgetModel2D. |
|
Get name string of unit.
|
|
Move current point.
|
|
Move current point.
|
|
Move current point.
|
|
Maintain the selection status when this widget is picked.
Implements mitkWidgetModel. |
|
Print the necessary information about this object for the debugging purpose.
Reimplemented from mitkWidgetModel2D. |
|
Maintain the selection status when this widget is released. Implements mitkWidgetModel. |
|
Render this model.
Reimplemented from mitkModel. |
|
Set name string of unit.
|