Mercurial > hg > orthanc
comparison OrthancCppClient/SharedLibrary/AUTOGENERATED/OrthancCppClient.h @ 728:d380222b4c2a
Load a raw tag from the DICOM file
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 21 Feb 2014 10:12:33 +0100 |
parents | f0232774b913 |
children | 55bce9b55054 |
comparison
equal
deleted
inserted
replaced
727:52b5316a2517 | 728:d380222b4c2a |
---|---|
201 **/ | 201 **/ |
202 class Library | 202 class Library |
203 { | 203 { |
204 private: | 204 private: |
205 LAAW_ORTHANC_CLIENT_HANDLE_TYPE handle_; | 205 LAAW_ORTHANC_CLIENT_HANDLE_TYPE handle_; |
206 LAAW_ORTHANC_CLIENT_FUNCTION_TYPE functionsIndex_[60 + 1]; | 206 LAAW_ORTHANC_CLIENT_FUNCTION_TYPE functionsIndex_[62 + 1]; |
207 | 207 |
208 | 208 |
209 | 209 |
210 void Load(const char* sharedLibraryPath) | 210 void Load(const char* sharedLibraryPath) |
211 { | 211 { |
237 inline void LoadFunctions(); | 237 inline void LoadFunctions(); |
238 | 238 |
239 void FreeString(char* str) | 239 void FreeString(char* str) |
240 { | 240 { |
241 typedef void (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (char*); | 241 typedef void (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (char*); |
242 Function function = (Function) GetFunction(60); | 242 Function function = (Function) GetFunction(62); |
243 function(str); | 243 function(str); |
244 } | 244 } |
245 | 245 |
246 Library() | 246 Library() |
247 { | 247 { |
389 if (strcmp(getVersion(), "0.7")) | 389 if (strcmp(getVersion(), "0.7")) |
390 { | 390 { |
391 throw ::OrthancClient::OrthancClientException("Mismatch between the C++ header and the library version"); | 391 throw ::OrthancClient::OrthancClientException("Mismatch between the C++ header and the library version"); |
392 } | 392 } |
393 | 393 |
394 functionsIndex_[60] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_FreeString", "4"); | 394 functionsIndex_[62] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_FreeString", "4"); |
395 functionsIndex_[3] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_557aee7b61817292a0f31269d3c35db7", "8"); | 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"); | 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"); | 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"); | 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"); | 399 functionsIndex_[7] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_c9af31433001b5dfc012a552dc6d0050", "8"); |
448 functionsIndex_[55] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_5f5c9f81a4dff8daa6c359f1d0488fef", "12"); | 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"); | 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"); | 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"); | 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"); | 452 functionsIndex_[59] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_d604f44bd5195e082e745e9cbc164f4c", "4"); |
453 functionsIndex_[60] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_1710299d1c5f3b1f2b7cf3962deebbfd", "8"); | |
454 functionsIndex_[61] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_bb55aaf772ddceaadee36f4e54136bcb", "8"); | |
453 functionsIndex_[42] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_6c5ad02f91b583e29cebd0bd319ce21d", "12"); | 455 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"); | 456 functionsIndex_[43] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_4068241c44a9c1367fe0e57be523f207", "4"); |
455 | 457 |
456 /* Check whether the functions were properly loaded */ | 458 /* Check whether the functions were properly loaded */ |
457 for (unsigned int i = 0; i <= 60; i++) | 459 for (unsigned int i = 0; i <= 62; i++) |
458 { | 460 { |
459 if (functionsIndex_[i] == (LAAW_ORTHANC_CLIENT_FUNCTION_TYPE) NULL) | 461 if (functionsIndex_[i] == (LAAW_ORTHANC_CLIENT_FUNCTION_TYPE) NULL) |
460 { | 462 { |
461 throw ::OrthancClient::OrthancClientException("Unable to load the functions of the shared library"); | 463 throw ::OrthancClient::OrthancClientException("Unable to load the functions of the shared library"); |
462 } | 464 } |
782 inline const void* GetBuffer(LAAW_UINT32 y); | 784 inline const void* GetBuffer(LAAW_UINT32 y); |
783 inline LAAW_UINT64 GetDicomSize(); | 785 inline LAAW_UINT64 GetDicomSize(); |
784 inline const void* GetDicom(); | 786 inline const void* GetDicom(); |
785 inline void DiscardImage(); | 787 inline void DiscardImage(); |
786 inline void DiscardDicom(); | 788 inline void DiscardDicom(); |
789 inline void LoadTagContent(const ::std::string& path); | |
790 inline ::std::string GetLoadedTagContent() const; | |
787 }; | 791 }; |
788 } | 792 } |
789 | 793 |
790 namespace OrthancClient | 794 namespace OrthancClient |
791 { | 795 { |
1744 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*); | 1748 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*); |
1745 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(59); | 1749 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(59); |
1746 char* error = function(pimpl_); | 1750 char* error = function(pimpl_); |
1747 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1751 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
1748 } | 1752 } |
1749 } | 1753 /** |
1750 | 1754 * @brief Load a raw tag from the DICOM file. |
1755 * | |
1756 * Load a raw tag from the DICOM file. | |
1757 * | |
1758 * @param path The path to the tag of interest (e.g. "0020-000d"). | |
1759 **/ | |
1760 inline void Instance::LoadTagContent(const ::std::string& path) | |
1761 { | |
1762 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, const char*); | |
1763 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(60); | |
1764 char* error = function(pimpl_, path.c_str()); | |
1765 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | |
1766 } | |
1767 /** | |
1768 * @brief Return the value of the raw tag that was loaded by LoadContent. | |
1769 * | |
1770 * Return the value of the raw tag that was loaded by LoadContent. | |
1771 * | |
1772 * @return The tag value. | |
1773 **/ | |
1774 inline ::std::string Instance::GetLoadedTagContent() const | |
1775 { | |
1776 const char* result_; | |
1777 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (const void*, const char**); | |
1778 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(61); | |
1779 char* error = function(pimpl_, &result_); | |
1780 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | |
1781 return std::string(result_); | |
1782 } | |
1783 } | |
1784 |