Exemplo n.º 1
0
void mitk::USZonesInteractor::ConnectActionsAndFunctions()
{
  CONNECT_FUNCTION("addCenter", AddCenter);
  CONNECT_FUNCTION("changeRadius", ChangeRadius);
  CONNECT_FUNCTION("endCreation", EndCreation);
  CONNECT_FUNCTION("abortCreation", AbortCreation);
}
void mitk::ContourTool::ConnectActionsAndFunctions()
{
  CONNECT_FUNCTION( "PrimaryButtonPressed", OnMousePressed);
  CONNECT_FUNCTION( "Move", OnMouseMoved);
  CONNECT_FUNCTION( "Release", OnMouseReleased);
  CONNECT_FUNCTION( "InvertLogic", OnInvertLogic);
}
void mitk::ContourModelInteractor::ConnectActionsAndFunctions()
{
  CONNECT_CONDITION("checkisOverPoint", OnCheckPointClick);
  CONNECT_CONDITION("mouseMove", IsHovering);

  CONNECT_FUNCTION("movePoints", OnMovePoint);
  CONNECT_FUNCTION("deletePoint", OnDeletePoint);
  CONNECT_FUNCTION("finish", OnFinishEditing);
}
Exemplo n.º 4
0
void mitk::TubeGraphDataInteractor::ConnectActionsAndFunctions()
{
  // **Conditions** that can be used in the state machine, to ensure that certain conditions are met, before actually
  // executing an action
  CONNECT_CONDITION("isOverTube", CheckOverTube);

  // **Function** in the statmachine patterns also referred to as **Actions**
  CONNECT_FUNCTION("selectTube", SelectTube);
  CONNECT_FUNCTION("deselectTube", DeselectTube);
}
void mitk::SurfaceDeformationDataInteractor3D::ConnectActionsAndFunctions()
{
  // **Conditions** that can be used in the state machine, to ensure that certain conditions are met, before
  // actually executing an action
  CONNECT_CONDITION("isOverObject", CheckOverObject);

  // **Function** in the statmachine patterns also referred to as **Actions**
  CONNECT_FUNCTION("selectObject",SelectObject);
  CONNECT_FUNCTION("deselectObject",DeselectObject);
  CONNECT_FUNCTION("initDeformation",InitDeformation);
  CONNECT_FUNCTION("deformObject",DeformObject);
  CONNECT_FUNCTION("scaleRadius", ScaleRadius);
}
Exemplo n.º 6
0
void mitk::PointSetDataInteractor::ConnectActionsAndFunctions()
{
  CONNECT_FUNCTION("addpoint", AddPoint);
  CONNECT_FUNCTION("selectpoint", SelectPoint);
  CONNECT_FUNCTION("unselect", UnSelectPoint);
  CONNECT_FUNCTION("initMove", InitMove);
  CONNECT_FUNCTION("initMovePointSet", InitMoveAll);
  CONNECT_FUNCTION("movePoint", MovePoint);
  CONNECT_FUNCTION("movePointSet", MoveSet);
  CONNECT_FUNCTION("finishMovement", FinishMove);
  CONNECT_FUNCTION("removePoint", RemovePoint);
}
void mitk::AffineImageCropperInteractor::ConnectActionsAndFunctions()
{
  // **Conditions** that can be used in the state machine, to ensure that certain conditions are met, before actually executing an action
  CONNECT_CONDITION("isOverObject", CheckOverObject);

  // **Function** in the statmachine patterns also referred to as **Actions**
  CONNECT_FUNCTION("selectObject",SelectObject);
  CONNECT_FUNCTION("deselectObject",DeselectObject);
  CONNECT_FUNCTION("initTranslate",InitTranslate);
  CONNECT_FUNCTION("initRotate",InitRotate);
  CONNECT_FUNCTION("initDeformation",InitDeformation);
  CONNECT_FUNCTION("translateObject",TranslateObject);
  CONNECT_FUNCTION("rotateObject",RotateObject);
  CONNECT_FUNCTION("deformObject",DeformObject);
  CONNECT_FUNCTION("scaleRadius",ScaleRadius);
}
Exemplo n.º 8
0
void mitk::DisplayInteractor::ConnectActionsAndFunctions()
{
  CONNECT_FUNCTION("init", Init);
  CONNECT_FUNCTION("move", Move);
  CONNECT_FUNCTION("zoom", Zoom);
  CONNECT_FUNCTION("scroll", Scroll);
  CONNECT_FUNCTION("ScrollOneDown", ScrollOneDown);
  CONNECT_FUNCTION("ScrollOneUp", ScrollOneUp);
  CONNECT_FUNCTION("levelWindow", AdjustLevelWindow);
}
Exemplo n.º 9
0
void mitk::PointSetDataInteractor::ConnectActionsAndFunctions()
{
  // Condition which is evaluated before transition is taken
  // following actions in the statemachine are only executed if it returns TRUE
  CONNECT_CONDITION("isoverpoint", CheckSelection);
  CONNECT_FUNCTION("addpoint", AddPoint);
  CONNECT_FUNCTION("selectpoint", SelectPoint);
  CONNECT_FUNCTION("unselect", UnSelectPointAtPosition);
  CONNECT_FUNCTION("unselectAll", UnSelectAll);
  CONNECT_FUNCTION("initMove", InitMove);
  CONNECT_FUNCTION("movePoint", MovePoint);
  CONNECT_FUNCTION("finishMovement", FinishMove);
  CONNECT_FUNCTION("removePoint", RemovePoint);
}
Exemplo n.º 10
0
void mitk::LiveWireTool2D::ConnectActionsAndFunctions()
{
  CONNECT_CONDITION("CheckContourClosed", OnCheckPoint);

  CONNECT_FUNCTION("InitObject", OnInitLiveWire);
  CONNECT_FUNCTION("AddPoint", OnAddPoint);
  CONNECT_FUNCTION("CtrlAddPoint", OnAddPoint);
  CONNECT_FUNCTION("MovePoint", OnMouseMoveNoDynamicCosts);
  CONNECT_FUNCTION("FinishContour", OnFinish);
  CONNECT_FUNCTION("DeletePoint", OnLastSegmentDelete);
  CONNECT_FUNCTION("CtrlMovePoint", OnMouseMoved);
}
Exemplo n.º 11
0
void mitk::GizmoInteractor::ConnectActionsAndFunctions()
{
  CONNECT_CONDITION("PickedHandle", HasPickedHandle);

  CONNECT_FUNCTION("DecideInteraction", DecideInteraction);
  CONNECT_FUNCTION("MoveAlongAxis", MoveAlongAxis);
  CONNECT_FUNCTION("RotateAroundAxis", RotateAroundAxis);
  CONNECT_FUNCTION("MoveFreely", MoveFreely);
  CONNECT_FUNCTION("ScaleEqually", ScaleEqually);
  CONNECT_FUNCTION("FeedUndoStack", FeedUndoStack);
}
Exemplo n.º 12
0
void mitk::FastMarchingTool::ConnectActionsAndFunctions()
{
  CONNECT_FUNCTION( "ShiftSecondaryButtonPressed", OnAddPoint);
  CONNECT_FUNCTION( "ShiftPrimaryButtonPressed", OnAddPoint);
  CONNECT_FUNCTION( "DeletePoint", OnDelete);
}
Exemplo n.º 13
0
void mitk::SetRegionTool::ConnectActionsAndFunctions()
{
  CONNECT_FUNCTION("PrimaryButtonPressed", OnMousePressed);
  CONNECT_FUNCTION("Release", OnMouseReleased);
  CONNECT_FUNCTION("Move", OnMouseMoved);
}
Exemplo n.º 14
0
void mitk::PlanarFigureInteractor::ConnectActionsAndFunctions()
{
  CONNECT_CONDITION("figure_is_on_current_slice", CheckFigureOnRenderingGeometry);
  CONNECT_CONDITION("figure_is_placed", CheckFigurePlaced);
  CONNECT_CONDITION("minimal_figure_is_finished", CheckMinimalFigureFinished);
  CONNECT_CONDITION("hovering_above_figure", CheckFigureHovering);
  CONNECT_CONDITION("hovering_above_point", CheckControlPointHovering);
  CONNECT_CONDITION("figure_is_selected", CheckSelection);
  CONNECT_CONDITION("point_is_valid", CheckPointValidity);
  CONNECT_CONDITION("figure_is_finished", CheckFigureFinished);
  CONNECT_CONDITION("reset_on_point_select_needed", CheckResetOnPointSelect);
  CONNECT_CONDITION("points_can_be_added_or_removed", CheckFigureIsExtendable);
  CONNECT_CONDITION("figure_can_be_deleted", CheckFigureIsDeletable);
  CONNECT_CONDITION("figure_is_editable", CheckFigureIsEditable);


  CONNECT_FUNCTION( "finalize_figure", FinalizeFigure);
  CONNECT_FUNCTION( "hide_preview_point", HidePreviewPoint )
  CONNECT_FUNCTION( "hide_control_points", HideControlPoints )
  CONNECT_FUNCTION( "set_preview_point_position", SetPreviewPointPosition )
  CONNECT_FUNCTION( "move_current_point", MoveCurrentPoint);
  CONNECT_FUNCTION( "deselect_point", DeselectPoint);
  CONNECT_FUNCTION( "add_new_point", AddPoint);
  CONNECT_FUNCTION( "add_initial_point", AddInitialPoint);
  CONNECT_FUNCTION( "remove_selected_point", RemoveSelectedPoint);
  CONNECT_FUNCTION( "request_context_menu", RequestContextMenu);
  CONNECT_FUNCTION( "select_figure", SelectFigure );
  CONNECT_FUNCTION( "select_point", SelectPoint );
  CONNECT_FUNCTION( "end_interaction", EndInteraction );
  CONNECT_FUNCTION( "start_hovering", StartHovering )
  CONNECT_FUNCTION( "end_hovering", EndHovering );
  CONNECT_FUNCTION( "delete_figure", DeleteFigure );
  CONNECT_FUNCTION( "reset_on_point_select", PerformPointResetOnSelect );
}
  }
}

ExampleImageInteractor::ExampleImageInteractor()
{
}

ExampleImageInteractor::~ExampleImageInteractor()
{
}

void ExampleImageInteractor::ConnectActionsAndFunctions()
{
  // Wire up this interactor with the state machine that is described by
  // resource/Interactions/Paint.xml.
  CONNECT_FUNCTION("paint", Paint)
}

void ExampleImageInteractor::DataNodeChanged()
{
  // You almost always want to reset the state machine when the interactor
  // has been attached to another data node.
  this->ResetToStartState();
}

// The state machine is wired up with this Paint method. We wrote a few helper
// functions at the top of this files to keep this method clear and easy to
// read.
void ExampleImageInteractor::Paint(mitk::StateMachineAction*, mitk::InteractionEvent* event)
{
  try
Exemplo n.º 16
0
void mitk::USPointMarkInteractor::ConnectActionsAndFunctions()
{
  CONNECT_FUNCTION("addPoint", AddPoint);
}
Exemplo n.º 17
0
void mitk::AffineBaseDataInteractor3D::ConnectActionsAndFunctions()
{
  // **Conditions** that can be used in the state machine, to ensure that certain conditions are met, before actually executing an action
  CONNECT_CONDITION("isOverObject", CheckOverObject);

  // **Function** in the statmachine patterns also referred to as **Actions**
  CONNECT_FUNCTION("selectObject",SelectObject);
  CONNECT_FUNCTION("deselectObject",DeselectObject);
  CONNECT_FUNCTION("initTranslate",InitTranslate);
  CONNECT_FUNCTION("initRotate",InitRotate);
  CONNECT_FUNCTION("translateObject",TranslateObject);
  CONNECT_FUNCTION("rotateObject",RotateObject);
  CONNECT_FUNCTION("scaleObject", ScaleObject);

  CONNECT_FUNCTION("translateUpKey",TranslateUpKey);
  CONNECT_FUNCTION("translateDownKey",TranslateDownKey);
  CONNECT_FUNCTION("translateLeftKey",TranslateLeftKey);
  CONNECT_FUNCTION("translateRightKey",TranslateRightKey);
  CONNECT_FUNCTION("translateUpModifierKey",TranslateUpModifierKey);
  CONNECT_FUNCTION("translateDownModifierKey",TranslateDownModifierKey);

  CONNECT_FUNCTION("scaleDownKey",ScaleDownKey);
  CONNECT_FUNCTION("scaleUpKey",ScaleUpKey);

  CONNECT_FUNCTION("rotateUpKey",RotateUpKey);
  CONNECT_FUNCTION("rotateDownKey",RotateDownKey);
  CONNECT_FUNCTION("rotateLeftKey",RotateLeftKey);
  CONNECT_FUNCTION("rotateRightKey",RotateRightKey);
  CONNECT_FUNCTION("rotateUpModifierKey",RotateUpModifierKey);
  CONNECT_FUNCTION("rotateDownModifierKey",RotateDownModifierKey);
}