CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
Public Slots | Signals | Public Member Functions | Protected Slots | Protected Attributes | List of all members
ctkExampleDicomHost Class Reference

#include <Plugins/org.commontk.dah.examplehost/ctkExampleDicomHost.h>

Inheritance diagram for ctkExampleDicomHost:
Inheritance graph
[legend]
Collaboration diagram for ctkExampleDicomHost:
Collaboration graph
[legend]

Public Slots

void onAppReady ()
 
void onCanceled ()
 
void onCompleted ()
 
void onExited ()
 
void onReleaseAvailableResources ()
 
void onResumed ()
 
void onStartProgress ()
 
void onSuspended ()
 

Signals

void giveAvailableScreen (QRect rect)
 
- Signals inherited from ctkDicomAbstractHost
void appReady ()
 Emitted when the ctkDicomAppHosting::IDLE state notification has been received, and the previous state was EXIT, IDLE or CANCELED. More...
 
void canceled ()
 Emitted when the ctkDicomAppHosting::CANCELED state notification has been received. More...
 
void completed ()
 Emitted when the ctkDicomAppHosting::COMPLETED state notification has been received. More...
 
void exited ()
 Emitted when the ctkDicomAppHosting::EXIT state notification has been received. More...
 
void releaseAvailableResources ()
 Emitted when the ctkDicomAppHosting::IDLE state notification has been received, and the previous state was COMPLETED. More...
 
void resumed ()
 Emitted when the ctkDicomAppHosting::INPROGRESS state notification has been received, and previous state SUSPENDED. More...
 
void startProgress ()
 Emitted when the ctkDicomAppHosting::INPROGRESS state notification has been received, and previous state IDLE. More...
 
void stateChangedReceived (ctkDicomAppHosting::State state)
 Emitted after any new state has been received. The event is sent after all the others have been sent through the state machine. More...
 
void statusReceived (const ctkDicomAppHosting::Status &status)
 
void suspended ()
 Emitted when the ctkDicomAppHosting::SUSPENDED state notification has been received. More...
 
- Signals inherited from ctkDicomAbstractExchangeCache
void dataAvailable ()
 
void internalDataAvailable ()
 

Public Member Functions

 ctkExampleDicomHost (ctkHostedAppPlaceholderWidget *placeholderWidget, int hostPort=8080, int appPort=8081)
 
void exitApplication ()
 
void exitApplicationBlocking (int timeout=2000)
 
virtual QString generateUID ()
 
ctkDicomAppHosting::State getApplicationState () const
 
const QProcess & getAppProcess () const
 
virtual QRect getAvailableScreen (const QRect &preferredScreen)
 
virtual QString getOutputLocation (const QStringList &preferredProtocols)
 
virtual void notifyStatus (const ctkDicomAppHosting::Status &status)
 
QByteArray processReadAll ()
 
virtual void StartApplication (QString AppPath)
 
virtual ~ctkExampleDicomHost ()
 
- Public Member Functions inherited from ctkDicomAbstractHost
 ctkDicomAbstractHost (int hostPort=0, int appPort=0)
 Starts the soap server on the specified port or choose port automatically. More...
 
ctkDicomAppHosting::State getApplicationState () const
 Gets the internal representation of the application state. Does not call the client. For that purpose call ctkDicomAppInterface::getState() instead. More...
 
int getAppPort () const
 Gets the hosted application port. More...
 
ctkDicomAppInterfacegetDicomAppService () const
 Gets the application service in order to call methods on the hosted app. More...
 
int getHostPort () const
 Gets the host port. More...
 
ctkDicomExchangeInterfacegetOtherSideExchangeService () const
 Gets the exchange service of the other side. More...
 
virtual void notifyStateChanged (ctkDicomAppHosting::State state)
 Handles transitions form one state to the other. When a new state notification arrives from the hosted app, it goes through a state machine check and triggers signals depending on the appropriate response. More...
 
virtual ~ctkDicomAbstractHost ()
 
- Public Member Functions inherited from ctkDicomAbstractExchangeCache
void cleanIncomingData ()
 Clean internal data stucture that keeps the incoming data. More...
 
 ctkDicomAbstractExchangeCache ()
 Construct object. More...
 
virtual QList< ctkDicomAppHosting::ObjectLocatorgetData (const QList< QUuid > &objectUUIDs, const QList< QString > &acceptableTransferSyntaxUIDs, bool includeBulkData)
 Provide ctkDicomAppHosting::ObjectLocators to the other side. More...
 
const ctkDicomAppHosting::AvailableDatagetIncomingAvailableData () const
 Return the incoming available data. More...
 
bool lastIncomingData () const
 Return whether the incoming data was marked as lastData. More...
 
bool notifyDataAvailable (const ctkDicomAppHosting::AvailableData &data, bool lastData)
 Receive notification from other side. More...
 
ctkDicomObjectLocatorCacheobjectLocatorCache () const
 Return the cache for outgoing data. More...
 
bool publishData (const ctkDicomAppHosting::AvailableData &availableData, bool lastData)
 Publish data to other side. More...
 
void releaseData (const QList< QUuid > &objectUUIDs)
 
virtual ~ctkDicomAbstractExchangeCache ()
 Destructor. More...
 
- Public Member Functions inherited from ctkDicomExchangeInterface
virtual ~ctkDicomExchangeInterface ()
 

Protected Slots

void onBlockingExiting ()
 
void onBlockingExiting (QProcess::ProcessState)
 

Protected Attributes

QProcess AppProcess
 
QEventLoop BlockingLoopForExiting
 
ctkHostedAppPlaceholderWidgetPlaceholderWidget
 

Detailed Description

Definition at line 36 of file ctkExampleDicomHost.h.

Constructor & Destructor Documentation

◆ ctkExampleDicomHost()

ctkExampleDicomHost::ctkExampleDicomHost ( ctkHostedAppPlaceholderWidget placeholderWidget,
int  hostPort = 8080,
int  appPort = 8081 
)

◆ ~ctkExampleDicomHost()

virtual ctkExampleDicomHost::~ctkExampleDicomHost ( )
virtual

Member Function Documentation

◆ exitApplication()

void ctkExampleDicomHost::exitApplication ( )

◆ exitApplicationBlocking()

void ctkExampleDicomHost::exitApplicationBlocking ( int  timeout = 2000)

◆ generateUID()

virtual QString ctkExampleDicomHost::generateUID ( )
virtual

Returns a newly created DICOM UID that the Hosted Application might use, e.g., to create new data objects and structures.

Implements ctkDicomHostInterface.

◆ getApplicationState()

ctkDicomAppHosting::State ctkExampleDicomHost::getApplicationState ( ) const

◆ getAppProcess()

const QProcess& ctkExampleDicomHost::getAppProcess ( ) const
inline

Definition at line 75 of file ctkExampleDicomHost.h.

◆ getAvailableScreen()

virtual QRect ctkExampleDicomHost::getAvailableScreen ( const QRect &  preferredScreen)
virtual

The Hosted Application supplies its preferred screen size in the appPreferredScreen parameter. The Hosting System may utilize this information as a hint, but may return a window location and size that best suits the Hosting System's GUI.

Implements ctkDicomHostInterface.

◆ getOutputLocation()

virtual QString ctkExampleDicomHost::getOutputLocation ( const QStringList &  preferredProtocols)
virtual

This method returns a URI that a Hosted Application may use to store output that it may provide back to the Hosting System (e.g. in response to a getData() call).

Returns
a URI that a Hosted Application may use to store output.

Implements ctkDicomHostInterface.

◆ giveAvailableScreen

void ctkExampleDicomHost::giveAvailableScreen ( QRect  rect)
signal

◆ notifyStatus()

virtual void ctkExampleDicomHost::notifyStatus ( const ctkDicomAppHosting::Status status)
virtual

Method used by the Hosted Application to inform the Hosting System of notable events that occur during execution. The Hosted Application invoks this method, passing the information in the status parameter.

Implements ctkDicomHostInterface.

◆ onAppReady

void ctkExampleDicomHost::onAppReady ( )
slot

◆ onBlockingExiting [1/2]

void ctkExampleDicomHost::onBlockingExiting ( )
protectedslot

◆ onBlockingExiting [2/2]

void ctkExampleDicomHost::onBlockingExiting ( QProcess::ProcessState  )
protectedslot

◆ onCanceled

void ctkExampleDicomHost::onCanceled ( )
slot

◆ onCompleted

void ctkExampleDicomHost::onCompleted ( )
slot

◆ onExited

void ctkExampleDicomHost::onExited ( )
slot

◆ onReleaseAvailableResources

void ctkExampleDicomHost::onReleaseAvailableResources ( )
slot

◆ onResumed

void ctkExampleDicomHost::onResumed ( )
slot

◆ onStartProgress

void ctkExampleDicomHost::onStartProgress ( )
slot

◆ onSuspended

void ctkExampleDicomHost::onSuspended ( )
slot

◆ processReadAll()

QByteArray ctkExampleDicomHost::processReadAll ( )
inline

Definition at line 78 of file ctkExampleDicomHost.h.

◆ StartApplication()

virtual void ctkExampleDicomHost::StartApplication ( QString  AppPath)
virtual

Member Data Documentation

◆ AppProcess

QProcess ctkExampleDicomHost::AppProcess
protected

Definition at line 106 of file ctkExampleDicomHost.h.

◆ BlockingLoopForExiting

QEventLoop ctkExampleDicomHost::BlockingLoopForExiting
protected

Definition at line 98 of file ctkExampleDicomHost.h.

◆ PlaceholderWidget

ctkHostedAppPlaceholderWidget* ctkExampleDicomHost::PlaceholderWidget
protected

Definition at line 107 of file ctkExampleDicomHost.h.


The documentation for this class was generated from the following file: