Mercurial > hg > orthanc
comparison OrthancCppClient/SharedLibrary/AUTOGENERATED/OrthancCppClient.h @ 593:9d2592c08919
documentation completed
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 04 Oct 2013 15:04:37 +0200 |
parents | a00f626290db |
children | 84011417321d |
comparison
equal
deleted
inserted
replaced
592:c5ee586a0a08 | 593:9d2592c08919 |
---|---|
308 } | 308 } |
309 }; | 309 }; |
310 }} | 310 }} |
311 | 311 |
312 | 312 |
313 /*! | |
314 * \addtogroup Global Global definitions. | |
315 * @{ | |
316 * @} | |
317 */ | |
313 | 318 |
314 | 319 |
315 namespace OrthancClient { | 320 namespace OrthancClient { |
316 /*! | 321 /*! |
317 * \addtogroup Initialization Initialization of the shared library. | 322 * \addtogroup Initialization Initialization of the shared library. |
387 } | 392 } |
388 | 393 |
389 functionsIndex_[60] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_FreeString", "4"); | 394 functionsIndex_[60] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_FreeString", "4"); |
390 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"); |
391 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"); |
392 functionsIndex_[5] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_d7497fd24e4b453f2965bae9ef8330b0", "4"); | 397 functionsIndex_[5] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_e05097c153f676e5a5ee54dcfc78256f", "4"); |
393 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"); |
394 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"); |
395 functionsIndex_[8] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_3fba4d6b818180a44cd1cae6046334dc", "12"); | 400 functionsIndex_[8] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_3fba4d6b818180a44cd1cae6046334dc", "12"); |
396 functionsIndex_[9] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_aeb20dc75b9246188db857317e5e0ce7", "8"); | 401 functionsIndex_[9] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_aeb20dc75b9246188db857317e5e0ce7", "8"); |
397 functionsIndex_[10] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_62689803d9871e4d9c51a648640b320b", "8"); | 402 functionsIndex_[10] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_62689803d9871e4d9c51a648640b320b", "8"); |
405 functionsIndex_[17] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_b4ca99d958f843493e58d1ef967340e1", "8"); | 410 functionsIndex_[17] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_b4ca99d958f843493e58d1ef967340e1", "8"); |
406 functionsIndex_[18] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_78d5cc76d282437b6f93ec3b82c35701", "16"); | 411 functionsIndex_[18] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_78d5cc76d282437b6f93ec3b82c35701", "16"); |
407 functionsIndex_[12] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_6cf0d7268667f9b0aa4511bacf184919", "12"); | 412 functionsIndex_[12] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_6cf0d7268667f9b0aa4511bacf184919", "12"); |
408 functionsIndex_[13] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_7d81cd502ee27e859735d0ea7112b5a1", "4"); | 413 functionsIndex_[13] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_7d81cd502ee27e859735d0ea7112b5a1", "4"); |
409 functionsIndex_[21] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_48a2a1a9d68c047e22bfba23014643d2", "4"); | 414 functionsIndex_[21] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_48a2a1a9d68c047e22bfba23014643d2", "4"); |
410 functionsIndex_[22] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_152cb1b704c053d24b0dab7461ba6ea3", "8"); | 415 functionsIndex_[22] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_852bf8296ca21c5fde5ec565cc10721d", "8"); |
411 functionsIndex_[23] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_852bf8296ca21c5fde5ec565cc10721d", "8"); | 416 functionsIndex_[23] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_efd04574e0779faa83df1f2d8f9888db", "12"); |
412 functionsIndex_[24] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_efd04574e0779faa83df1f2d8f9888db", "12"); | 417 functionsIndex_[24] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_736247ff5e8036dac38163da6f666ed5", "8"); |
413 functionsIndex_[25] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_736247ff5e8036dac38163da6f666ed5", "8"); | 418 functionsIndex_[25] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_d82d2598a7a73f4b6fcc0c09c25b08ca", "8"); |
414 functionsIndex_[26] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_d82d2598a7a73f4b6fcc0c09c25b08ca", "8"); | 419 functionsIndex_[26] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_88134b978f9acb2aecdadf54aeab3c64", "16"); |
415 functionsIndex_[27] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_eee03f337ec81d9f1783cd41e5238757", "8"); | 420 functionsIndex_[27] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_152cb1b704c053d24b0dab7461ba6ea3", "8"); |
416 functionsIndex_[28] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_006f08237bd7611636fc721baebfb4c5", "8"); | 421 functionsIndex_[28] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_eee03f337ec81d9f1783cd41e5238757", "8"); |
417 functionsIndex_[29] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_b794f5cd3dad7d7b575dd1fd902afdd0", "8"); | 422 functionsIndex_[29] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_006f08237bd7611636fc721baebfb4c5", "8"); |
418 functionsIndex_[30] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_8ee2e50dd9df8f66a3c1766090dd03ab", "8"); | 423 functionsIndex_[30] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_b794f5cd3dad7d7b575dd1fd902afdd0", "8"); |
419 functionsIndex_[31] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_046aed35bbe4751691f4c34cc249a61d", "8"); | 424 functionsIndex_[31] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_8ee2e50dd9df8f66a3c1766090dd03ab", "8"); |
420 functionsIndex_[32] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_88134b978f9acb2aecdadf54aeab3c64", "16"); | 425 functionsIndex_[32] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_046aed35bbe4751691f4c34cc249a61d", "8"); |
421 functionsIndex_[33] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_4dcc7a0fd025efba251ac6e9b701c2c5", "28"); | 426 functionsIndex_[33] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_4dcc7a0fd025efba251ac6e9b701c2c5", "28"); |
422 functionsIndex_[34] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_b2601a161c24ad0a1d3586246f87452c", "32"); | 427 functionsIndex_[34] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_b2601a161c24ad0a1d3586246f87452c", "32"); |
423 functionsIndex_[19] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_193599b9e345384fcdfcd47c29c55342", "12"); | 428 functionsIndex_[19] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_193599b9e345384fcdfcd47c29c55342", "12"); |
424 functionsIndex_[20] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_7c97f17063a357d38c5fab1136ad12a0", "4"); | 429 functionsIndex_[20] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_7c97f17063a357d38c5fab1136ad12a0", "4"); |
425 functionsIndex_[37] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_e65b20b7e0170b67544cd6664a4639b7", "4"); | 430 functionsIndex_[37] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_e65b20b7e0170b67544cd6664a4639b7", "4"); |
439 functionsIndex_[51] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_1ea3df5a1ac1a1a687fe7325adddb6f0", "8"); | 444 functionsIndex_[51] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_1ea3df5a1ac1a1a687fe7325adddb6f0", "8"); |
440 functionsIndex_[52] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_99b4f370e4f532d8b763e2cb49db92f8", "8"); | 445 functionsIndex_[52] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_99b4f370e4f532d8b763e2cb49db92f8", "8"); |
441 functionsIndex_[53] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_c41c742b68617f1c0590577a0a5ebc0c", "8"); | 446 functionsIndex_[53] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_c41c742b68617f1c0590577a0a5ebc0c", "8"); |
442 functionsIndex_[54] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_142dd2feba0fc1d262bbd0baeb441a8b", "8"); | 447 functionsIndex_[54] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_142dd2feba0fc1d262bbd0baeb441a8b", "8"); |
443 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"); |
444 functionsIndex_[56] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_c0f494b80d4ff8b232df7a75baa0700a", "4"); | 449 functionsIndex_[56] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_9ca979fffd08fa256306d4e68d8b0e91", "8"); |
445 functionsIndex_[57] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_d604f44bd5195e082e745e9cbc164f4c", "4"); | 450 functionsIndex_[57] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_6f2d77a26edc91c28d89408dbc3c271e", "8"); |
446 functionsIndex_[58] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_9ca979fffd08fa256306d4e68d8b0e91", "8"); | 451 functionsIndex_[58] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_c0f494b80d4ff8b232df7a75baa0700a", "4"); |
447 functionsIndex_[59] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_6f2d77a26edc91c28d89408dbc3c271e", "8"); | 452 functionsIndex_[59] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_d604f44bd5195e082e745e9cbc164f4c", "4"); |
448 functionsIndex_[42] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_6c5ad02f91b583e29cebd0bd319ce21d", "12"); | 453 functionsIndex_[42] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_6c5ad02f91b583e29cebd0bd319ce21d", "12"); |
449 functionsIndex_[43] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_4068241c44a9c1367fe0e57be523f207", "4"); | 454 functionsIndex_[43] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_4068241c44a9c1367fe0e57be523f207", "4"); |
450 | 455 |
451 /* Check whether the functions were properly loaded */ | 456 /* Check whether the functions were properly loaded */ |
452 for (unsigned int i = 0; i <= 60; i++) | 457 for (unsigned int i = 0; i <= 60; i++) |
482 class Instance; | 487 class Instance; |
483 } | 488 } |
484 | 489 |
485 namespace Orthanc | 490 namespace Orthanc |
486 { | 491 { |
492 /** | |
493 * @brief The memory layout of the pixels (resp. voxels) of a 2D (resp. 3D) image. | |
494 * | |
495 * The memory layout of the pixels (resp. voxels) of a 2D (resp. 3D) image. | |
496 * | |
497 * @ingroup Global | |
498 **/ | |
487 enum PixelFormat | 499 enum PixelFormat |
488 { | 500 { |
501 /** | |
502 * @brief Graylevel, signed 16bpp image. | |
503 * | |
504 * The image is graylevel. Each pixel is signed and stored in two bytes. | |
505 * | |
506 **/ | |
489 PixelFormat_SignedGrayscale16 = 3, | 507 PixelFormat_SignedGrayscale16 = 3, |
508 /** | |
509 * @brief Color image in RGB24 format. | |
510 * | |
511 * Color image in RGB24 format. | |
512 * | |
513 **/ | |
490 PixelFormat_RGB24 = 0, | 514 PixelFormat_RGB24 = 0, |
515 /** | |
516 * @brief Graylevel 8bpp image. | |
517 * | |
518 * The image is graylevel. Each pixel is unsigned and stored in one byte. | |
519 * | |
520 **/ | |
491 PixelFormat_Grayscale8 = 1, | 521 PixelFormat_Grayscale8 = 1, |
522 /** | |
523 * @brief Graylevel, unsigned 16bpp image. | |
524 * | |
525 * The image is graylevel. Each pixel is unsigned and stored in two bytes. | |
526 * | |
527 **/ | |
492 PixelFormat_Grayscale16 = 2 | 528 PixelFormat_Grayscale16 = 2 |
493 }; | 529 }; |
494 } | 530 } |
495 | 531 |
496 namespace Orthanc | 532 namespace Orthanc |
497 { | 533 { |
534 /** | |
535 * @brief The extraction mode specifies the way the values of the pixels are scaled when downloading a 2D image. | |
536 * | |
537 * The extraction mode specifies the way the values of the pixels are scaled when downloading a 2D image. | |
538 * | |
539 * @ingroup Global | |
540 **/ | |
498 enum ImageExtractionMode | 541 enum ImageExtractionMode |
499 { | 542 { |
543 /** | |
544 * @brief Truncation to the [-32768, 32767] range. | |
545 * | |
546 * Truncation to the [-32768, 32767] range. | |
547 * | |
548 **/ | |
500 ImageExtractionMode_Int16 = 3, | 549 ImageExtractionMode_Int16 = 3, |
550 /** | |
551 * @brief Rescaled to 8bpp. | |
552 * | |
553 * The minimum value of the image is set to 0, and its maximum value is set to 255. | |
554 * | |
555 **/ | |
501 ImageExtractionMode_Preview = 0, | 556 ImageExtractionMode_Preview = 0, |
557 /** | |
558 * @brief Truncation to the [0, 255] range. | |
559 * | |
560 * Truncation to the [0, 255] range. | |
561 * | |
562 **/ | |
502 ImageExtractionMode_UInt8 = 1, | 563 ImageExtractionMode_UInt8 = 1, |
564 /** | |
565 * @brief Truncation to the [0, 65535] range. | |
566 * | |
567 * Truncation to the [0, 65535] range. | |
568 * | |
569 **/ | |
503 ImageExtractionMode_UInt16 = 2 | 570 ImageExtractionMode_UInt16 = 2 |
504 }; | 571 }; |
505 } | 572 } |
506 | 573 |
507 namespace OrthancClient | 574 namespace OrthancClient |
508 { | 575 { |
509 /** | 576 /** |
510 * @brief Connection to an instance of %Orthanc. | 577 * @brief Connection to an instance of %Orthanc. |
511 * | 578 * |
512 * This class encapsulates a connection to an instance of %Orthanc through its REST API. | 579 * This class encapsulates a connection to a remote instance of %Orthanc through its REST API. |
513 * | 580 * |
514 **/ | 581 **/ |
515 class OrthancConnection | 582 class OrthancConnection |
516 { | 583 { |
517 friend class ::OrthancClient::Patient; | 584 friend class ::OrthancClient::Patient; |
535 inline OrthancConnection(const ::std::string& orthancUrl); | 602 inline OrthancConnection(const ::std::string& orthancUrl); |
536 inline OrthancConnection(const ::std::string& orthancUrl, const ::std::string& username, const ::std::string& password); | 603 inline OrthancConnection(const ::std::string& orthancUrl, const ::std::string& username, const ::std::string& password); |
537 inline ~OrthancConnection(); | 604 inline ~OrthancConnection(); |
538 inline LAAW_UINT32 GetThreadCount() const; | 605 inline LAAW_UINT32 GetThreadCount() const; |
539 inline void SetThreadCount(LAAW_UINT32 threadCount); | 606 inline void SetThreadCount(LAAW_UINT32 threadCount); |
540 inline void Refresh(); | 607 inline void Reload(); |
541 inline ::std::string GetOrthancUrl() const; | 608 inline ::std::string GetOrthancUrl() const; |
542 inline LAAW_UINT32 GetPatientCount(); | 609 inline LAAW_UINT32 GetPatientCount(); |
543 inline ::OrthancClient::Patient GetPatient(LAAW_UINT32 index); | 610 inline ::OrthancClient::Patient GetPatient(LAAW_UINT32 index); |
544 inline void DeletePatient(LAAW_UINT32 index); | 611 inline void DeletePatient(LAAW_UINT32 index); |
545 inline void StoreFile(const ::std::string& filename); | 612 inline void StoreFile(const ::std::string& filename); |
547 }; | 614 }; |
548 } | 615 } |
549 | 616 |
550 namespace OrthancClient | 617 namespace OrthancClient |
551 { | 618 { |
619 /** | |
620 * @brief Connection to a patient stored in %Orthanc. | |
621 * | |
622 * This class encapsulates a connection to a patient from a remote instance of %Orthanc. | |
623 * | |
624 **/ | |
552 class Patient | 625 class Patient |
553 { | 626 { |
554 friend class ::OrthancClient::OrthancConnection; | 627 friend class ::OrthancClient::OrthancConnection; |
555 friend class ::OrthancClient::Series; | 628 friend class ::OrthancClient::Series; |
556 friend class ::OrthancClient::Study; | 629 friend class ::OrthancClient::Study; |
579 }; | 652 }; |
580 } | 653 } |
581 | 654 |
582 namespace OrthancClient | 655 namespace OrthancClient |
583 { | 656 { |
657 /** | |
658 * @brief Connection to a series stored in %Orthanc. | |
659 * | |
660 * This class encapsulates a connection to a series from a remote instance of %Orthanc. | |
661 * | |
662 **/ | |
584 class Series | 663 class Series |
585 { | 664 { |
586 friend class ::OrthancClient::OrthancConnection; | 665 friend class ::OrthancClient::OrthancConnection; |
587 friend class ::OrthancClient::Patient; | 666 friend class ::OrthancClient::Patient; |
588 friend class ::OrthancClient::Study; | 667 friend class ::OrthancClient::Study; |
602 **/ | 681 **/ |
603 Series(const Series& other) : pimpl_(other.pimpl_), isReference_(true) { } | 682 Series(const Series& other) : pimpl_(other.pimpl_), isReference_(true) { } |
604 inline Series(::OrthancClient::OrthancConnection& connection, const ::std::string& id); | 683 inline Series(::OrthancClient::OrthancConnection& connection, const ::std::string& id); |
605 inline ~Series(); | 684 inline ~Series(); |
606 inline void Reload(); | 685 inline void Reload(); |
607 inline bool Is3DImage(); | |
608 inline LAAW_UINT32 GetInstanceCount(); | 686 inline LAAW_UINT32 GetInstanceCount(); |
609 inline ::OrthancClient::Instance GetInstance(LAAW_UINT32 index); | 687 inline ::OrthancClient::Instance GetInstance(LAAW_UINT32 index); |
610 inline ::std::string GetId() const; | 688 inline ::std::string GetId() const; |
611 inline ::std::string GetUrl() const; | 689 inline ::std::string GetUrl() const; |
690 inline ::std::string GetMainDicomTag(const ::std::string& tag, const ::std::string& defaultValue) const; | |
691 inline bool Is3DImage(); | |
612 inline LAAW_UINT32 GetWidth(); | 692 inline LAAW_UINT32 GetWidth(); |
613 inline LAAW_UINT32 GetHeight(); | 693 inline LAAW_UINT32 GetHeight(); |
614 inline float GetVoxelSizeX(); | 694 inline float GetVoxelSizeX(); |
615 inline float GetVoxelSizeY(); | 695 inline float GetVoxelSizeY(); |
616 inline float GetVoxelSizeZ(); | 696 inline float GetVoxelSizeZ(); |
617 inline ::std::string GetMainDicomTag(const ::std::string& tag, const ::std::string& defaultValue) const; | |
618 inline void Load3DImage(void* target, ::Orthanc::PixelFormat format, LAAW_INT64 lineStride, LAAW_INT64 stackStride); | 697 inline void Load3DImage(void* target, ::Orthanc::PixelFormat format, LAAW_INT64 lineStride, LAAW_INT64 stackStride); |
619 inline void Load3DImage(void* target, ::Orthanc::PixelFormat format, LAAW_INT64 lineStride, LAAW_INT64 stackStride, float progress[]); | 698 inline void Load3DImage(void* target, ::Orthanc::PixelFormat format, LAAW_INT64 lineStride, LAAW_INT64 stackStride, float progress[]); |
620 }; | 699 }; |
621 } | 700 } |
622 | 701 |
623 namespace OrthancClient | 702 namespace OrthancClient |
624 { | 703 { |
704 /** | |
705 * @brief Connection to a study stored in %Orthanc. | |
706 * | |
707 * This class encapsulates a connection to a study from a remote instance of %Orthanc. | |
708 * | |
709 **/ | |
625 class Study | 710 class Study |
626 { | 711 { |
627 friend class ::OrthancClient::OrthancConnection; | 712 friend class ::OrthancClient::OrthancConnection; |
628 friend class ::OrthancClient::Patient; | 713 friend class ::OrthancClient::Patient; |
629 friend class ::OrthancClient::Series; | 714 friend class ::OrthancClient::Series; |
652 }; | 737 }; |
653 } | 738 } |
654 | 739 |
655 namespace OrthancClient | 740 namespace OrthancClient |
656 { | 741 { |
742 /** | |
743 * @brief Connection to an instance stored in %Orthanc. | |
744 * | |
745 * This class encapsulates a connection to an image instance from a remote instance of %Orthanc. | |
746 * | |
747 **/ | |
657 class Instance | 748 class Instance |
658 { | 749 { |
659 friend class ::OrthancClient::OrthancConnection; | 750 friend class ::OrthancClient::OrthancConnection; |
660 friend class ::OrthancClient::Patient; | 751 friend class ::OrthancClient::Patient; |
661 friend class ::OrthancClient::Series; | 752 friend class ::OrthancClient::Series; |
686 inline LAAW_UINT32 GetHeight(); | 777 inline LAAW_UINT32 GetHeight(); |
687 inline LAAW_UINT32 GetPitch(); | 778 inline LAAW_UINT32 GetPitch(); |
688 inline ::Orthanc::PixelFormat GetPixelFormat(); | 779 inline ::Orthanc::PixelFormat GetPixelFormat(); |
689 inline const void* GetBuffer(); | 780 inline const void* GetBuffer(); |
690 inline const void* GetBuffer(LAAW_UINT32 y); | 781 inline const void* GetBuffer(LAAW_UINT32 y); |
782 inline LAAW_UINT64 GetDicomSize(); | |
783 inline const void* GetDicom(); | |
691 inline void DiscardImage(); | 784 inline void DiscardImage(); |
692 inline void DiscardDicom(); | 785 inline void DiscardDicom(); |
693 inline LAAW_UINT64 GetDicomSize(); | |
694 inline const void* GetDicom(); | |
695 }; | 786 }; |
696 } | 787 } |
697 | 788 |
698 namespace OrthancClient | 789 namespace OrthancClient |
699 { | 790 { |
772 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(4); | 863 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(4); |
773 char* error = function(pimpl_, threadCount); | 864 char* error = function(pimpl_, threadCount); |
774 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 865 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
775 } | 866 } |
776 /** | 867 /** |
777 * @brief Refresh the list of the patients. | 868 * @brief Reload the list of the patients. |
778 * | 869 * |
779 * 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. | 870 * 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. |
780 * | 871 * |
781 **/ | 872 **/ |
782 inline void OrthancConnection::Refresh() | 873 inline void OrthancConnection::Reload() |
783 { | 874 { |
784 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*); | 875 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*); |
785 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(5); | 876 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(5); |
786 char* error = function(pimpl_); | 877 char* error = function(pimpl_); |
787 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 878 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
881 } | 972 } |
882 } | 973 } |
883 | 974 |
884 namespace OrthancClient | 975 namespace OrthancClient |
885 { | 976 { |
977 /** | |
978 * @brief Create a connection to some patient. | |
979 * | |
980 * Create a connection to some patient. | |
981 * | |
982 * @param connection The remote instance of %Orthanc. | |
983 * @param id The %Orthanc identifier of the patient. | |
984 **/ | |
886 inline Patient::Patient(::OrthancClient::OrthancConnection& connection, const ::std::string& id) | 985 inline Patient::Patient(::OrthancClient::OrthancConnection& connection, const ::std::string& id) |
887 { | 986 { |
888 isReference_ = false; | 987 isReference_ = false; |
889 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void**, void*, const char*); | 988 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void**, void*, const char*); |
890 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(12); | 989 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(12); |
903 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*); | 1002 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*); |
904 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(13); | 1003 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(13); |
905 char* error = function(pimpl_); | 1004 char* error = function(pimpl_); |
906 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1005 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
907 } | 1006 } |
1007 /** | |
1008 * @brief Reload the studies of this patient. | |
1009 * | |
1010 * This method will reload the list of the studies of this patient. Pay attention to the fact that the studies that have been previously returned by GetStudy() will be invalidated. | |
1011 * | |
1012 **/ | |
908 inline void Patient::Reload() | 1013 inline void Patient::Reload() |
909 { | 1014 { |
910 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*); | 1015 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*); |
911 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(14); | 1016 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(14); |
912 char* error = function(pimpl_); | 1017 char* error = function(pimpl_); |
913 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1018 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
914 } | 1019 } |
1020 /** | |
1021 * @brief Return the number of studies for this patient. | |
1022 * | |
1023 * Return the number of studies for this patient. | |
1024 * | |
1025 * @return The number of studies. | |
1026 **/ | |
915 inline LAAW_UINT32 Patient::GetStudyCount() | 1027 inline LAAW_UINT32 Patient::GetStudyCount() |
916 { | 1028 { |
917 LAAW_UINT32 result_; | 1029 LAAW_UINT32 result_; |
918 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, LAAW_UINT32*); | 1030 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, LAAW_UINT32*); |
919 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(15); | 1031 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(15); |
920 char* error = function(pimpl_, &result_); | 1032 char* error = function(pimpl_, &result_); |
921 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1033 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
922 return result_; | 1034 return result_; |
923 } | 1035 } |
1036 /** | |
1037 * @brief Get some study of this patient. | |
1038 * | |
1039 * This method will return an object that contains information about some study. The studies are indexed by a number between 0 (inclusive) and the result of GetStudyCount() (exclusive). | |
1040 * | |
1041 * @param index The index of the study of interest. | |
1042 * @return The study. | |
1043 **/ | |
924 inline ::OrthancClient::Study Patient::GetStudy(LAAW_UINT32 index) | 1044 inline ::OrthancClient::Study Patient::GetStudy(LAAW_UINT32 index) |
925 { | 1045 { |
926 void* result_; | 1046 void* result_; |
927 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, void**, LAAW_UINT32); | 1047 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, void**, LAAW_UINT32); |
928 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(16); | 1048 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(16); |
929 char* error = function(pimpl_, &result_, index); | 1049 char* error = function(pimpl_, &result_, index); |
930 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1050 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
931 return ::OrthancClient::Study(result_); | 1051 return ::OrthancClient::Study(result_); |
932 } | 1052 } |
1053 /** | |
1054 * @brief Get the %Orthanc identifier of this patient. | |
1055 * | |
1056 * Get the %Orthanc identifier of this patient. | |
1057 * | |
1058 * @return The identifier. | |
1059 **/ | |
933 inline ::std::string Patient::GetId() const | 1060 inline ::std::string Patient::GetId() const |
934 { | 1061 { |
935 const char* result_; | 1062 const char* result_; |
936 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (const void*, const char**); | 1063 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (const void*, const char**); |
937 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(17); | 1064 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(17); |
938 char* error = function(pimpl_, &result_); | 1065 char* error = function(pimpl_, &result_); |
939 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1066 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
940 return std::string(result_); | 1067 return std::string(result_); |
941 } | 1068 } |
1069 /** | |
1070 * @brief Get the value of one of the main DICOM tags for this patient. | |
1071 * | |
1072 * Get the value of one of the main DICOM tags for this patient. | |
1073 * | |
1074 * @param tag The name of the tag of interest ("PatientName", "PatientID", "PatientSex" or "PatientBirthDate"). | |
1075 * @param defaultValue The default value to be returned if this tag does not exist. | |
1076 * @return The value of the tag. | |
1077 **/ | |
942 inline ::std::string Patient::GetMainDicomTag(const ::std::string& tag, const ::std::string& defaultValue) const | 1078 inline ::std::string Patient::GetMainDicomTag(const ::std::string& tag, const ::std::string& defaultValue) const |
943 { | 1079 { |
944 const char* result_; | 1080 const char* result_; |
945 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (const void*, const char**, const char*, const char*); | 1081 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (const void*, const char**, const char*, const char*); |
946 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(18); | 1082 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(18); |
950 } | 1086 } |
951 } | 1087 } |
952 | 1088 |
953 namespace OrthancClient | 1089 namespace OrthancClient |
954 { | 1090 { |
1091 /** | |
1092 * @brief Create a connection to some series. | |
1093 * | |
1094 * Create a connection to some series. | |
1095 * | |
1096 * @param connection The remote instance of %Orthanc. | |
1097 * @param id The %Orthanc identifier of the series. | |
1098 **/ | |
955 inline Series::Series(::OrthancClient::OrthancConnection& connection, const ::std::string& id) | 1099 inline Series::Series(::OrthancClient::OrthancConnection& connection, const ::std::string& id) |
956 { | 1100 { |
957 isReference_ = false; | 1101 isReference_ = false; |
958 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void**, void*, const char*); | 1102 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void**, void*, const char*); |
959 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(19); | 1103 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(19); |
972 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*); | 1116 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*); |
973 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(20); | 1117 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(20); |
974 char* error = function(pimpl_); | 1118 char* error = function(pimpl_); |
975 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1119 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
976 } | 1120 } |
1121 /** | |
1122 * @brief Reload the instances of this series. | |
1123 * | |
1124 * This method will reload the list of the instances of this series. Pay attention to the fact that the instances that have been previously returned by GetInstance() will be invalidated. | |
1125 * | |
1126 **/ | |
977 inline void Series::Reload() | 1127 inline void Series::Reload() |
978 { | 1128 { |
979 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*); | 1129 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*); |
980 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(21); | 1130 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(21); |
981 char* error = function(pimpl_); | 1131 char* error = function(pimpl_); |
982 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1132 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
983 } | 1133 } |
984 inline bool Series::Is3DImage() | 1134 /** |
985 { | 1135 * @brief Return the number of instances for this series. |
986 LAAW_INT32 result_; | 1136 * |
987 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, LAAW_INT32*); | 1137 * Return the number of instances for this series. |
988 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(22); | 1138 * |
989 char* error = function(pimpl_, &result_); | 1139 * @return The number of instances. |
990 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1140 **/ |
991 return result_ != 0; | |
992 } | |
993 inline LAAW_UINT32 Series::GetInstanceCount() | 1141 inline LAAW_UINT32 Series::GetInstanceCount() |
994 { | 1142 { |
995 LAAW_UINT32 result_; | 1143 LAAW_UINT32 result_; |
996 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, LAAW_UINT32*); | 1144 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, LAAW_UINT32*); |
997 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(23); | 1145 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(22); |
998 char* error = function(pimpl_, &result_); | 1146 char* error = function(pimpl_, &result_); |
999 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1147 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
1000 return result_; | 1148 return result_; |
1001 } | 1149 } |
1150 /** | |
1151 * @brief Get some instance of this series. | |
1152 * | |
1153 * This method will return an object that contains information about some instance. The instances are indexed by a number between 0 (inclusive) and the result of GetInstanceCount() (exclusive). | |
1154 * | |
1155 * @param index The index of the instance of interest. | |
1156 * @return The instance. | |
1157 **/ | |
1002 inline ::OrthancClient::Instance Series::GetInstance(LAAW_UINT32 index) | 1158 inline ::OrthancClient::Instance Series::GetInstance(LAAW_UINT32 index) |
1003 { | 1159 { |
1004 void* result_; | 1160 void* result_; |
1005 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, void**, LAAW_UINT32); | 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_); | |
1166 } | |
1167 /** | |
1168 * @brief Get the %Orthanc identifier of this series. | |
1169 * | |
1170 * Get the %Orthanc identifier of this series. | |
1171 * | |
1172 * @return The identifier. | |
1173 **/ | |
1174 inline ::std::string Series::GetId() const | |
1175 { | |
1176 const char* result_; | |
1177 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (const void*, const char**); | |
1006 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(24); | 1178 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(24); |
1007 char* error = function(pimpl_, &result_, index); | 1179 char* error = function(pimpl_, &result_); |
1008 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1180 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
1009 return ::OrthancClient::Instance(result_); | 1181 return std::string(result_); |
1010 } | 1182 } |
1011 inline ::std::string Series::GetId() const | 1183 /** |
1184 * @brief Returns the URL to this series. | |
1185 * | |
1186 * Returns the URL to this series. | |
1187 * | |
1188 * @return The URL. | |
1189 **/ | |
1190 inline ::std::string Series::GetUrl() const | |
1012 { | 1191 { |
1013 const char* result_; | 1192 const char* result_; |
1014 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (const void*, const char**); | 1193 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (const void*, const char**); |
1015 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(25); | 1194 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(25); |
1016 char* error = function(pimpl_, &result_); | 1195 char* error = function(pimpl_, &result_); |
1017 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1196 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
1018 return std::string(result_); | 1197 return std::string(result_); |
1019 } | 1198 } |
1020 inline ::std::string Series::GetUrl() const | 1199 /** |
1200 * @brief Get the value of one of the main DICOM tags for this series. | |
1201 * | |
1202 * Get the value of one of the main DICOM tags for this series. | |
1203 * | |
1204 * @param tag The name of the tag of interest ("Modality", "Manufacturer", "SeriesDate", "SeriesDescription", "SeriesInstanceUID"...). | |
1205 * @param defaultValue The default value to be returned if this tag does not exist. | |
1206 * @return The value of the tag. | |
1207 **/ | |
1208 inline ::std::string Series::GetMainDicomTag(const ::std::string& tag, const ::std::string& defaultValue) const | |
1021 { | 1209 { |
1022 const char* result_; | 1210 const char* result_; |
1023 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (const void*, const char**); | 1211 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (const void*, const char**, const char*, const char*); |
1024 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(26); | 1212 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(26); |
1025 char* error = function(pimpl_, &result_); | 1213 char* error = function(pimpl_, &result_, tag.c_str(), defaultValue.c_str()); |
1026 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1214 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
1027 return std::string(result_); | 1215 return std::string(result_); |
1028 } | 1216 } |
1217 /** | |
1218 * @brief Test whether this series encodes a 3D image that can be downloaded from %Orthanc. | |
1219 * | |
1220 * Test whether this series encodes a 3D image that can be downloaded from %Orthanc. | |
1221 * | |
1222 * @return "true" if and only if this is a 3D image. | |
1223 **/ | |
1224 inline bool Series::Is3DImage() | |
1225 { | |
1226 LAAW_INT32 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; | |
1232 } | |
1233 /** | |
1234 * @brief Get the width of the 3D image. | |
1235 * | |
1236 * Get the width of the 3D image (i.e. along the X-axis). This call is only valid if this series corresponds to a 3D image. | |
1237 * | |
1238 * @return The width. | |
1239 **/ | |
1029 inline LAAW_UINT32 Series::GetWidth() | 1240 inline LAAW_UINT32 Series::GetWidth() |
1030 { | |
1031 LAAW_UINT32 result_; | |
1032 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, LAAW_UINT32*); | |
1033 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(27); | |
1034 char* error = function(pimpl_, &result_); | |
1035 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | |
1036 return result_; | |
1037 } | |
1038 inline LAAW_UINT32 Series::GetHeight() | |
1039 { | 1241 { |
1040 LAAW_UINT32 result_; | 1242 LAAW_UINT32 result_; |
1041 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, LAAW_UINT32*); | 1243 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, LAAW_UINT32*); |
1042 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(28); | 1244 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(28); |
1043 char* error = function(pimpl_, &result_); | 1245 char* error = function(pimpl_, &result_); |
1044 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1246 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
1045 return result_; | 1247 return result_; |
1046 } | 1248 } |
1249 /** | |
1250 * @brief Get the height of the 3D image. | |
1251 * | |
1252 * Get the height of the 3D image (i.e. along the Y-axis). This call is only valid if this series corresponds to a 3D image. | |
1253 * | |
1254 * @return The height. | |
1255 **/ | |
1256 inline LAAW_UINT32 Series::GetHeight() | |
1257 { | |
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); | |
1263 return result_; | |
1264 } | |
1265 /** | |
1266 * @brief Get the physical size of a voxel along the X-axis. | |
1267 * | |
1268 * Get the physical size of a voxel along the X-axis. This call is only valid if this series corresponds to a 3D image. | |
1269 * | |
1270 * @return The voxel size. | |
1271 **/ | |
1047 inline float Series::GetVoxelSizeX() | 1272 inline float Series::GetVoxelSizeX() |
1048 { | |
1049 float result_; | |
1050 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, float*); | |
1051 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(29); | |
1052 char* error = function(pimpl_, &result_); | |
1053 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | |
1054 return result_; | |
1055 } | |
1056 inline float Series::GetVoxelSizeY() | |
1057 { | 1273 { |
1058 float result_; | 1274 float result_; |
1059 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, float*); | 1275 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, float*); |
1060 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(30); | 1276 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(30); |
1061 char* error = function(pimpl_, &result_); | 1277 char* error = function(pimpl_, &result_); |
1062 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1278 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
1063 return result_; | 1279 return result_; |
1064 } | 1280 } |
1065 inline float Series::GetVoxelSizeZ() | 1281 /** |
1282 * @brief Get the physical size of a voxel along the Y-axis. | |
1283 * | |
1284 * Get the physical size of a voxel along the Y-axis. This call is only valid if this series corresponds to a 3D image. | |
1285 * | |
1286 * @return The voxel size. | |
1287 **/ | |
1288 inline float Series::GetVoxelSizeY() | |
1066 { | 1289 { |
1067 float result_; | 1290 float result_; |
1068 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, float*); | 1291 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, float*); |
1069 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(31); | 1292 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(31); |
1070 char* error = function(pimpl_, &result_); | 1293 char* error = function(pimpl_, &result_); |
1071 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1294 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
1072 return result_; | 1295 return result_; |
1073 } | 1296 } |
1074 inline ::std::string Series::GetMainDicomTag(const ::std::string& tag, const ::std::string& defaultValue) const | 1297 /** |
1075 { | 1298 * @brief Get the physical size of a voxel along the Z-axis. |
1076 const char* result_; | 1299 * |
1077 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (const void*, const char**, const char*, const char*); | 1300 * Get the physical size of a voxel along the Z-axis. This call is only valid if this series corresponds to a 3D image. |
1301 * | |
1302 * @return The voxel size. | |
1303 **/ | |
1304 inline float Series::GetVoxelSizeZ() | |
1305 { | |
1306 float result_; | |
1307 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, float*); | |
1078 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(32); | 1308 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(32); |
1079 char* error = function(pimpl_, &result_, tag.c_str(), defaultValue.c_str()); | 1309 char* error = function(pimpl_, &result_); |
1080 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1310 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
1081 return std::string(result_); | 1311 return result_; |
1082 } | 1312 } |
1313 /** | |
1314 * @brief Load the 3D image into a memory buffer. | |
1315 * | |
1316 * Load the 3D image into a memory buffer. This call is only valid if this series corresponds to a 3D image. The "target" buffer must be wide enough to store all the voxels of the image. | |
1317 * | |
1318 * @param target The target memory buffer. | |
1319 * @param format The memory layout of the voxels. | |
1320 * @param lineStride The number of bytes between two lines in the target memory buffer. | |
1321 * @param stackStride The number of bytes between two 2D slices in the target memory buffer. | |
1322 **/ | |
1083 inline void Series::Load3DImage(void* target, ::Orthanc::PixelFormat format, LAAW_INT64 lineStride, LAAW_INT64 stackStride) | 1323 inline void Series::Load3DImage(void* target, ::Orthanc::PixelFormat format, LAAW_INT64 lineStride, LAAW_INT64 stackStride) |
1084 { | 1324 { |
1085 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, void*, LAAW_INT32, LAAW_INT64, LAAW_INT64); | 1325 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, void*, LAAW_INT32, LAAW_INT64, LAAW_INT64); |
1086 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(33); | 1326 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(33); |
1087 char* error = function(pimpl_, target, format, lineStride, stackStride); | 1327 char* error = function(pimpl_, target, format, lineStride, stackStride); |
1088 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1328 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
1089 } | 1329 } |
1330 /** | |
1331 * @brief Load the 3D image into a memory buffer. | |
1332 * | |
1333 * Load the 3D image into a memory buffer. This call is only valid if this series corresponds to a 3D image. The "target" buffer must be wide enough to store all the voxels of the image. This method will also update a progress indicator to monitor the loading of the image. | |
1334 * | |
1335 * @param target The target memory buffer. | |
1336 * @param format The memory layout of the voxels. | |
1337 * @param lineStride The number of bytes between two lines in the target memory buffer. | |
1338 * @param stackStride The number of bytes between two 2D slices in the target memory buffer. | |
1339 * @param progress A pointer to a floating-point number that is continuously updated by the download threads to reflect the percentage of completion (between 0 and 1). This value can be read from a separate thread. | |
1340 **/ | |
1090 inline void Series::Load3DImage(void* target, ::Orthanc::PixelFormat format, LAAW_INT64 lineStride, LAAW_INT64 stackStride, float progress[]) | 1341 inline void Series::Load3DImage(void* target, ::Orthanc::PixelFormat format, LAAW_INT64 lineStride, LAAW_INT64 stackStride, float progress[]) |
1091 { | 1342 { |
1092 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, void*, LAAW_INT32, LAAW_INT64, LAAW_INT64, float*); | 1343 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, void*, LAAW_INT32, LAAW_INT64, LAAW_INT64, float*); |
1093 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(34); | 1344 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(34); |
1094 char* error = function(pimpl_, target, format, lineStride, stackStride, progress); | 1345 char* error = function(pimpl_, target, format, lineStride, stackStride, progress); |
1096 } | 1347 } |
1097 } | 1348 } |
1098 | 1349 |
1099 namespace OrthancClient | 1350 namespace OrthancClient |
1100 { | 1351 { |
1352 /** | |
1353 * @brief Create a connection to some study. | |
1354 * | |
1355 * Create a connection to some study. | |
1356 * | |
1357 * @param connection The remote instance of %Orthanc. | |
1358 * @param id The %Orthanc identifier of the study. | |
1359 **/ | |
1101 inline Study::Study(::OrthancClient::OrthancConnection& connection, const ::std::string& id) | 1360 inline Study::Study(::OrthancClient::OrthancConnection& connection, const ::std::string& id) |
1102 { | 1361 { |
1103 isReference_ = false; | 1362 isReference_ = false; |
1104 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void**, void*, const char*); | 1363 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void**, void*, const char*); |
1105 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(35); | 1364 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(35); |
1118 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*); | 1377 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*); |
1119 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(36); | 1378 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(36); |
1120 char* error = function(pimpl_); | 1379 char* error = function(pimpl_); |
1121 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1380 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
1122 } | 1381 } |
1382 /** | |
1383 * @brief Reload the series of this study. | |
1384 * | |
1385 * This method will reload the list of the series of this study. Pay attention to the fact that the series that have been previously returned by GetSeries() will be invalidated. | |
1386 * | |
1387 **/ | |
1123 inline void Study::Reload() | 1388 inline void Study::Reload() |
1124 { | 1389 { |
1125 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*); | 1390 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*); |
1126 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(37); | 1391 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(37); |
1127 char* error = function(pimpl_); | 1392 char* error = function(pimpl_); |
1128 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1393 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
1129 } | 1394 } |
1395 /** | |
1396 * @brief Return the number of series for this study. | |
1397 * | |
1398 * Return the number of series for this study. | |
1399 * | |
1400 * @return The number of series. | |
1401 **/ | |
1130 inline LAAW_UINT32 Study::GetSeriesCount() | 1402 inline LAAW_UINT32 Study::GetSeriesCount() |
1131 { | 1403 { |
1132 LAAW_UINT32 result_; | 1404 LAAW_UINT32 result_; |
1133 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, LAAW_UINT32*); | 1405 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, LAAW_UINT32*); |
1134 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(38); | 1406 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(38); |
1135 char* error = function(pimpl_, &result_); | 1407 char* error = function(pimpl_, &result_); |
1136 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1408 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
1137 return result_; | 1409 return result_; |
1138 } | 1410 } |
1411 /** | |
1412 * @brief Get some series of this study. | |
1413 * | |
1414 * This method will return an object that contains information about some series. The series are indexed by a number between 0 (inclusive) and the result of GetSeriesCount() (exclusive). | |
1415 * | |
1416 * @param index The index of the series of interest. | |
1417 * @return The series. | |
1418 **/ | |
1139 inline ::OrthancClient::Series Study::GetSeries(LAAW_UINT32 index) | 1419 inline ::OrthancClient::Series Study::GetSeries(LAAW_UINT32 index) |
1140 { | 1420 { |
1141 void* result_; | 1421 void* result_; |
1142 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, void**, LAAW_UINT32); | 1422 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, void**, LAAW_UINT32); |
1143 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(39); | 1423 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(39); |
1144 char* error = function(pimpl_, &result_, index); | 1424 char* error = function(pimpl_, &result_, index); |
1145 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1425 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
1146 return ::OrthancClient::Series(result_); | 1426 return ::OrthancClient::Series(result_); |
1147 } | 1427 } |
1428 /** | |
1429 * @brief Get the %Orthanc identifier of this study. | |
1430 * | |
1431 * Get the %Orthanc identifier of this study. | |
1432 * | |
1433 * @return The identifier. | |
1434 **/ | |
1148 inline ::std::string Study::GetId() const | 1435 inline ::std::string Study::GetId() const |
1149 { | 1436 { |
1150 const char* result_; | 1437 const char* result_; |
1151 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (const void*, const char**); | 1438 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (const void*, const char**); |
1152 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(40); | 1439 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(40); |
1153 char* error = function(pimpl_, &result_); | 1440 char* error = function(pimpl_, &result_); |
1154 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1441 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
1155 return std::string(result_); | 1442 return std::string(result_); |
1156 } | 1443 } |
1444 /** | |
1445 * @brief Get the value of one of the main DICOM tags for this study. | |
1446 * | |
1447 * Get the value of one of the main DICOM tags for this study. | |
1448 * | |
1449 * @param tag The name of the tag of interest ("StudyDate", "StudyDescription", "StudyInstanceUID" or "StudyTime"). | |
1450 * @param defaultValue The default value to be returned if this tag does not exist. | |
1451 * @return The value of the tag. | |
1452 **/ | |
1157 inline ::std::string Study::GetMainDicomTag(const ::std::string& tag, const ::std::string& defaultValue) const | 1453 inline ::std::string Study::GetMainDicomTag(const ::std::string& tag, const ::std::string& defaultValue) const |
1158 { | 1454 { |
1159 const char* result_; | 1455 const char* result_; |
1160 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (const void*, const char**, const char*, const char*); | 1456 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (const void*, const char**, const char*, const char*); |
1161 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(41); | 1457 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(41); |
1165 } | 1461 } |
1166 } | 1462 } |
1167 | 1463 |
1168 namespace OrthancClient | 1464 namespace OrthancClient |
1169 { | 1465 { |
1466 /** | |
1467 * @brief Create a connection to some image instance. | |
1468 * | |
1469 * Create a connection to some image instance. | |
1470 * | |
1471 * @param connection The remote instance of %Orthanc. | |
1472 * @param id The %Orthanc identifier of the image instance. | |
1473 **/ | |
1170 inline Instance::Instance(::OrthancClient::OrthancConnection& connection, const ::std::string& id) | 1474 inline Instance::Instance(::OrthancClient::OrthancConnection& connection, const ::std::string& id) |
1171 { | 1475 { |
1172 isReference_ = false; | 1476 isReference_ = false; |
1173 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void**, void*, const char*); | 1477 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void**, void*, const char*); |
1174 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(42); | 1478 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(42); |
1187 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*); | 1491 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*); |
1188 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(43); | 1492 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(43); |
1189 char* error = function(pimpl_); | 1493 char* error = function(pimpl_); |
1190 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1494 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
1191 } | 1495 } |
1496 /** | |
1497 * @brief Get the %Orthanc identifier of this identifier. | |
1498 * | |
1499 * Get the %Orthanc identifier of this identifier. | |
1500 * | |
1501 * @return The identifier. | |
1502 **/ | |
1192 inline ::std::string Instance::GetId() const | 1503 inline ::std::string Instance::GetId() const |
1193 { | 1504 { |
1194 const char* result_; | 1505 const char* result_; |
1195 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (const void*, const char**); | 1506 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (const void*, const char**); |
1196 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(44); | 1507 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(44); |
1197 char* error = function(pimpl_, &result_); | 1508 char* error = function(pimpl_, &result_); |
1198 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1509 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
1199 return std::string(result_); | 1510 return std::string(result_); |
1200 } | 1511 } |
1512 /** | |
1513 * @brief Set the extraction mode for the 2D image corresponding to this instance. | |
1514 * | |
1515 * Set the extraction mode for the 2D image corresponding to this instance. | |
1516 * | |
1517 * @param mode The extraction mode. | |
1518 **/ | |
1201 inline void Instance::SetImageExtractionMode(::Orthanc::ImageExtractionMode mode) | 1519 inline void Instance::SetImageExtractionMode(::Orthanc::ImageExtractionMode mode) |
1202 { | 1520 { |
1203 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, LAAW_INT32); | 1521 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, LAAW_INT32); |
1204 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(45); | 1522 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(45); |
1205 char* error = function(pimpl_, mode); | 1523 char* error = function(pimpl_, mode); |
1206 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1524 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
1207 } | 1525 } |
1526 /** | |
1527 * @brief Get the extraction mode for the 2D image corresponding to this instance. | |
1528 * | |
1529 * Get the extraction mode for the 2D image corresponding to this instance. | |
1530 * | |
1531 * @return The extraction mode. | |
1532 **/ | |
1208 inline ::Orthanc::ImageExtractionMode Instance::GetImageExtractionMode() const | 1533 inline ::Orthanc::ImageExtractionMode Instance::GetImageExtractionMode() const |
1209 { | 1534 { |
1210 LAAW_INT32 result_; | 1535 LAAW_INT32 result_; |
1211 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (const void*, LAAW_INT32*); | 1536 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (const void*, LAAW_INT32*); |
1212 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(46); | 1537 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(46); |
1213 char* error = function(pimpl_, &result_); | 1538 char* error = function(pimpl_, &result_); |
1214 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1539 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
1215 return static_cast< ::Orthanc::ImageExtractionMode >(result_); | 1540 return static_cast< ::Orthanc::ImageExtractionMode >(result_); |
1216 } | 1541 } |
1542 /** | |
1543 * @brief Get the string value of some DICOM tag of this instance. | |
1544 * | |
1545 * Get the string value of some DICOM tag of this instance. | |
1546 * | |
1547 * @param tag The name of the tag of interest. | |
1548 * @return The value of the tag. | |
1549 **/ | |
1217 inline ::std::string Instance::GetTagAsString(const ::std::string& tag) const | 1550 inline ::std::string Instance::GetTagAsString(const ::std::string& tag) const |
1218 { | 1551 { |
1219 const char* result_; | 1552 const char* result_; |
1220 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (const void*, const char**, const char*); | 1553 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (const void*, const char**, const char*); |
1221 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(47); | 1554 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(47); |
1222 char* error = function(pimpl_, &result_, tag.c_str()); | 1555 char* error = function(pimpl_, &result_, tag.c_str()); |
1223 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1556 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
1224 return std::string(result_); | 1557 return std::string(result_); |
1225 } | 1558 } |
1559 /** | |
1560 * @brief Get the floating point value that is stored in some DICOM tag of this instance. | |
1561 * | |
1562 * Get the floating point value that is stored in some DICOM tag of this instance. | |
1563 * | |
1564 * @param tag The name of the tag of interest. | |
1565 * @return The value of the tag. | |
1566 **/ | |
1226 inline float Instance::GetTagAsFloat(const ::std::string& tag) const | 1567 inline float Instance::GetTagAsFloat(const ::std::string& tag) const |
1227 { | 1568 { |
1228 float result_; | 1569 float result_; |
1229 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (const void*, float*, const char*); | 1570 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (const void*, float*, const char*); |
1230 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(48); | 1571 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(48); |
1231 char* error = function(pimpl_, &result_, tag.c_str()); | 1572 char* error = function(pimpl_, &result_, tag.c_str()); |
1232 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1573 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
1233 return result_; | 1574 return result_; |
1234 } | 1575 } |
1576 /** | |
1577 * @brief Get the integer value that is stored in some DICOM tag of this instance. | |
1578 * | |
1579 * Get the integer value that is stored in some DICOM tag of this instance. | |
1580 * | |
1581 * @param tag The name of the tag of interest. | |
1582 * @return The value of the tag. | |
1583 **/ | |
1235 inline LAAW_INT32 Instance::GetTagAsInt(const ::std::string& tag) const | 1584 inline LAAW_INT32 Instance::GetTagAsInt(const ::std::string& tag) const |
1236 { | 1585 { |
1237 LAAW_INT32 result_; | 1586 LAAW_INT32 result_; |
1238 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (const void*, LAAW_INT32*, const char*); | 1587 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (const void*, LAAW_INT32*, const char*); |
1239 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(49); | 1588 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(49); |
1240 char* error = function(pimpl_, &result_, tag.c_str()); | 1589 char* error = function(pimpl_, &result_, tag.c_str()); |
1241 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1590 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
1242 return result_; | 1591 return result_; |
1243 } | 1592 } |
1593 /** | |
1594 * @brief Get the width of the 2D image. | |
1595 * | |
1596 * Get the width of the 2D image that is encoded by this DICOM instance. | |
1597 * | |
1598 * @return The width. | |
1599 **/ | |
1244 inline LAAW_UINT32 Instance::GetWidth() | 1600 inline LAAW_UINT32 Instance::GetWidth() |
1245 { | 1601 { |
1246 LAAW_UINT32 result_; | 1602 LAAW_UINT32 result_; |
1247 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, LAAW_UINT32*); | 1603 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, LAAW_UINT32*); |
1248 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(50); | 1604 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(50); |
1249 char* error = function(pimpl_, &result_); | 1605 char* error = function(pimpl_, &result_); |
1250 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1606 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
1251 return result_; | 1607 return result_; |
1252 } | 1608 } |
1609 /** | |
1610 * @brief Get the height of the 2D image. | |
1611 * | |
1612 * Get the height of the 2D image that is encoded by this DICOM instance. | |
1613 * | |
1614 * @return The height. | |
1615 **/ | |
1253 inline LAAW_UINT32 Instance::GetHeight() | 1616 inline LAAW_UINT32 Instance::GetHeight() |
1254 { | 1617 { |
1255 LAAW_UINT32 result_; | 1618 LAAW_UINT32 result_; |
1256 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, LAAW_UINT32*); | 1619 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, LAAW_UINT32*); |
1257 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(51); | 1620 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(51); |
1258 char* error = function(pimpl_, &result_); | 1621 char* error = function(pimpl_, &result_); |
1259 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1622 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
1260 return result_; | 1623 return result_; |
1261 } | 1624 } |
1625 /** | |
1626 * @brief Get the number of bytes between two lines of the image (pitch). | |
1627 * | |
1628 * Get the number of bytes between two lines of the image in the memory buffer returned by GetBuffer(). This value depends on the extraction mode for the image. | |
1629 * | |
1630 * @return The pitch. | |
1631 **/ | |
1262 inline LAAW_UINT32 Instance::GetPitch() | 1632 inline LAAW_UINT32 Instance::GetPitch() |
1263 { | 1633 { |
1264 LAAW_UINT32 result_; | 1634 LAAW_UINT32 result_; |
1265 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, LAAW_UINT32*); | 1635 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, LAAW_UINT32*); |
1266 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(52); | 1636 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(52); |
1267 char* error = function(pimpl_, &result_); | 1637 char* error = function(pimpl_, &result_); |
1268 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1638 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
1269 return result_; | 1639 return result_; |
1270 } | 1640 } |
1641 /** | |
1642 * @brief Get the format of the pixels of the 2D image. | |
1643 * | |
1644 * Return the memory layout that is used for the 2D image that is encoded by this DICOM instance. This value depends on the extraction mode for the image. | |
1645 * | |
1646 * @return The pixel format. | |
1647 **/ | |
1271 inline ::Orthanc::PixelFormat Instance::GetPixelFormat() | 1648 inline ::Orthanc::PixelFormat Instance::GetPixelFormat() |
1272 { | 1649 { |
1273 LAAW_INT32 result_; | 1650 LAAW_INT32 result_; |
1274 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, LAAW_INT32*); | 1651 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, LAAW_INT32*); |
1275 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(53); | 1652 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(53); |
1276 char* error = function(pimpl_, &result_); | 1653 char* error = function(pimpl_, &result_); |
1277 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1654 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
1278 return static_cast< ::Orthanc::PixelFormat >(result_); | 1655 return static_cast< ::Orthanc::PixelFormat >(result_); |
1279 } | 1656 } |
1657 /** | |
1658 * @brief Access the memory buffer in which the raw pixels of the 2D image are stored. | |
1659 * | |
1660 * Access the memory buffer in which the raw pixels of the 2D image are stored. | |
1661 * | |
1662 * @return A pointer to the memory buffer. | |
1663 **/ | |
1280 inline const void* Instance::GetBuffer() | 1664 inline const void* Instance::GetBuffer() |
1281 { | 1665 { |
1282 const void* result_; | 1666 const void* result_; |
1283 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, const void**); | 1667 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, const void**); |
1284 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(54); | 1668 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(54); |
1285 char* error = function(pimpl_, &result_); | 1669 char* error = function(pimpl_, &result_); |
1286 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1670 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
1287 return reinterpret_cast< const void* >(result_); | 1671 return reinterpret_cast< const void* >(result_); |
1288 } | 1672 } |
1673 /** | |
1674 * @brief Access the memory buffer in which the raw pixels of some line of the 2D image are stored. | |
1675 * | |
1676 * Access the memory buffer in which the raw pixels of some line of the 2D image are stored. | |
1677 * | |
1678 * @param y The line of interest. | |
1679 * @return A pointer to the memory buffer. | |
1680 **/ | |
1289 inline const void* Instance::GetBuffer(LAAW_UINT32 y) | 1681 inline const void* Instance::GetBuffer(LAAW_UINT32 y) |
1290 { | 1682 { |
1291 const void* result_; | 1683 const void* result_; |
1292 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, const void**, LAAW_UINT32); | 1684 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, const void**, LAAW_UINT32); |
1293 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(55); | 1685 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(55); |
1294 char* error = function(pimpl_, &result_, y); | 1686 char* error = function(pimpl_, &result_, y); |
1295 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1687 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
1296 return reinterpret_cast< const void* >(result_); | 1688 return reinterpret_cast< const void* >(result_); |
1297 } | 1689 } |
1298 inline void Instance::DiscardImage() | 1690 /** |
1299 { | 1691 * @brief Get the size of the DICOM file corresponding to this instance. |
1300 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*); | 1692 * |
1301 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(56); | 1693 * Get the size of the DICOM file corresponding to this instance. |
1302 char* error = function(pimpl_); | 1694 * |
1303 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1695 * @return The file size. |
1304 } | 1696 **/ |
1305 inline void Instance::DiscardDicom() | |
1306 { | |
1307 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*); | |
1308 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(57); | |
1309 char* error = function(pimpl_); | |
1310 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | |
1311 } | |
1312 inline LAAW_UINT64 Instance::GetDicomSize() | 1697 inline LAAW_UINT64 Instance::GetDicomSize() |
1313 { | 1698 { |
1314 LAAW_UINT64 result_; | 1699 LAAW_UINT64 result_; |
1315 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, LAAW_UINT64*); | 1700 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, LAAW_UINT64*); |
1316 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(58); | 1701 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(56); |
1317 char* error = function(pimpl_, &result_); | 1702 char* error = function(pimpl_, &result_); |
1318 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1703 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
1319 return result_; | 1704 return result_; |
1320 } | 1705 } |
1706 /** | |
1707 * @brief Get a pointer to the content of the DICOM file corresponding to this instance. | |
1708 * | |
1709 * Get a pointer to the content of the DICOM file corresponding to this instance. | |
1710 * | |
1711 * @return The DICOM file. | |
1712 **/ | |
1321 inline const void* Instance::GetDicom() | 1713 inline const void* Instance::GetDicom() |
1322 { | 1714 { |
1323 const void* result_; | 1715 const void* result_; |
1324 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, const void**); | 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_); | |
1721 } | |
1722 /** | |
1723 * @brief Discard the downloaded 2D image, so as to make room in memory. | |
1724 * | |
1725 * Discard the downloaded 2D image, so as to make room in memory. | |
1726 * | |
1727 **/ | |
1728 inline void Instance::DiscardImage() | |
1729 { | |
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); | |
1734 } | |
1735 /** | |
1736 * @brief Discard the downloaded DICOM file, so as to make room in memory. | |
1737 * | |
1738 * Discard the downloaded DICOM file, so as to make room in memory. | |
1739 * | |
1740 **/ | |
1741 inline void Instance::DiscardDicom() | |
1742 { | |
1743 typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*); | |
1325 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(59); | 1744 Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(59); |
1326 char* error = function(pimpl_, &result_); | 1745 char* error = function(pimpl_); |
1327 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); | 1746 ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error); |
1328 return reinterpret_cast< const void* >(result_); | 1747 } |
1329 } | 1748 } |
1330 } | 1749 |
1331 |