annotate OrthancCppClient/OrthancConnection.h @ 840:256e1530eb0f jpeg

fix build
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 03 Jun 2014 20:11:04 +0200
parents 2d0a347e8cfc
children 6e7e5ed91c2d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
479
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Orthanc - A Lightweight, RESTful DICOM Store
689
2d0a347e8cfc switch to 2014
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 593
diff changeset
3 * Copyright (C) 2012-2014 Medical Physics Department, CHU of Liege,
479
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Belgium
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 *
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 * This program is free software: you can redistribute it and/or
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * modify it under the terms of the GNU General Public License as
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * published by the Free Software Foundation, either version 3 of the
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * License, or (at your option) any later version.
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 *
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 * In addition, as a special exception, the copyright holders of this
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * program give permission to link the code of its release with the
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * OpenSSL project's "OpenSSL" library (or with modified versions of it
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * that use the same license as the "OpenSSL" library), and distribute
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * the linked executables. You must obey the GNU General Public License
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 * in all respects for all of the code used other than "OpenSSL". If you
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * modify file(s) with this exception, you may extend this exception to
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * your version of the file(s), but you are not obligated to do so. If
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 * you do not wish to do so, delete this exception statement from your
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 * version. If you delete this exception statement from all source files
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 * in the program, then also delete it here.
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 *
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 * This program is distributed in the hope that it will be useful, but
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 * WITHOUT ANY WARRANTY; without even the implied warranty of
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 * General Public License for more details.
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 *
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 * You should have received a copy of the GNU General Public License
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 * along with this program. If not, see <http://www.gnu.org/licenses/>.
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 **/
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 #pragma once
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 #include "../Core/HttpClient.h"
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 #include "Patient.h"
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 namespace OrthancClient
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 {
573
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
41 /**
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
42 * {summary}{Connection to an instance of %Orthanc.}
593
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 573
diff changeset
43 * {description}{This class encapsulates a connection to a remote instance
573
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
44 * of %Orthanc through its REST API.}
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
45 **/
496
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 480
diff changeset
46 class LAAW_API OrthancConnection :
480
482cde3f3c14 sample of c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 479
diff changeset
47 public boost::noncopyable,
482cde3f3c14 sample of c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 479
diff changeset
48 private Orthanc::ArrayFilledByThreads::IFiller
479
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 {
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 private:
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 Orthanc::HttpClient client_;
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 std::string orthancUrl_;
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 Orthanc::ArrayFilledByThreads patients_;
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 Json::Value content_;
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 void ReadPatients();
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 virtual size_t GetFillerSize()
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 {
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 return content_.size();
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 }
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 virtual Orthanc::IDynamicObject* GetFillerItem(size_t index);
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 public:
573
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
66 /**
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
67 * {summary}{Create a connection to an instance of %Orthanc.}
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
68 * {param}{orthancUrl URL to which the REST API of %Orthanc is listening.}
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
69 **/
479
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 OrthancConnection(const char* orthancUrl);
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71
573
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
72 /**
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
73 * {summary}{Create a connection to an instance of %Orthanc, with authentication.}
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
74 * {param}{orthancUrl URL to which the REST API of %Orthanc is listening.}
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
75 * {param}{username The username.}
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
76 * {param}{password The password.}
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
77 **/
479
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78 OrthancConnection(const char* orthancUrl,
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 const char* username,
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 const char* password);
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81
506
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 500
diff changeset
82 virtual ~OrthancConnection()
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 500
diff changeset
83 {
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 500
diff changeset
84 }
6e4bd06c17c5 the wrapper is working
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 500
diff changeset
85
573
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
86 /**
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
87 * {summary}{Returns the number of threads for this connection.}
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
88 * {description}{Returns the number of simultaneous connections
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
89 * that are used when downloading information from this instance
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
90 * of %Orthanc.}
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
91 * {returns}{The number of threads.}
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
92 **/
496
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 480
diff changeset
93 uint32_t GetThreadCount() const
479
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 {
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 return patients_.GetThreadCount();
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96 }
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97
573
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
98 /**
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
99 * {summary}{Sets the number of threads for this connection.}
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
100 * {description}{Sets the number of simultaneous connections
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
101 * that are used when downloading information from this instance
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
102 * of %Orthanc.}
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
103 * {param}{threadCount The number of threads.}
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
104 **/
496
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 480
diff changeset
105 void SetThreadCount(uint32_t threadCount)
479
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106 {
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107 patients_.SetThreadCount(threadCount);
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108 }
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109
573
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
110 /**
593
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 573
diff changeset
111 * {summary}{Reload the list of the patients.}
573
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
112 * {description}{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.}
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
113 **/
593
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 573
diff changeset
114 void Reload()
479
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115 {
540
eaca3d38b2aa many fixes
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
116 ReadPatients();
eaca3d38b2aa many fixes
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
117 patients_.Invalidate();
479
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118 }
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119
500
ec19da4a1fe7 fix api
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 496
diff changeset
120 LAAW_API_INTERNAL const Orthanc::HttpClient& GetHttpClient() const
479
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121 {
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122 return client_;
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 }
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124
573
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
125 /**
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
126 * {summary}{Returns the URL of this instance of %Orthanc.}
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
127 * {description}{Returns the URL of the remote %Orthanc instance to which this object is connected.}
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
128 * {returns}{The URL.}
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
129 **/
496
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 480
diff changeset
130 const char* GetOrthancUrl() const
479
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131 {
496
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 480
diff changeset
132 return orthancUrl_.c_str();
479
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
133 }
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134
573
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
135 /**
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
136 * {summary}{Returns the number of patients.}
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
137 * {description}{Returns the number of patients that are stored in the remote instance of %Orthanc.}
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
138 * {returns}{The number of patients.}
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
139 **/
496
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 480
diff changeset
140 uint32_t GetPatientCount()
479
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
141 {
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
142 return patients_.GetSize();
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
143 }
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
144
573
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
145 /**
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
146 * {summary}{Get some patient.}
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
147 * {description}{This method will return an object that contains information about some patient. The patients are indexed by a number between 0 (inclusive) and the result of GetPatientCount() (exclusive).}
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
148 * {param}{index The index of the patient of interest.}
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
149 * {returns}{The patient.}
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
150 **/
496
7f7a2d174acb preparing Laaw packaging
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 480
diff changeset
151 Patient& GetPatient(uint32_t index);
540
eaca3d38b2aa many fixes
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
152
573
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
153 /**
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
154 * {summary}{Delete some patient.}
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
155 * {description}{Delete some patient from the remote instance of %Orthanc. Pay attention to the fact that the patients that have been previously returned by GetPatient() will be invalidated.}
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
156 * {param}{index The index of the patient of interest.}
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
157 * {returns}{The patient.}
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
158 **/
540
eaca3d38b2aa many fixes
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
159 void DeletePatient(uint32_t index)
eaca3d38b2aa many fixes
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
160 {
eaca3d38b2aa many fixes
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
161 GetPatient(index).Delete();
593
9d2592c08919 documentation completed
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 573
diff changeset
162 Reload();
540
eaca3d38b2aa many fixes
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
163 }
eaca3d38b2aa many fixes
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
164
573
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
165 /**
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
166 * {summary}{Send a DICOM file.}
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
167 * {description}{This method will store a DICOM file in the remote instance of %Orthanc. Pay attention to the fact that the patients that have been previously returned by GetPatient() will be invalidated.}
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
168 * {param}{filename Path to the DICOM file}
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
169 **/
540
eaca3d38b2aa many fixes
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
170 void StoreFile(const char* filename);
eaca3d38b2aa many fixes
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
171
573
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
172 /**
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
173 * {summary}{Send a DICOM file that is contained inside a memory buffer.}
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
174 * {description}{This method will store a DICOM file in the remote instance of %Orthanc. Pay attention to the fact that the patients that have been previously returned by GetPatient() will be invalidated.}
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
175 * {param}{dicom The memory buffer containing the DICOM file.}
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
176 * {param}{size The size of the DICOM file.}
8fb9867d8089 documentation
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 540
diff changeset
177 **/
540
eaca3d38b2aa many fixes
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 506
diff changeset
178 void Store(const void* dicom, uint64_t size);
479
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
179 };
0cd977e94479 initial commit of the c++ client
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
180 }