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"
86 #define LAAW_ORTHANC_CLIENT_DEFAULT_PATH "libOrthancClient.so"
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_[60 + 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(60);
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)
305 LAAW_ORTHANC_CLIENT_CLOSER(handle_);
306 handle_ = LAAW_ORTHANC_CLIENT_HANDLE_NULL;
320 namespace OrthancClient {
365 ::OrthancClient::Internals::Library::GetInstance().Finalize();
376 void ::OrthancClient::Internals::Library::LoadFunctions()
378 typedef const char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) ();
379 Function getVersion = (Function) LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_GetVersion",
"0");
380 if (getVersion == NULL)
382 throw ::OrthancClient::OrthancClientException(
"Unable to get the library version");
389 if (strcmp(getVersion(),
"0.6"))
391 throw ::OrthancClient::OrthancClientException(
"Mismatch between the C++ header and the library version");
394 functionsIndex_[60] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_FreeString",
"4");
395 functionsIndex_[3] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_557aee7b61817292a0f31269d3c35db7",
"8");
396 functionsIndex_[4] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_0b8dff0ce67f10954a49b059e348837e",
"8");
397 functionsIndex_[5] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_e05097c153f676e5a5ee54dcfc78256f",
"4");
398 functionsIndex_[6] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_e840242bf58d17d3c1d722da09ce88e0",
"8");
399 functionsIndex_[7] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_c9af31433001b5dfc012a552dc6d0050",
"8");
400 functionsIndex_[8] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_3fba4d6b818180a44cd1cae6046334dc",
"12");
401 functionsIndex_[9] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_aeb20dc75b9246188db857317e5e0ce7",
"8");
402 functionsIndex_[10] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_62689803d9871e4d9c51a648640b320b",
"8");
403 functionsIndex_[11] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_2fb64c9e5a67eccd413b0e913469a421",
"16");
404 functionsIndex_[0] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_1f1acb322ea4d0aad65172824607673c",
"8");
405 functionsIndex_[1] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_f3fd272e4636f6a531aabb72ee01cd5b",
"16");
406 functionsIndex_[2] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_12d3de0a96e9efb11136a9811bb9ed38",
"4");
407 functionsIndex_[14] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_f756172daf04516eec3a566adabb4335",
"4");
408 functionsIndex_[15] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_ddb68763ec902a97d579666a73a20118",
"8");
409 functionsIndex_[16] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_fba3c68b4be7558dbc65f7ce1ab57d63",
"12");
410 functionsIndex_[17] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_b4ca99d958f843493e58d1ef967340e1",
"8");
411 functionsIndex_[18] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_78d5cc76d282437b6f93ec3b82c35701",
"16");
412 functionsIndex_[12] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_6cf0d7268667f9b0aa4511bacf184919",
"12");
413 functionsIndex_[13] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_7d81cd502ee27e859735d0ea7112b5a1",
"4");
414 functionsIndex_[21] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_48a2a1a9d68c047e22bfba23014643d2",
"4");
415 functionsIndex_[22] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_852bf8296ca21c5fde5ec565cc10721d",
"8");
416 functionsIndex_[23] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_efd04574e0779faa83df1f2d8f9888db",
"12");
417 functionsIndex_[24] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_736247ff5e8036dac38163da6f666ed5",
"8");
418 functionsIndex_[25] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_d82d2598a7a73f4b6fcc0c09c25b08ca",
"8");
419 functionsIndex_[26] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_88134b978f9acb2aecdadf54aeab3c64",
"16");
420 functionsIndex_[27] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_152cb1b704c053d24b0dab7461ba6ea3",
"8");
421 functionsIndex_[28] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_eee03f337ec81d9f1783cd41e5238757",
"8");
422 functionsIndex_[29] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_006f08237bd7611636fc721baebfb4c5",
"8");
423 functionsIndex_[30] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_b794f5cd3dad7d7b575dd1fd902afdd0",
"8");
424 functionsIndex_[31] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_8ee2e50dd9df8f66a3c1766090dd03ab",
"8");
425 functionsIndex_[32] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_046aed35bbe4751691f4c34cc249a61d",
"8");
426 functionsIndex_[33] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_4dcc7a0fd025efba251ac6e9b701c2c5",
"28");
427 functionsIndex_[34] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_b2601a161c24ad0a1d3586246f87452c",
"32");
428 functionsIndex_[19] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_193599b9e345384fcdfcd47c29c55342",
"12");
429 functionsIndex_[20] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_7c97f17063a357d38c5fab1136ad12a0",
"4");
430 functionsIndex_[37] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_e65b20b7e0170b67544cd6664a4639b7",
"4");
431 functionsIndex_[38] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_470e981b0e41f17231ba0ae6f3033321",
"8");
432 functionsIndex_[39] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_04cefd138b6ea15ad909858f2a0a8f05",
"12");
433 functionsIndex_[40] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_aee5b1f6f0c082f2c3b0986f9f6a18c7",
"8");
434 functionsIndex_[41] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_93965682bace75491413e1f0b8d5a654",
"16");
435 functionsIndex_[35] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_b01c6003238eb46c8db5dc823d7ca678",
"12");
436 functionsIndex_[36] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_0147007fb99bad8cd95a139ec8795376",
"4");
437 functionsIndex_[44] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_236ee8b403bc99535a8a4695c0cd45cb",
"8");
438 functionsIndex_[45] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_2a437b7aba6bb01e81113835be8f0146",
"8");
439 functionsIndex_[46] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_2bcbcb850934ae0bb4c6f0cc940e6cda",
"8");
440 functionsIndex_[47] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_8d415c3a78a48e7e61d9fd24e7c79484",
"12");
441 functionsIndex_[48] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_70d2f8398bbc63b5f792b69b4ad5fecb",
"12");
442 functionsIndex_[49] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_1729a067d902771517388eedd7346b23",
"12");
443 functionsIndex_[50] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_72e2aeee66cd3abd8ab7e987321c3745",
"8");
444 functionsIndex_[51] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_1ea3df5a1ac1a1a687fe7325adddb6f0",
"8");
445 functionsIndex_[52] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_99b4f370e4f532d8b763e2cb49db92f8",
"8");
446 functionsIndex_[53] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_c41c742b68617f1c0590577a0a5ebc0c",
"8");
447 functionsIndex_[54] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_142dd2feba0fc1d262bbd0baeb441a8b",
"8");
448 functionsIndex_[55] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_5f5c9f81a4dff8daa6c359f1d0488fef",
"12");
449 functionsIndex_[56] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_9ca979fffd08fa256306d4e68d8b0e91",
"8");
450 functionsIndex_[57] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_6f2d77a26edc91c28d89408dbc3c271e",
"8");
451 functionsIndex_[58] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_c0f494b80d4ff8b232df7a75baa0700a",
"4");
452 functionsIndex_[59] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_d604f44bd5195e082e745e9cbc164f4c",
"4");
453 functionsIndex_[42] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_6c5ad02f91b583e29cebd0bd319ce21d",
"12");
454 functionsIndex_[43] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_,
"LAAW_EXTERNC_4068241c44a9c1367fe0e57be523f207",
"4");
457 for (
unsigned int i = 0; i <= 60; i++)
459 if (functionsIndex_[i] == (LAAW_ORTHANC_CLIENT_FUNCTION_TYPE) NULL)
461 throw ::OrthancClient::OrthancClientException(
"Unable to load the functions of the shared library");
465 namespace OrthancClient
467 class OrthancConnection;
470 namespace OrthancClient
475 namespace OrthancClient
480 namespace OrthancClient
485 namespace OrthancClient
574 namespace OrthancClient
584 friend class ::OrthancClient::Patient;
585 friend class ::OrthancClient::Series;
586 friend class ::OrthancClient::Study;
587 friend class ::OrthancClient::Instance;
603 inline OrthancConnection(const ::std::string& orthancUrl, const ::std::string& username, const ::std::string& password);
610 inline ::OrthancClient::Patient
GetPatient(LAAW_UINT32 index);
612 inline void StoreFile(const ::std::string& filename);
613 inline void Store(
const void* dicom, LAAW_UINT64 size);
617 namespace OrthancClient
627 friend class ::OrthancClient::OrthancConnection;
628 friend class ::OrthancClient::Series;
629 friend class ::OrthancClient::Study;
630 friend class ::OrthancClient::Instance;
635 Patient(
void* pimpl) : isReference_(
true), pimpl_(pimpl) {}
649 inline ::OrthancClient::Study
GetStudy(LAAW_UINT32 index);
650 inline ::std::string
GetId()
const;
651 inline ::std::string
GetMainDicomTag(const ::std::string& tag, const ::std::string& defaultValue)
const;
655 namespace OrthancClient
665 friend class ::OrthancClient::OrthancConnection;
666 friend class ::OrthancClient::Patient;
667 friend class ::OrthancClient::Study;
668 friend class ::OrthancClient::Instance;
673 Series(
void* pimpl) : isReference_(
true), pimpl_(pimpl) {}
682 Series(
const Series& other) : pimpl_(other.pimpl_), isReference_(true) { }
687 inline ::OrthancClient::Instance
GetInstance(LAAW_UINT32 index);
688 inline ::std::string
GetId()
const;
689 inline ::std::string
GetUrl()
const;
690 inline ::std::string
GetMainDicomTag(const ::std::string& tag, const ::std::string& defaultValue)
const;
702 namespace OrthancClient
712 friend class ::OrthancClient::OrthancConnection;
713 friend class ::OrthancClient::Patient;
714 friend class ::OrthancClient::Series;
715 friend class ::OrthancClient::Instance;
720 Study(
void* pimpl) : isReference_(
true), pimpl_(pimpl) {}
729 Study(
const Study& other) : pimpl_(other.pimpl_), isReference_(true) { }
734 inline ::OrthancClient::Series
GetSeries(LAAW_UINT32 index);
735 inline ::std::string
GetId()
const;
736 inline ::std::string
GetMainDicomTag(const ::std::string& tag, const ::std::string& defaultValue)
const;
740 namespace OrthancClient
750 friend class ::OrthancClient::OrthancConnection;
751 friend class ::OrthancClient::Patient;
752 friend class ::OrthancClient::Series;
753 friend class ::OrthancClient::Study;
758 Instance(
void* pimpl) : isReference_(
true), pimpl_(pimpl) {}
770 inline ::std::string
GetId()
const;
773 inline ::std::string
GetTagAsString(const ::std::string& tag)
const;
775 inline LAAW_INT32
GetTagAsInt(const ::std::string& tag)
const;
781 inline const void*
GetBuffer(LAAW_UINT32 y);
789 namespace OrthancClient
798 inline OrthancConnection::OrthancConnection(const ::std::string& orthancUrl)
800 isReference_ =
false;
801 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void**,
const char*);
802 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(0);
803 char* error =
function(&pimpl_, orthancUrl.c_str());
804 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
815 inline OrthancConnection::OrthancConnection(const ::std::string& orthancUrl, const ::std::string& username, const ::std::string& password)
817 isReference_ =
false;
818 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void**,
const char*,
const char*,
const char*);
819 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(1);
820 char* error =
function(&pimpl_, orthancUrl.c_str(), username.c_str(), password.c_str());
821 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
831 if (isReference_)
return;
832 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*);
833 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(2);
834 char* error =
function(pimpl_);
835 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
847 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
const void*, LAAW_UINT32*);
848 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(3);
849 char* error =
function(pimpl_, &result_);
850 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
862 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*, LAAW_UINT32);
863 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(4);
864 char* error =
function(pimpl_, threadCount);
865 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
875 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*);
876 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(5);
877 char* error =
function(pimpl_);
878 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
890 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
const void*,
const char**);
891 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(6);
892 char* error =
function(pimpl_, &result_);
893 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
894 return std::string(result_);
906 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*, LAAW_UINT32*);
907 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(7);
908 char* error =
function(pimpl_, &result_);
909 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
923 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*,
void**, LAAW_UINT32);
924 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(8);
925 char* error =
function(pimpl_, &result_, index);
926 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
927 return ::OrthancClient::Patient(result_);
939 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*, LAAW_UINT32);
940 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(9);
941 char* error =
function(pimpl_, index);
942 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
953 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*,
const char*);
954 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(10);
955 char* error =
function(pimpl_, filename.c_str());
956 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
968 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*,
const void*, LAAW_UINT64);
969 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(11);
970 char* error =
function(pimpl_, dicom, size);
971 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
975 namespace OrthancClient
987 isReference_ =
false;
988 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void**,
void*,
const char*);
989 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(12);
990 char* error =
function(&pimpl_, connection.pimpl_,
id.c_str());
991 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1001 if (isReference_)
return;
1002 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*);
1003 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(13);
1004 char* error =
function(pimpl_);
1005 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1015 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*);
1016 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(14);
1017 char* error =
function(pimpl_);
1018 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1029 LAAW_UINT32 result_;
1030 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*, LAAW_UINT32*);
1031 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(15);
1032 char* error =
function(pimpl_, &result_);
1033 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1047 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*,
void**, LAAW_UINT32);
1048 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(16);
1049 char* error =
function(pimpl_, &result_, index);
1050 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1051 return ::OrthancClient::Study(result_);
1062 const char* result_;
1063 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
const void*,
const char**);
1064 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(17);
1065 char* error =
function(pimpl_, &result_);
1066 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1067 return std::string(result_);
1080 const char* result_;
1081 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
const void*,
const char**,
const char*,
const char*);
1082 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(18);
1083 char* error =
function(pimpl_, &result_, tag.c_str(), defaultValue.c_str());
1084 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1085 return std::string(result_);
1089 namespace OrthancClient
1101 isReference_ =
false;
1102 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void**,
void*,
const char*);
1103 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(19);
1104 char* error =
function(&pimpl_, connection.pimpl_,
id.c_str());
1105 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1115 if (isReference_)
return;
1116 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*);
1117 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(20);
1118 char* error =
function(pimpl_);
1119 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1129 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*);
1130 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(21);
1131 char* error =
function(pimpl_);
1132 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1143 LAAW_UINT32 result_;
1144 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*, LAAW_UINT32*);
1145 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(22);
1146 char* error =
function(pimpl_, &result_);
1147 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1161 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*,
void**, LAAW_UINT32);
1162 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(23);
1163 char* error =
function(pimpl_, &result_, index);
1164 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1165 return ::OrthancClient::Instance(result_);
1176 const char* result_;
1177 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
const void*,
const char**);
1178 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(24);
1179 char* error =
function(pimpl_, &result_);
1180 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1181 return std::string(result_);
1192 const char* result_;
1193 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
const void*,
const char**);
1194 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(25);
1195 char* error =
function(pimpl_, &result_);
1196 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1197 return std::string(result_);
1210 const char* result_;
1211 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
const void*,
const char**,
const char*,
const char*);
1212 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(26);
1213 char* error =
function(pimpl_, &result_, tag.c_str(), defaultValue.c_str());
1214 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1215 return std::string(result_);
1227 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*, LAAW_INT32*);
1228 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(27);
1229 char* error =
function(pimpl_, &result_);
1230 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1231 return result_ != 0;
1242 LAAW_UINT32 result_;
1243 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*, LAAW_UINT32*);
1244 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(28);
1245 char* error =
function(pimpl_, &result_);
1246 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1258 LAAW_UINT32 result_;
1259 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*, LAAW_UINT32*);
1260 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(29);
1261 char* error =
function(pimpl_, &result_);
1262 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1275 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*,
float*);
1276 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(30);
1277 char* error =
function(pimpl_, &result_);
1278 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1291 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*,
float*);
1292 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(31);
1293 char* error =
function(pimpl_, &result_);
1294 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1307 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*,
float*);
1308 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(32);
1309 char* error =
function(pimpl_, &result_);
1310 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1325 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*,
void*, LAAW_INT32, LAAW_INT64, LAAW_INT64);
1326 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(33);
1327 char* error =
function(pimpl_, target, format, lineStride, stackStride);
1328 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1343 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*,
void*, LAAW_INT32, LAAW_INT64, LAAW_INT64,
float*);
1344 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(34);
1345 char* error =
function(pimpl_, target, format, lineStride, stackStride, progress);
1346 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1350 namespace OrthancClient
1362 isReference_ =
false;
1363 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void**,
void*,
const char*);
1364 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(35);
1365 char* error =
function(&pimpl_, connection.pimpl_,
id.c_str());
1366 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1376 if (isReference_)
return;
1377 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*);
1378 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(36);
1379 char* error =
function(pimpl_);
1380 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1390 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*);
1391 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(37);
1392 char* error =
function(pimpl_);
1393 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1404 LAAW_UINT32 result_;
1405 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*, LAAW_UINT32*);
1406 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(38);
1407 char* error =
function(pimpl_, &result_);
1408 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1422 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*,
void**, LAAW_UINT32);
1423 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(39);
1424 char* error =
function(pimpl_, &result_, index);
1425 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1426 return ::OrthancClient::Series(result_);
1437 const char* result_;
1438 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
const void*,
const char**);
1439 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(40);
1440 char* error =
function(pimpl_, &result_);
1441 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1442 return std::string(result_);
1455 const char* result_;
1456 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
const void*,
const char**,
const char*,
const char*);
1457 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(41);
1458 char* error =
function(pimpl_, &result_, tag.c_str(), defaultValue.c_str());
1459 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1460 return std::string(result_);
1464 namespace OrthancClient
1476 isReference_ =
false;
1477 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void**,
void*,
const char*);
1478 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(42);
1479 char* error =
function(&pimpl_, connection.pimpl_,
id.c_str());
1480 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1490 if (isReference_)
return;
1491 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*);
1492 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(43);
1493 char* error =
function(pimpl_);
1494 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1505 const char* result_;
1506 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
const void*,
const char**);
1507 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(44);
1508 char* error =
function(pimpl_, &result_);
1509 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1510 return std::string(result_);
1521 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*, LAAW_INT32);
1522 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(45);
1523 char* error =
function(pimpl_, mode);
1524 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1536 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
const void*, LAAW_INT32*);
1537 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(46);
1538 char* error =
function(pimpl_, &result_);
1539 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1552 const char* result_;
1553 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
const void*,
const char**,
const char*);
1554 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(47);
1555 char* error =
function(pimpl_, &result_, tag.c_str());
1556 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1557 return std::string(result_);
1570 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
const void*,
float*,
const char*);
1571 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(48);
1572 char* error =
function(pimpl_, &result_, tag.c_str());
1573 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1587 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
const void*, LAAW_INT32*,
const char*);
1588 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(49);
1589 char* error =
function(pimpl_, &result_, tag.c_str());
1590 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1602 LAAW_UINT32 result_;
1603 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*, LAAW_UINT32*);
1604 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(50);
1605 char* error =
function(pimpl_, &result_);
1606 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1618 LAAW_UINT32 result_;
1619 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*, LAAW_UINT32*);
1620 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(51);
1621 char* error =
function(pimpl_, &result_);
1622 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1634 LAAW_UINT32 result_;
1635 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*, LAAW_UINT32*);
1636 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(52);
1637 char* error =
function(pimpl_, &result_);
1638 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1651 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*, LAAW_INT32*);
1652 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(53);
1653 char* error =
function(pimpl_, &result_);
1654 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1666 const void* result_;
1667 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*,
const void**);
1668 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(54);
1669 char* error =
function(pimpl_, &result_);
1670 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1671 return reinterpret_cast< const void*
>(result_);
1683 const void* result_;
1684 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*,
const void**, LAAW_UINT32);
1685 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(55);
1686 char* error =
function(pimpl_, &result_, y);
1687 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1688 return reinterpret_cast< const void*
>(result_);
1699 LAAW_UINT64 result_;
1700 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*, LAAW_UINT64*);
1701 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(56);
1702 char* error =
function(pimpl_, &result_);
1703 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1715 const void* result_;
1716 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*,
const void**);
1717 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(57);
1718 char* error =
function(pimpl_, &result_);
1719 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1720 return reinterpret_cast< const void*
>(result_);
1730 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*);
1731 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(58);
1732 char* error =
function(pimpl_);
1733 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
1743 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (
void*);
1744 Function
function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(59);
1745 char* error =
function(pimpl_);
1746 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);