Orthanc Client
Documentation of the client library of Orthanc
Public Member Functions | List of all members
OrthancClient::OrthancConnection Class Reference

Connection to an instance of Orthanc. More...

#include <OrthancCppClient.h>

Public Member Functions

 OrthancConnection (const OrthancConnection &other)
 Construct a new reference to this object. More...
 
 OrthancConnection (const ::std::string &orthancUrl)
 Create a connection to an instance of Orthanc. More...
 
 OrthancConnection (const ::std::string &orthancUrl, const ::std::string &username, const ::std::string &password)
 Create a connection to an instance of Orthanc, with authentication. More...
 
 ~OrthancConnection ()
 Destructs the object. More...
 
LAAW_UINT32 GetThreadCount () const
 Returns the number of threads for this connection. More...
 
void SetThreadCount (LAAW_UINT32 threadCount)
 Sets the number of threads for this connection. More...
 
void Reload ()
 Reload the list of the patients. More...
 
inline::std::string GetOrthancUrl () const
 Returns the URL of this instance of Orthanc. More...
 
LAAW_UINT32 GetPatientCount ()
 Returns the number of patients. More...
 
inline::OrthancClient::Patient GetPatient (LAAW_UINT32 index)
 Get some patient. More...
 
void DeletePatient (LAAW_UINT32 index)
 Delete some patient. More...
 
void StoreFile (const ::std::string &filename)
 Send a DICOM file. More...
 
void Store (const void *dicom, LAAW_UINT64 size)
 Send a DICOM file that is contained inside a memory buffer. More...
 

Detailed Description

This class encapsulates a connection to a remote instance of Orthanc through its REST API.

Constructor & Destructor Documentation

OrthancClient::OrthancConnection::OrthancConnection ( const OrthancConnection other)
inline

Construct a new reference to this object. Pay attention to the fact that when the referenced object is deleted, the content of this object will be invalid.

Parameters
otherThe original object.
OrthancClient::OrthancConnection::OrthancConnection ( const ::std::string &  orthancUrl)
inline

Create a connection to an instance of Orthanc.

Parameters
orthancUrlURL to which the REST API of Orthanc is listening.
OrthancClient::OrthancConnection::OrthancConnection ( const ::std::string &  orthancUrl,
const ::std::string &  username,
const ::std::string &  password 
)
inline

Create a connection to an instance of Orthanc, with authentication.

Parameters
orthancUrlURL to which the REST API of Orthanc is listening.
usernameThe username.
passwordThe password.
OrthancClient::OrthancConnection::~OrthancConnection ( )
inline

Destructs the object.

Member Function Documentation

void OrthancClient::OrthancConnection::DeletePatient ( LAAW_UINT32  index)
inline

Delete some patient from the remote instance of Orthanc. Pay attention to the fact that the patients that have been previously returned by GetPatient() will be invalidated.

Parameters
indexThe index of the patient of interest.
Returns
The patient.
std::string OrthancClient::OrthancConnection::GetOrthancUrl ( ) const
inline

Returns the URL of the remote Orthanc instance to which this object is connected.

Returns
The URL.
OrthancClient::Patient OrthancClient::OrthancConnection::GetPatient ( LAAW_UINT32  index)
inline

This method will return an object that contains information about some patient. The patients are indexed by a number between 0 (inclusive) and the result of GetPatientCount() (exclusive).

Parameters
indexThe index of the patient of interest.
Returns
The patient.
LAAW_UINT32 OrthancClient::OrthancConnection::GetPatientCount ( )
inline

Returns the number of patients that are stored in the remote instance of Orthanc.

Returns
The number of patients.
LAAW_UINT32 OrthancClient::OrthancConnection::GetThreadCount ( ) const
inline

Returns the number of simultaneous connections that are used when downloading information from this instance of Orthanc.

Returns
The number of threads.
void OrthancClient::OrthancConnection::Reload ( )
inline

This method will reload the list of the patients from the remote instance of Orthanc. Pay attention to the fact that the patients that have been previously returned by GetPatient() will be invalidated.

void OrthancClient::OrthancConnection::SetThreadCount ( LAAW_UINT32  threadCount)
inline

Sets the number of simultaneous connections that are used when downloading information from this instance of Orthanc.

Parameters
threadCountThe number of threads.
void OrthancClient::OrthancConnection::Store ( const void *  dicom,
LAAW_UINT64  size 
)
inline

This method will store a DICOM file in the remote instance of Orthanc. Pay attention to the fact that the patients that have been previously returned by GetPatient() will be invalidated.

Parameters
dicomThe memory buffer containing the DICOM file.
sizeThe size of the DICOM file.
void OrthancClient::OrthancConnection::StoreFile ( const ::std::string &  filename)
inline

This method will store a DICOM file in the remote instance of Orthanc. Pay attention to the fact that the patients that have been previously returned by GetPatient() will be invalidated.

Parameters
filenamePath to the DICOM file

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