Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
This handler returns either the pixelvalue or anatomical label of the current position of the crosshair inside a visible parcellation. If no parcellation is visible no data is thrown. More...
#include <QmitkFreeSurferParcellationHandler.h>
Signals | |
void | changed (int) |
Emitted when pixelValue has changed. More... | |
void | changed (const QString &) |
Emitted when pixelValue has changed. More... | |
void | clicked (int) |
Thrown if and only if the left mousebutton is pressed and pixelValue has changed. More... | |
void | clicked (const QString &) |
Thrown if and only if the left mousebutton is pressed and pixelValue has changed. More... | |
void | scrolled (int) |
Thrown if mouse scrolled and pixelvalue changed. More... | |
void | scrolled (const QString &) |
Thrown if mouse scrolled and anatomcial labl changed. More... | |
Public Member Functions | |
mitkClassMacro (QmitkFreeSurferParcellationHandler, DataInteractor) static Pointer New() | |
QmitkFreeSurferParcellationHandler () | |
~QmitkFreeSurferParcellationHandler () | |
Public Member Functions inherited from mitk::EventStateMachine | |
virtual std::vector< std::string > | GetClassHierarchy () const override |
virtual const char * | GetClassName () const |
bool | LoadStateMachine (const std::string &filename, const us::Module *module=nullptr) |
Loads XML resource. More... | |
bool | HandleEvent (InteractionEvent *event, DataNode *dataNode) |
void | EnableUndo (bool enable) |
Enables or disabled Undo. More... | |
void | EnableInteraction (bool enable) |
Enables/disables the state machine. In un-enabled state it won't react to any events. More... | |
Public Member Functions inherited from mitk::InteractionEventHandler | |
bool | SetEventConfig (const std::string &filename, const us::Module *module=nullptr) |
Loads a configuration from an XML resource. More... | |
bool | SetEventConfig (const EventConfig &config) |
Loads a configuration from an EventConfig object. More... | |
EventConfig | GetEventConfig () const |
Returns the current configuration. More... | |
bool | AddEventConfig (const std::string &filename, const us::Module *module=nullptr) |
This method extends the configuration. More... | |
bool | AddEventConfig (const EventConfig &config) |
This method extends the configuration. The configuration from the EventConfig object is loaded and only the ones conflicting are replaced by the new one. This way several configurations can be combined. More... | |
Public Member Functions inherited from mitk::InteractionEventObserver | |
InteractionEventObserver () | |
virtual | ~InteractionEventObserver () |
void | Disable () |
void | Enable () |
bool | IsEnabled () const |
Protected Member Functions | |
virtual void | Notify (InteractionEvent *interactionEvent, bool isHandled) |
Protected Member Functions inherited from mitk::EventStateMachine | |
EventStateMachine () | |
virtual | ~EventStateMachine () |
void | AddActionFunction (const std::string &action, TActionFunctor *functor) |
void | AddActionFunction (const std::string &action, const ActionFunctionDelegate &delegate) |
void | AddConditionFunction (const std::string &condition, const ConditionFunctionDelegate &delegate) |
StateMachineState * | GetCurrentState () const |
void | ResetToStartState () |
ResetToStartState Reset state machine to it initial starting state. More... | |
virtual void | ConnectActionsAndFunctions () |
virtual bool | CheckCondition (const StateMachineCondition &condition, const InteractionEvent *interactionEvent) |
virtual void | ExecuteAction (StateMachineAction *action, InteractionEvent *interactionEvent) |
virtual bool | FilterEvents (InteractionEvent *interactionEvent, DataNode *dataNode) |
void | SetMouseCursor (const char *xpm[], int hotspotX, int hotspotY) |
Sets the specified mouse cursor. More... | |
void | ResetMouseCursor () |
Resets the mouse cursor (if modified by the SlicesCoordinator) to its original state. More... | |
StateMachineTransition * | GetExecutableTransition (InteractionEvent *event) |
Returns the executable transition for the given event. More... | |
Protected Member Functions inherited from mitk::InteractionEventHandler | |
InteractionEventHandler () | |
virtual | ~InteractionEventHandler () |
PropertyList::Pointer | GetAttributes () const |
std::string | MapToEventVariant (InteractionEvent *interactionEvent) |
virtual void | ConfigurationChanged () |
Protected Attributes | |
int | m_LastPixelvalue |
The current pixelvalue. More... | |
mitk::FreeSurferParcellationTranslator::Pointer | m_Translator |
Translator for coverting pixelvalue into anatomical label. More... | |
us::ServiceRegistration< InteractionEventObserver > | m_ServiceRegistration |
Protected Attributes inherited from mitk::EventStateMachine | |
bool | m_IsActive |
UndoController * | m_UndoController |
bool | m_UndoEnabled |
This handler returns either the pixelvalue or anatomical label of the current position of the crosshair inside a visible parcellation. If no parcellation is visible no data is thrown.
Definition at line 33 of file QmitkFreeSurferParcellationHandler.h.
US_USE_NAMESPACE QmitkFreeSurferParcellationHandler::QmitkFreeSurferParcellationHandler | ( | ) |
Definition at line 36 of file QmitkFreeSurferParcellationHandler.cpp.
References us::ModuleRegistry::GetModule(), us::Module::GetModuleContext(), and m_ServiceRegistration.
QmitkFreeSurferParcellationHandler::~QmitkFreeSurferParcellationHandler | ( | ) |
Definition at line 45 of file QmitkFreeSurferParcellationHandler.cpp.
References m_ServiceRegistration, and us::ServiceRegistrationBase::Unregister().
|
signal |
Emitted when pixelValue has changed.
value | of the current selected pixel |
Referenced by Notify().
|
signal |
Emitted when pixelValue has changed.
anatomical | label |
|
signal |
Thrown if and only if the left mousebutton is pressed and pixelValue has changed.
value | of the selected pixel |
Referenced by Notify().
|
signal |
Thrown if and only if the left mousebutton is pressed and pixelValue has changed.
anatomical | label |
QmitkFreeSurferParcellationHandler::mitkClassMacro | ( | QmitkFreeSurferParcellationHandler | , |
DataInteractor | |||
) |
|
protectedvirtual |
By this method all registered EventObersers are notified about every InteractionEvent, the isHandled flag indicates if a DataInteractor has already handled that event. InteractionEventObserver that trigger an action when observing an event may consider this in order to not confuse the user by, triggering several independent action with one single user event (such as a mouse click)
If you want to use the InteractionEventObserver as a state machine give the event to the state machine by implementing, e.g.
This overwrites the FilterEvents function of the EventStateMachine to ignore the DataNode, since InteractionEventObservers are not associated with one. virtual bool FilterEvents(InteractionEvent* interactionEvent, DataNode* dataNode);
Implements mitk::InteractionEventObserver.
Definition at line 50 of file QmitkFreeSurferParcellationHandler.cpp.
References changed(), clicked(), mitk::BaseRenderer::GetDataStorage(), mitk::ImagePixelReadAccessor< TPixel, VDimension >::GetPixelByWorldCoordinates(), mitk::InteractionPositionEvent::GetPositionInWorld(), mitk::InteractionEvent::GetSender(), m_Translator, MITK_WARN, mitk::New(), and scrolled().
|
signal |
Thrown if mouse scrolled and pixelvalue changed.
value | of the selected pixel |
Referenced by Notify().
|
signal |
Thrown if mouse scrolled and anatomcial labl changed.
anatomical | label |
|
protected |
The current pixelvalue.
Definition at line 87 of file QmitkFreeSurferParcellationHandler.h.
|
protected |
Reference to the service registration of the observer, it is needed to unregister the observer on unload.
Definition at line 96 of file QmitkFreeSurferParcellationHandler.h.
Referenced by QmitkFreeSurferParcellationHandler(), and ~QmitkFreeSurferParcellationHandler().
|
protected |
Translator for coverting pixelvalue into anatomical label.
Definition at line 91 of file QmitkFreeSurferParcellationHandler.h.
Referenced by Notify().