Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
An object of this class offers an UI to setup the connection of an OpenIGTLink device. More...
#include <QmitkIGTLDeviceSetupConnectionWidget.h>
Signals | |
void | AdaptGUIToStateSignal () |
used for thread seperation, the worker thread must not call AdaptGUIToState directly. QT signals are thread safe and seperate the threads More... | |
Public Member Functions | |
void | Initialize (mitk::IGTLDevice::Pointer device) |
Initializes the widget with the given device. More... | |
QmitkIGTLDeviceSetupConnectionWidget (QWidget *parent=0, Qt::WindowFlags f=0) | |
~QmitkIGTLDeviceSetupConnectionWidget () | |
void | OnLostConnection () |
Is called when the current device received a message. More... | |
void | OnNewConnection () |
Is called when the current device connected to another device. More... | |
void | OnMessageReceived () |
Is called when the current device received a message. More... | |
void | OnMessageSent () |
Is called when the current device received a message. More... | |
void | OnCommandReceived () |
Is called when the current device received a command. More... | |
Static Public Attributes | |
static const std::string | VIEW_ID |
Protected Slots | |
void | OnConnect () |
void | OnPortChanged () |
void | OnHostnameChanged () |
void | OnUpdateFPSLabel () |
void | OnBufferIncomingMessages (int state) |
Enables/Disables the buffering of incoming messages. More... | |
void | OnBufferOutgoingMessages (int state) |
Enables/Disables the buffering of outgoing messages. More... | |
void | AdaptGUIToState () |
Adapts the GUI to the state of the device. More... | |
Protected Member Functions | |
void | OnDeviceStateChanged () |
Calls AdaptGUIToState() More... | |
virtual void | CreateConnections () |
Creation of the connections. More... | |
virtual void | CreateQtPartControl (QWidget *parent) |
void | DisableSourceControls () |
void | RemoveObserver () |
Protected Attributes | |
Ui::QmitkIGTLDeviceSetupConnectionWidgetControls * | m_Controls |
mitk::IGTLDevice::Pointer | m_IGTLDevice |
holds the OpenIGTLink device More... | |
bool | m_IsClient |
flag to indicate if the IGTL device is a client or a server More... | |
unsigned long | m_MessageSentObserverTag |
unsigned long | m_MessageReceivedObserverTag |
unsigned long | m_CommandReceivedObserverTag |
unsigned long | m_LostConnectionObserverTag |
unsigned long | m_NewConnectionObserverTag |
unsigned long | m_StateModifiedObserverTag |
unsigned int | m_NumReceivedFramesSinceLastUpdate |
the number of received frames (messages) since the last fps calculation update More... | |
unsigned int | m_NumSentFramesSinceLastUpdate |
the number of sent frames (messages) since the last fps calculation update More... | |
QTimer | m_FPSCalculationTimer |
the timer used to calculate the frames per second More... | |
An object of this class offers an UI to setup the connection of an OpenIGTLink device.
Documentation:
Definition at line 43 of file QmitkIGTLDeviceSetupConnectionWidget.h.
QmitkIGTLDeviceSetupConnectionWidget::QmitkIGTLDeviceSetupConnectionWidget | ( | QWidget * | parent = 0 , |
Qt::WindowFlags | f = 0 |
||
) |
Definition at line 43 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.
References CreateQtPartControl(), m_Controls, m_IGTLDevice, m_NumReceivedFramesSinceLastUpdate, and m_NumSentFramesSinceLastUpdate.
QmitkIGTLDeviceSetupConnectionWidget::~QmitkIGTLDeviceSetupConnectionWidget | ( | ) |
Definition at line 54 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.
References RemoveObserver().
|
protectedslot |
Adapts the GUI to the state of the device.
Definition at line 125 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.
References m_Controls, m_IGTLDevice, m_IsClient, mitkThrow, mitk::IGTLDevice::Ready, mitk::IGTLDevice::Running, and mitk::IGTLDevice::Setup.
Referenced by CreateConnections(), Initialize(), and OnConnect().
|
signal |
used for thread seperation, the worker thread must not call AdaptGUIToState directly. QT signals are thread safe and seperate the threads
Referenced by CreateConnections(), OnDeviceStateChanged(), OnLostConnection(), and OnNewConnection().
|
protectedvirtual |
Creation of the connections.
Definition at line 97 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.
References AdaptGUIToState(), AdaptGUIToStateSignal(), m_Controls, m_FPSCalculationTimer, OnBufferIncomingMessages(), OnBufferOutgoingMessages(), OnConnect(), OnHostnameChanged(), OnPortChanged(), and OnUpdateFPSLabel().
Referenced by CreateQtPartControl().
|
protectedvirtual |
Definition at line 72 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.
References CreateConnections(), m_Controls, and m_FPSCalculationTimer.
Referenced by QmitkIGTLDeviceSetupConnectionWidget().
|
protected |
Definition at line 278 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.
References m_Controls.
Referenced by Initialize().
void QmitkIGTLDeviceSetupConnectionWidget::Initialize | ( | mitk::IGTLDevice::Pointer | device | ) |
Initializes the widget with the given device.
The old device is dropped, so be careful, if the source is not saved somewhere else it might be lost. You might want to ask the user if he wants to save the changes before calling this method.
device | The widget will be initialized corresponding to the state of this device. |
Definition at line 207 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.
References AdaptGUIToState(), DisableSourceControls(), m_CommandReceivedObserverTag, m_Controls, m_IGTLDevice, m_IsClient, m_LostConnectionObserverTag, m_MessageReceivedObserverTag, m_MessageSentObserverTag, m_NewConnectionObserverTag, m_StateModifiedObserverTag, mitk::New(), OnBufferIncomingMessages(), OnBufferOutgoingMessages(), OnCommandReceived(), OnDeviceStateChanged(), OnLostConnection(), OnMessageReceived(), OnMessageSent(), OnNewConnection(), and RemoveObserver().
|
protectedslot |
Enables/Disables the buffering of incoming messages.
Definition at line 384 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.
References m_IGTLDevice.
Referenced by CreateConnections(), and Initialize().
|
protectedslot |
Enables/Disables the buffering of outgoing messages.
This can be necessary when the data is faster produced then sent
Definition at line 393 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.
References m_IGTLDevice.
Referenced by CreateConnections(), and Initialize().
void QmitkIGTLDeviceSetupConnectionWidget::OnCommandReceived | ( | ) |
Is called when the current device received a command.
Definition at line 375 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.
References m_Controls, m_IGTLDevice, and MITK_INFO.
Referenced by Initialize().
|
protectedslot |
Definition at line 289 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.
References AdaptGUIToState(), m_Controls, m_IGTLDevice, m_IsClient, MITK_ERROR, MITK_INFO, mitkThrow, mitk::IGTLDevice::Ready, mitk::IGTLDevice::Running, and mitk::IGTLDevice::Setup.
Referenced by CreateConnections().
|
protected |
Calls AdaptGUIToState()
Definition at line 120 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.
References AdaptGUIToStateSignal().
Referenced by Initialize().
|
protectedslot |
Definition at line 342 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.
Referenced by CreateConnections().
void QmitkIGTLDeviceSetupConnectionWidget::OnLostConnection | ( | ) |
Is called when the current device received a message.
Is called when the current device received a command Is called when the current device lost a connection to one of its sockets
Definition at line 346 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.
References AdaptGUIToStateSignal().
Referenced by Initialize().
void QmitkIGTLDeviceSetupConnectionWidget::OnMessageReceived | ( | ) |
Is called when the current device received a message.
Definition at line 356 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.
References m_Controls, m_IGTLDevice, m_NumReceivedFramesSinceLastUpdate, and MITK_INFO.
Referenced by Initialize().
void QmitkIGTLDeviceSetupConnectionWidget::OnMessageSent | ( | ) |
Is called when the current device received a message.
Definition at line 366 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.
References m_Controls, m_NumSentFramesSinceLastUpdate, and MITK_INFO.
Referenced by Initialize().
void QmitkIGTLDeviceSetupConnectionWidget::OnNewConnection | ( | ) |
Is called when the current device connected to another device.
Definition at line 351 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.
References AdaptGUIToStateSignal().
Referenced by Initialize().
|
protectedslot |
Definition at line 338 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.
Referenced by CreateConnections().
|
protectedslot |
Definition at line 402 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.
References m_Controls, m_NumReceivedFramesSinceLastUpdate, and m_NumSentFramesSinceLastUpdate.
Referenced by CreateConnections().
|
protected |
Definition at line 59 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.
References m_CommandReceivedObserverTag, m_IGTLDevice, m_LostConnectionObserverTag, m_MessageReceivedObserverTag, m_MessageSentObserverTag, m_NewConnectionObserverTag, and m_StateModifiedObserverTag.
Referenced by Initialize(), and ~QmitkIGTLDeviceSetupConnectionWidget().
|
protected |
Definition at line 153 of file QmitkIGTLDeviceSetupConnectionWidget.h.
Referenced by Initialize(), and RemoveObserver().
|
protected |
Definition at line 143 of file QmitkIGTLDeviceSetupConnectionWidget.h.
Referenced by AdaptGUIToState(), CreateConnections(), CreateQtPartControl(), DisableSourceControls(), Initialize(), OnCommandReceived(), OnConnect(), OnMessageReceived(), OnMessageSent(), OnUpdateFPSLabel(), and QmitkIGTLDeviceSetupConnectionWidget().
|
protected |
the timer used to calculate the frames per second
Definition at line 173 of file QmitkIGTLDeviceSetupConnectionWidget.h.
Referenced by CreateConnections(), and CreateQtPartControl().
|
protected |
holds the OpenIGTLink device
Definition at line 146 of file QmitkIGTLDeviceSetupConnectionWidget.h.
Referenced by AdaptGUIToState(), Initialize(), OnBufferIncomingMessages(), OnBufferOutgoingMessages(), OnCommandReceived(), OnConnect(), OnMessageReceived(), QmitkIGTLDeviceSetupConnectionWidget(), and RemoveObserver().
|
protected |
flag to indicate if the IGTL device is a client or a server
Definition at line 149 of file QmitkIGTLDeviceSetupConnectionWidget.h.
Referenced by AdaptGUIToState(), Initialize(), and OnConnect().
|
protected |
Definition at line 154 of file QmitkIGTLDeviceSetupConnectionWidget.h.
Referenced by Initialize(), and RemoveObserver().
|
protected |
Definition at line 152 of file QmitkIGTLDeviceSetupConnectionWidget.h.
Referenced by Initialize(), and RemoveObserver().
|
protected |
Definition at line 151 of file QmitkIGTLDeviceSetupConnectionWidget.h.
Referenced by Initialize(), and RemoveObserver().
|
protected |
Definition at line 155 of file QmitkIGTLDeviceSetupConnectionWidget.h.
Referenced by Initialize(), and RemoveObserver().
|
protected |
the number of received frames (messages) since the last fps calculation update
This counter is incremented every time a message is received. When the timer m_FPSCalculationTimer is fired it is reset to 0 and the number is used to calculate the FPS
Definition at line 163 of file QmitkIGTLDeviceSetupConnectionWidget.h.
Referenced by OnMessageReceived(), OnUpdateFPSLabel(), and QmitkIGTLDeviceSetupConnectionWidget().
|
protected |
the number of sent frames (messages) since the last fps calculation update
This counter is incremented every time a message is sent. When the timer m_FPSCalculationTimer is fired it is reset to 0 and the number is used to calculate the FPS
Definition at line 170 of file QmitkIGTLDeviceSetupConnectionWidget.h.
Referenced by OnMessageSent(), OnUpdateFPSLabel(), and QmitkIGTLDeviceSetupConnectionWidget().
|
protected |
Definition at line 156 of file QmitkIGTLDeviceSetupConnectionWidget.h.
Referenced by Initialize(), and RemoveObserver().
|
static |
Definition at line 48 of file QmitkIGTLDeviceSetupConnectionWidget.h.