55 #define LAAW_ORTHANC_CLIENT_CALL_CONV __fastcall
56 #define LAAW_ORTHANC_CLIENT_CALL_DECORATION(Name, StdCallSuffix) Name
57 #define LAAW_ORTHANC_CLIENT_DEFAULT_PATH "OrthancClient_Windows64.dll"
60 #define LAAW_ORTHANC_CLIENT_CALL_CONV __stdcall
61 #define LAAW_ORTHANC_CLIENT_CALL_DECORATION(Name, StdCallSuffix) "_" Name "@" StdCallSuffix
62 #define LAAW_ORTHANC_CLIENT_DEFAULT_PATH "OrthancClient_Windows32.dll"
65 #define LAAW_ORTHANC_CLIENT_HANDLE_TYPE HINSTANCE
66 #define LAAW_ORTHANC_CLIENT_HANDLE_NULL 0
67 #define LAAW_ORTHANC_CLIENT_FUNCTION_TYPE FARPROC
68 #define LAAW_ORTHANC_CLIENT_LOADER(path) LoadLibraryA(path)
69 #define LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle, name, decoration) GetProcAddress(handle, LAAW_ORTHANC_CLIENT_CALL_DECORATION(name, decoration))
70 #define LAAW_ORTHANC_CLIENT_CLOSER(handle) FreeLibrary(handle)
77 #elif defined (__linux)
84 #define LAAW_ORTHANC_CLIENT_DEFAULT_PATH "libOrthancClient.so.0.8"
86 #define LAAW_ORTHANC_CLIENT_DEFAULT_PATH "libOrthancClient.so.0.8"
89 #define LAAW_ORTHANC_CLIENT_CALL_CONV
90 #define LAAW_ORTHANC_CLIENT_HANDLE_TYPE void*
91 #define LAAW_ORTHANC_CLIENT_HANDLE_NULL NULL
92 #define LAAW_ORTHANC_CLIENT_FUNCTION_TYPE intptr_t
93 #define LAAW_ORTHANC_CLIENT_LOADER(path) dlopen(path, RTLD_LAZY)
94 #define LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle, name, decoration) (LAAW_ORTHANC_CLIENT_FUNCTION_TYPE) dlsym(handle, name)
95 #define LAAW_ORTHANC_CLIENT_CLOSER(handle) dlclose(handle)
99 #error Please support your platform here
107 #ifndef LAAW_INT8 // Only define the integer types once
109 #if defined(__GNUC__)
115 #define LAAW_INT8 int8_t
116 #define LAAW_UINT8 uint8_t
117 #define LAAW_INT16 int16_t
118 #define LAAW_UINT16 uint16_t
119 #define LAAW_INT32 int32_t
120 #define LAAW_UINT32 uint32_t
121 #define LAAW_INT64 int64_t
122 #define LAAW_UINT64 uint64_t
124 #elif defined(_MSC_VER)
129 #if (_MSC_VER < 1300)
130 typedef signed char LAAW_INT8;
131 typedef signed short LAAW_INT16;
132 typedef signed int LAAW_INT32;
133 typedef unsigned char LAAW_UINT8;
134 typedef unsigned short LAAW_UINT16;
135 typedef unsigned int LAAW_UINT32;
137 typedef signed __int8 LAAW_INT8;
138 typedef signed __int16 LAAW_INT16;
139 typedef signed __int32 LAAW_INT32;
140 typedef unsigned __int8 LAAW_UINT8;
141 typedef unsigned __int16 LAAW_UINT16;
142 typedef unsigned __int32 LAAW_UINT32;
145 typedef signed __int64 LAAW_INT64;
146 typedef unsigned __int64 LAAW_UINT64;
149 #error "Please support your compiler here"
162 namespace OrthancClient {
169 std::string message_;
188 const std::string&
What()
const throw()
196 namespace OrthancClient {
namespace Internals {
205 LAAW_ORTHANC_CLIENT_HANDLE_TYPE handle_;
206 LAAW_ORTHANC_CLIENT_FUNCTION_TYPE functionsIndex_[63 + 1];
210 void Load(
const char* sharedLibraryPath)
213 if (handle_ != LAAW_ORTHANC_CLIENT_HANDLE_NULL)
220 if (sharedLibraryPath == NULL)
222 sharedLibraryPath = LAAW_ORTHANC_CLIENT_DEFAULT_PATH;
226 handle_ = LAAW_ORTHANC_CLIENT_LOADER(sharedLibraryPath);
229 if (handle_ == LAAW_ORTHANC_CLIENT_HANDLE_NULL)
231 throw ::OrthancClient::OrthancClientException(
"Error loading shared library");
237 inline void LoadFunctions();
239 void FreeString(
char* str)
241 typedef void (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
char*);
242 Function
function = (Function) GetFunction(63);
248 handle_ = LAAW_ORTHANC_CLIENT_HANDLE_NULL;
257 LAAW_ORTHANC_CLIENT_FUNCTION_TYPE GetFunction(
unsigned int index)
269 return functionsIndex_[index];
272 void ThrowExceptionIfNeeded(
char* message)
276 std::string tmp(message);
278 throw ::OrthancClient::OrthancClientException(tmp);
282 static inline Library& GetInstance()
292 static Library singleton;
296 static void Initialize(
const char* sharedLibraryPath)
298 GetInstance().Load(sharedLibraryPath);
303 if (handle_ != LAAW_ORTHANC_CLIENT_HANDLE_NULL)
312 LAAW_ORTHANC_CLIENT_CLOSER(handle_);
314 handle_ = LAAW_ORTHANC_CLIENT_HANDLE_NULL;
328 namespace OrthancClient {
373 ::OrthancClient::Internals::Library::GetInstance().Finalize();
383 namespace OrthancClient {
namespace Internals {
384 inline void Library::LoadFunctions()
386 typedef const char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) ();
387 Function getVersion = (Function) LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_GetVersion",
"0");
388 if (getVersion == NULL)
390 throw ::OrthancClient::OrthancClientException(
"Unable to get the library version");
397 if (strcmp(getVersion(),
"0.8"))
399 throw ::OrthancClient::OrthancClientException(
"Mismatch between the C++ header and the library version");
402 functionsIndex_[63] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_FreeString",
"4");
403 functionsIndex_[3] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_557aee7b61817292a0f31269d3c35db7",
"8");
404 functionsIndex_[4] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_0b8dff0ce67f10954a49b059e348837e",
"8");
405 functionsIndex_[5] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_e05097c153f676e5a5ee54dcfc78256f",
"4");
406 functionsIndex_[6] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_e840242bf58d17d3c1d722da09ce88e0",
"8");
407 functionsIndex_[7] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_c9af31433001b5dfc012a552dc6d0050",
"8");
408 functionsIndex_[8] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_3fba4d6b818180a44cd1cae6046334dc",
"12");
409 functionsIndex_[9] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_aeb20dc75b9246188db857317e5e0ce7",
"8");
410 functionsIndex_[10] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_62689803d9871e4d9c51a648640b320b",
"8");
411 functionsIndex_[11] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_2fb64c9e5a67eccd413b0e913469a421",
"16");
412 functionsIndex_[0] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_1f1acb322ea4d0aad65172824607673c",
"8");
413 functionsIndex_[1] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_f3fd272e4636f6a531aabb72ee01cd5b",
"16");
414 functionsIndex_[2] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_12d3de0a96e9efb11136a9811bb9ed38",
"4");
415 functionsIndex_[14] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_f756172daf04516eec3a566adabb4335",
"4");
416 functionsIndex_[15] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_ddb68763ec902a97d579666a73a20118",
"8");
417 functionsIndex_[16] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_fba3c68b4be7558dbc65f7ce1ab57d63",
"12");
418 functionsIndex_[17] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_b4ca99d958f843493e58d1ef967340e1",
"8");
419 functionsIndex_[18] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_78d5cc76d282437b6f93ec3b82c35701",
"16");
420 functionsIndex_[12] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_6cf0d7268667f9b0aa4511bacf184919",
"12");
421 functionsIndex_[13] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_7d81cd502ee27e859735d0ea7112b5a1",
"4");
422 functionsIndex_[21] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_48a2a1a9d68c047e22bfba23014643d2",
"4");
423 functionsIndex_[22] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_852bf8296ca21c5fde5ec565cc10721d",
"8");
424 functionsIndex_[23] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_efd04574e0779faa83df1f2d8f9888db",
"12");
425 functionsIndex_[24] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_736247ff5e8036dac38163da6f666ed5",
"8");
426 functionsIndex_[25] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_d82d2598a7a73f4b6fcc0c09c25b08ca",
"8");
427 functionsIndex_[26] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_88134b978f9acb2aecdadf54aeab3c64",
"16");
428 functionsIndex_[27] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_152cb1b704c053d24b0dab7461ba6ea3",
"8");
429 functionsIndex_[28] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_eee03f337ec81d9f1783cd41e5238757",
"8");
430 functionsIndex_[29] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_006f08237bd7611636fc721baebfb4c5",
"8");
431 functionsIndex_[30] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_b794f5cd3dad7d7b575dd1fd902afdd0",
"8");
432 functionsIndex_[31] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_8ee2e50dd9df8f66a3c1766090dd03ab",
"8");
433 functionsIndex_[32] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_046aed35bbe4751691f4c34cc249a61d",
"8");
434 functionsIndex_[33] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_2be452e7af5bf7dfd8c5021842674497",
"8");
435 functionsIndex_[34] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_4dcc7a0fd025efba251ac6e9b701c2c5",
"28");
436 functionsIndex_[35] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_b2601a161c24ad0a1d3586246f87452c",
"32");
437 functionsIndex_[19] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_193599b9e345384fcdfcd47c29c55342",
"12");
438 functionsIndex_[20] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_7c97f17063a357d38c5fab1136ad12a0",
"4");
439 functionsIndex_[38] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_e65b20b7e0170b67544cd6664a4639b7",
"4");
440 functionsIndex_[39] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_470e981b0e41f17231ba0ae6f3033321",
"8");
441 functionsIndex_[40] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_04cefd138b6ea15ad909858f2a0a8f05",
"12");
442 functionsIndex_[41] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_aee5b1f6f0c082f2c3b0986f9f6a18c7",
"8");
443 functionsIndex_[42] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_93965682bace75491413e1f0b8d5a654",
"16");
444 functionsIndex_[36] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_b01c6003238eb46c8db5dc823d7ca678",
"12");
445 functionsIndex_[37] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_0147007fb99bad8cd95a139ec8795376",
"4");
446 functionsIndex_[45] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_236ee8b403bc99535a8a4695c0cd45cb",
"8");
447 functionsIndex_[46] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_2a437b7aba6bb01e81113835be8f0146",
"8");
448 functionsIndex_[47] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_2bcbcb850934ae0bb4c6f0cc940e6cda",
"8");
449 functionsIndex_[48] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_8d415c3a78a48e7e61d9fd24e7c79484",
"12");
450 functionsIndex_[49] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_70d2f8398bbc63b5f792b69b4ad5fecb",
"12");
451 functionsIndex_[50] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_1729a067d902771517388eedd7346b23",
"12");
452 functionsIndex_[51] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_72e2aeee66cd3abd8ab7e987321c3745",
"8");
453 functionsIndex_[52] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_1ea3df5a1ac1a1a687fe7325adddb6f0",
"8");
454 functionsIndex_[53] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_99b4f370e4f532d8b763e2cb49db92f8",
"8");
455 functionsIndex_[54] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_c41c742b68617f1c0590577a0a5ebc0c",
"8");
456 functionsIndex_[55] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_142dd2feba0fc1d262bbd0baeb441a8b",
"8");
457 functionsIndex_[56] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_5f5c9f81a4dff8daa6c359f1d0488fef",
"12");
458 functionsIndex_[57] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_9ca979fffd08fa256306d4e68d8b0e91",
"8");
459 functionsIndex_[58] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_6f2d77a26edc91c28d89408dbc3c271e",
"8");
460 functionsIndex_[59] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_c0f494b80d4ff8b232df7a75baa0700a",
"4");
461 functionsIndex_[60] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_d604f44bd5195e082e745e9cbc164f4c",
"4");
462 functionsIndex_[61] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_1710299d1c5f3b1f2b7cf3962deebbfd",
"8");
463 functionsIndex_[62] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_bb55aaf772ddceaadee36f4e54136bcb",
"8");
464 functionsIndex_[43] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_6c5ad02f91b583e29cebd0bd319ce21d",
"12");
465 functionsIndex_[44] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_4068241c44a9c1367fe0e57be523f207",
"4");
468 for (
unsigned int i = 0; i <= 63; i++)
470 if (functionsIndex_[i] == (LAAW_ORTHANC_CLIENT_FUNCTION_TYPE) NULL)
472 throw ::OrthancClient::OrthancClientException(
"Unable to load the functions of the shared library");
477 namespace OrthancClient
479 class OrthancConnection;
482 namespace OrthancClient
487 namespace OrthancClient
492 namespace OrthancClient
497 namespace OrthancClient
593 namespace OrthancClient
603 friend class ::OrthancClient::Patient;
604 friend class ::OrthancClient::Series;
605 friend class ::OrthancClient::Study;
606 friend class ::OrthancClient::Instance;
622 inline OrthancConnection(const ::std::string& orthancUrl, const ::std::string& username, const ::std::string& password);
629 inline ::OrthancClient::Patient
GetPatient(LAAW_UINT32 index);
631 inline void StoreFile(const ::std::string& filename);
632 inline void Store(
const void* dicom, LAAW_UINT64 size);
636 namespace OrthancClient
646 friend class ::OrthancClient::OrthancConnection;
647 friend class ::OrthancClient::Series;
648 friend class ::OrthancClient::Study;
649 friend class ::OrthancClient::Instance;
654 Patient(
void* pimpl) : isReference_(
true), pimpl_(pimpl) {}
668 inline ::OrthancClient::Study
GetStudy(LAAW_UINT32 index);
669 inline ::std::string
GetId()
const;
670 inline ::std::string
GetMainDicomTag(const ::std::string& tag, const ::std::string& defaultValue)
const;
674 namespace OrthancClient
684 friend class ::OrthancClient::OrthancConnection;
685 friend class ::OrthancClient::Patient;
686 friend class ::OrthancClient::Study;
687 friend class ::OrthancClient::Instance;
692 Series(
void* pimpl) : isReference_(
true), pimpl_(pimpl) {}
701 Series(
const Series& other) : isReference_(true), pimpl_(other.pimpl_) { }
706 inline ::OrthancClient::Instance
GetInstance(LAAW_UINT32 index);
707 inline ::std::string
GetId()
const;
708 inline ::std::string
GetUrl()
const;
709 inline ::std::string
GetMainDicomTag(const ::std::string& tag, const ::std::string& defaultValue)
const;
722 namespace OrthancClient
732 friend class ::OrthancClient::OrthancConnection;
733 friend class ::OrthancClient::Patient;
734 friend class ::OrthancClient::Series;
735 friend class ::OrthancClient::Instance;
740 Study(
void* pimpl) : isReference_(
true), pimpl_(pimpl) {}
749 Study(
const Study& other) : isReference_(true), pimpl_(other.pimpl_) { }
754 inline ::OrthancClient::Series
GetSeries(LAAW_UINT32 index);
755 inline ::std::string
GetId()
const;
756 inline ::std::string
GetMainDicomTag(const ::std::string& tag, const ::std::string& defaultValue)
const;
760 namespace OrthancClient
770 friend class ::OrthancClient::OrthancConnection;
771 friend class ::OrthancClient::Patient;
772 friend class ::OrthancClient::Series;
773 friend class ::OrthancClient::Study;
778 Instance(
void* pimpl) : isReference_(
true), pimpl_(pimpl) {}
790 inline ::std::string
GetId()
const;
793 inline ::std::string
GetTagAsString(const ::std::string& tag)
const;
795 inline LAAW_INT32
GetTagAsInt(const ::std::string& tag)
const;
801 inline const void*
GetBuffer(LAAW_UINT32 y);
811 namespace OrthancClient
820 inline OrthancConnection::OrthancConnection(const ::std::string& orthancUrl)
822 isReference_ =
false;
823 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void**,
const char*);
824 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(0);
825 char* error =
function(&pimpl_, orthancUrl.c_str());
826 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
837 inline OrthancConnection::OrthancConnection(const ::std::string& orthancUrl, const ::std::string& username, const ::std::string& password)
839 isReference_ =
false;
840 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void**,
const char*,
const char*,
const char*);
841 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(1);
842 char* error =
function(&pimpl_, orthancUrl.c_str(), username.c_str(), password.c_str());
843 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
853 if (isReference_)
return;
854 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*);
855 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(2);
856 char* error =
function(pimpl_);
869 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
const void*, LAAW_UINT32*);
870 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(3);
871 char* error =
function(pimpl_, &result_);
872 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
884 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*, LAAW_UINT32);
885 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(4);
886 char* error =
function(pimpl_, threadCount);
887 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
897 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*);
898 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(5);
899 char* error =
function(pimpl_);
900 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
912 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
const void*,
const char**);
913 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(6);
914 char* error =
function(pimpl_, &result_);
915 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
916 return std::string(result_);
928 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*, LAAW_UINT32*);
929 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(7);
930 char* error =
function(pimpl_, &result_);
931 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
945 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*,
void**, LAAW_UINT32);
946 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(8);
947 char* error =
function(pimpl_, &result_, index);
948 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
949 return ::OrthancClient::Patient(result_);
961 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*, LAAW_UINT32);
962 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(9);
963 char* error =
function(pimpl_, index);
964 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
975 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*,
const char*);
976 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(10);
977 char* error =
function(pimpl_, filename.c_str());
978 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
990 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*,
const void*, LAAW_UINT64);
991 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(11);
992 char* error =
function(pimpl_, dicom, size);
993 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
997 namespace OrthancClient
1009 isReference_ =
false;
1010 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void**,
void*,
const char*);
1011 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(12);
1012 char* error =
function(&pimpl_, connection.pimpl_,
id.c_str());
1013 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1023 if (isReference_)
return;
1024 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*);
1025 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(13);
1026 char* error =
function(pimpl_);
1037 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*);
1038 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(14);
1039 char* error =
function(pimpl_);
1040 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1051 LAAW_UINT32 result_;
1052 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*, LAAW_UINT32*);
1053 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(15);
1054 char* error =
function(pimpl_, &result_);
1055 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1069 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*,
void**, LAAW_UINT32);
1070 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(16);
1071 char* error =
function(pimpl_, &result_, index);
1072 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1073 return ::OrthancClient::Study(result_);
1084 const char* result_;
1085 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
const void*,
const char**);
1086 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(17);
1087 char* error =
function(pimpl_, &result_);
1088 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1089 return std::string(result_);
1102 const char* result_;
1103 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
const void*,
const char**,
const char*,
const char*);
1104 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(18);
1105 char* error =
function(pimpl_, &result_, tag.c_str(), defaultValue.c_str());
1106 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1107 return std::string(result_);
1111 namespace OrthancClient
1123 isReference_ =
false;
1124 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void**,
void*,
const char*);
1125 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(19);
1126 char* error =
function(&pimpl_, connection.pimpl_,
id.c_str());
1127 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1137 if (isReference_)
return;
1138 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*);
1139 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(20);
1140 char* error =
function(pimpl_);
1151 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*);
1152 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(21);
1153 char* error =
function(pimpl_);
1154 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1165 LAAW_UINT32 result_;
1166 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*, LAAW_UINT32*);
1167 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(22);
1168 char* error =
function(pimpl_, &result_);
1169 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1183 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*,
void**, LAAW_UINT32);
1184 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(23);
1185 char* error =
function(pimpl_, &result_, index);
1186 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1187 return ::OrthancClient::Instance(result_);
1198 const char* result_;
1199 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
const void*,
const char**);
1200 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(24);
1201 char* error =
function(pimpl_, &result_);
1202 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1203 return std::string(result_);
1214 const char* result_;
1215 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
const void*,
const char**);
1216 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(25);
1217 char* error =
function(pimpl_, &result_);
1218 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1219 return std::string(result_);
1232 const char* result_;
1233 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
const void*,
const char**,
const char*,
const char*);
1234 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(26);
1235 char* error =
function(pimpl_, &result_, tag.c_str(), defaultValue.c_str());
1236 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1237 return std::string(result_);
1249 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*, LAAW_INT32*);
1250 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(27);
1251 char* error =
function(pimpl_, &result_);
1252 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1253 return result_ != 0;
1264 LAAW_UINT32 result_;
1265 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*, LAAW_UINT32*);
1266 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(28);
1267 char* error =
function(pimpl_, &result_);
1268 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1280 LAAW_UINT32 result_;
1281 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*, LAAW_UINT32*);
1282 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(29);
1283 char* error =
function(pimpl_, &result_);
1284 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1297 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*,
float*);
1298 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(30);
1299 char* error =
function(pimpl_, &result_);
1300 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1313 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*,
float*);
1314 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(31);
1315 char* error =
function(pimpl_, &result_);
1316 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1329 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*,
float*);
1330 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(32);
1331 char* error =
function(pimpl_, &result_);
1332 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1345 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*,
float*);
1346 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(33);
1347 char* error =
function(pimpl_, &result_);
1348 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1363 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*,
void*, LAAW_INT32, LAAW_INT64, LAAW_INT64);
1364 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(34);
1365 char* error =
function(pimpl_, target, format, lineStride, stackStride);
1366 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1381 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*,
void*, LAAW_INT32, LAAW_INT64, LAAW_INT64,
float*);
1382 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(35);
1383 char* error =
function(pimpl_, target, format, lineStride, stackStride, progress);
1384 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1388 namespace OrthancClient
1400 isReference_ =
false;
1401 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void**,
void*,
const char*);
1402 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(36);
1403 char* error =
function(&pimpl_, connection.pimpl_,
id.c_str());
1404 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1414 if (isReference_)
return;
1415 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*);
1416 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(37);
1417 char* error =
function(pimpl_);
1428 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*);
1429 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(38);
1430 char* error =
function(pimpl_);
1431 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1442 LAAW_UINT32 result_;
1443 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*, LAAW_UINT32*);
1444 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(39);
1445 char* error =
function(pimpl_, &result_);
1446 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1460 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*,
void**, LAAW_UINT32);
1461 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(40);
1462 char* error =
function(pimpl_, &result_, index);
1463 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1464 return ::OrthancClient::Series(result_);
1475 const char* result_;
1476 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
const void*,
const char**);
1477 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(41);
1478 char* error =
function(pimpl_, &result_);
1479 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1480 return std::string(result_);
1493 const char* result_;
1494 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
const void*,
const char**,
const char*,
const char*);
1495 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(42);
1496 char* error =
function(pimpl_, &result_, tag.c_str(), defaultValue.c_str());
1497 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1498 return std::string(result_);
1502 namespace OrthancClient
1514 isReference_ =
false;
1515 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void**,
void*,
const char*);
1516 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(43);
1517 char* error =
function(&pimpl_, connection.pimpl_,
id.c_str());
1518 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1528 if (isReference_)
return;
1529 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*);
1530 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(44);
1531 char* error =
function(pimpl_);
1543 const char* result_;
1544 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
const void*,
const char**);
1545 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(45);
1546 char* error =
function(pimpl_, &result_);
1547 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1548 return std::string(result_);
1559 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*, LAAW_INT32);
1560 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(46);
1561 char* error =
function(pimpl_, mode);
1562 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1574 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
const void*, LAAW_INT32*);
1575 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(47);
1576 char* error =
function(pimpl_, &result_);
1577 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1590 const char* result_;
1591 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
const void*,
const char**,
const char*);
1592 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(48);
1593 char* error =
function(pimpl_, &result_, tag.c_str());
1594 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1595 return std::string(result_);
1608 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
const void*,
float*,
const char*);
1609 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(49);
1610 char* error =
function(pimpl_, &result_, tag.c_str());
1611 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1625 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
const void*, LAAW_INT32*,
const char*);
1626 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(50);
1627 char* error =
function(pimpl_, &result_, tag.c_str());
1628 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1640 LAAW_UINT32 result_;
1641 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*, LAAW_UINT32*);
1642 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(51);
1643 char* error =
function(pimpl_, &result_);
1644 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1656 LAAW_UINT32 result_;
1657 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*, LAAW_UINT32*);
1658 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(52);
1659 char* error =
function(pimpl_, &result_);
1660 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1672 LAAW_UINT32 result_;
1673 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*, LAAW_UINT32*);
1674 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(53);
1675 char* error =
function(pimpl_, &result_);
1676 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1689 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*, LAAW_INT32*);
1690 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(54);
1691 char* error =
function(pimpl_, &result_);
1692 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1704 const void* result_;
1705 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*,
const void**);
1706 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(55);
1707 char* error =
function(pimpl_, &result_);
1708 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1709 return reinterpret_cast< const void*
>(result_);
1721 const void* result_;
1722 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*,
const void**, LAAW_UINT32);
1723 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(56);
1724 char* error =
function(pimpl_, &result_, y);
1725 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1726 return reinterpret_cast< const void*
>(result_);
1737 LAAW_UINT64 result_;
1738 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*, LAAW_UINT64*);
1739 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(57);
1740 char* error =
function(pimpl_, &result_);
1741 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1753 const void* result_;
1754 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*,
const void**);
1755 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(58);
1756 char* error =
function(pimpl_, &result_);
1757 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1758 return reinterpret_cast< const void*
>(result_);
1768 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*);
1769 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(59);
1770 char* error =
function(pimpl_);
1771 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1781 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*);
1782 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(60);
1783 char* error =
function(pimpl_);
1784 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1795 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*,
const char*);
1796 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(61);
1797 char* error =
function(pimpl_, path.c_str());
1798 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1809 const char* result_;
1810 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
const void*,
const char**);
1811 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(62);
1812 char* error =
function(pimpl_, &result_);
1813 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1814 return std::string(result_);