annotate Plugins/Engine/PluginsEnumerations.cpp @ 1860:c7d70f659190

DicomToJsonFormat_Simple -> DicomToJsonFormat_Human
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 02 Dec 2015 11:26:52 +0100
parents 0ef4e6e66b56
children a7bea843a7bc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1625
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Orthanc - A Lightweight, RESTful DICOM Store
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 * Copyright (C) 2012-2015 Sebastien Jodogne, Medical Physics
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 *
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 * This program is free software: you can redistribute it and/or
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * modify it under the terms of the GNU General Public License as
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * published by the Free Software Foundation, either version 3 of the
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * License, or (at your option) any later version.
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 *
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 * In addition, as a special exception, the copyright holders of this
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * program give permission to link the code of its release with the
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * OpenSSL project's "OpenSSL" library (or with modified versions of it
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * that use the same license as the "OpenSSL" library), and distribute
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * the linked executables. You must obey the GNU General Public License
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 * in all respects for all of the code used other than "OpenSSL". If you
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * modify file(s) with this exception, you may extend this exception to
c17b1142caab reorganization
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
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 * you do not wish to do so, delete this exception statement from your
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 * version. If you delete this exception statement from all source files
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 * in the program, then also delete it here.
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 *
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 * This program is distributed in the hope that it will be useful, but
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 * WITHOUT ANY WARRANTY; without even the implied warranty of
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 * General Public License for more details.
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 *
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 * You should have received a copy of the GNU General Public License
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 * along with this program. If not, see <http://www.gnu.org/licenses/>.
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 **/
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 #include "../../OrthancServer/PrecompiledHeadersServer.h"
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 #include "PluginsEnumerations.h"
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35
1632
eb8fbcf008b5 fix build with plugins disabled
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1630
diff changeset
36 #if ORTHANC_PLUGINS_ENABLED != 1
eb8fbcf008b5 fix build with plugins disabled
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1630
diff changeset
37 #error The plugin support is disabled
eb8fbcf008b5 fix build with plugins disabled
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1630
diff changeset
38 #endif
eb8fbcf008b5 fix build with plugins disabled
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1630
diff changeset
39
eb8fbcf008b5 fix build with plugins disabled
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1630
diff changeset
40
1625
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 #include "../../Core/OrthancException.h"
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 namespace Orthanc
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 namespace Plugins
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 OrthancPluginResourceType Convert(ResourceType type)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 switch (type)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 case ResourceType_Patient:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 return OrthancPluginResourceType_Patient;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 case ResourceType_Study:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 return OrthancPluginResourceType_Study;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 case ResourceType_Series:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 return OrthancPluginResourceType_Series;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 case ResourceType_Instance:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 return OrthancPluginResourceType_Instance;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 default:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 throw OrthancException(ErrorCode_ParameterOutOfRange);
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68
1669
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
69 ResourceType Convert(OrthancPluginResourceType type)
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
70 {
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
71 switch (type)
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
72 {
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
73 case OrthancPluginResourceType_Patient:
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
74 return ResourceType_Patient;
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
75
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
76 case OrthancPluginResourceType_Study:
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
77 return ResourceType_Study;
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
78
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
79 case OrthancPluginResourceType_Series:
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
80 return ResourceType_Series;
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
81
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
82 case OrthancPluginResourceType_Instance:
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
83 return ResourceType_Instance;
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
84
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
85 default:
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
86 throw OrthancException(ErrorCode_ParameterOutOfRange);
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
87 }
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
88 }
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
89
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
90
1625
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91 OrthancPluginChangeType Convert(ChangeType type)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93 switch (type)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 case ChangeType_CompletedSeries:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96 return OrthancPluginChangeType_CompletedSeries;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98 case ChangeType_Deleted:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99 return OrthancPluginChangeType_Deleted;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101 case ChangeType_NewChildInstance:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 return OrthancPluginChangeType_NewChildInstance;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104 case ChangeType_NewInstance:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105 return OrthancPluginChangeType_NewInstance;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107 case ChangeType_NewPatient:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108 return OrthancPluginChangeType_NewPatient;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110 case ChangeType_NewSeries:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111 return OrthancPluginChangeType_NewSeries;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113 case ChangeType_NewStudy:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 return OrthancPluginChangeType_NewStudy;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 case ChangeType_StablePatient:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117 return OrthancPluginChangeType_StablePatient;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119 case ChangeType_StableSeries:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120 return OrthancPluginChangeType_StableSeries;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122 case ChangeType_StableStudy:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 return OrthancPluginChangeType_StableStudy;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124
1773
613df4362575 New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1761
diff changeset
125 case ChangeType_UpdatedAttachment:
613df4362575 New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1761
diff changeset
126 return OrthancPluginChangeType_UpdatedAttachment;
613df4362575 New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1761
diff changeset
127
613df4362575 New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1761
diff changeset
128 case ChangeType_UpdatedMetadata:
613df4362575 New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1761
diff changeset
129 return OrthancPluginChangeType_UpdatedMetadata;
613df4362575 New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1761
diff changeset
130
1625
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131 default:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132 throw OrthancException(ErrorCode_ParameterOutOfRange);
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
133 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
135
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
136
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
137 OrthancPluginPixelFormat Convert(PixelFormat format)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
139 switch (format)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
140 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
141 case PixelFormat_Grayscale16:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
142 return OrthancPluginPixelFormat_Grayscale16;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
143
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
144 case PixelFormat_Grayscale8:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
145 return OrthancPluginPixelFormat_Grayscale8;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
147 case PixelFormat_RGB24:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
148 return OrthancPluginPixelFormat_RGB24;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
149
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
150 case PixelFormat_RGBA32:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
151 return OrthancPluginPixelFormat_RGBA32;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
152
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153 case PixelFormat_SignedGrayscale16:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154 return OrthancPluginPixelFormat_SignedGrayscale16;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
156 default:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
157 throw OrthancException(ErrorCode_ParameterOutOfRange);
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
158 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
159 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
160
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
161
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
162 PixelFormat Convert(OrthancPluginPixelFormat format)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
163 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
164 switch (format)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
165 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
166 case OrthancPluginPixelFormat_Grayscale16:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
167 return PixelFormat_Grayscale16;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
168
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
169 case OrthancPluginPixelFormat_Grayscale8:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
170 return PixelFormat_Grayscale8;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
171
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
172 case OrthancPluginPixelFormat_RGB24:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
173 return PixelFormat_RGB24;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
174
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
175 case OrthancPluginPixelFormat_RGBA32:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
176 return PixelFormat_RGBA32;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
177
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
178 case OrthancPluginPixelFormat_SignedGrayscale16:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
179 return PixelFormat_SignedGrayscale16;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
180
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
181 default:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
182 throw OrthancException(ErrorCode_ParameterOutOfRange);
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
183 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
184 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
185
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
186
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
187 OrthancPluginContentType Convert(FileContentType type)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
188 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
189 switch (type)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
190 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
191 case FileContentType_Dicom:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
192 return OrthancPluginContentType_Dicom;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
193
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
194 case FileContentType_DicomAsJson:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
195 return OrthancPluginContentType_DicomAsJson;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
196
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
197 default:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
198 return OrthancPluginContentType_Unknown;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
199 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
200 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
201
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
202
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
203 FileContentType Convert(OrthancPluginContentType type)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
204 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
205 switch (type)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
206 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
207 case OrthancPluginContentType_Dicom:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
208 return FileContentType_Dicom;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
209
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
210 case OrthancPluginContentType_DicomAsJson:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
211 return FileContentType_DicomAsJson;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
212
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
213 default:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
214 return FileContentType_Unknown;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
215 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
216 }
1657
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
217
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
218
1740
5e99a70b0635 DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1671
diff changeset
219 DicomToJsonFormat Convert(OrthancPluginDicomToJsonFormat format)
5e99a70b0635 DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1671
diff changeset
220 {
5e99a70b0635 DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1671
diff changeset
221 switch (format)
5e99a70b0635 DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1671
diff changeset
222 {
5e99a70b0635 DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1671
diff changeset
223 case OrthancPluginDicomToJsonFormat_Full:
5e99a70b0635 DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1671
diff changeset
224 return DicomToJsonFormat_Full;
5e99a70b0635 DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1671
diff changeset
225
5e99a70b0635 DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1671
diff changeset
226 case OrthancPluginDicomToJsonFormat_Short:
5e99a70b0635 DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1671
diff changeset
227 return DicomToJsonFormat_Short;
5e99a70b0635 DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1671
diff changeset
228
1860
c7d70f659190 DicomToJsonFormat_Simple -> DicomToJsonFormat_Human
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1823
diff changeset
229 case OrthancPluginDicomToJsonFormat_Human:
c7d70f659190 DicomToJsonFormat_Simple -> DicomToJsonFormat_Human
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1823
diff changeset
230 return DicomToJsonFormat_Human;
1740
5e99a70b0635 DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1671
diff changeset
231
5e99a70b0635 DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1671
diff changeset
232 default:
5e99a70b0635 DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1671
diff changeset
233 throw OrthancException(ErrorCode_ParameterOutOfRange);
5e99a70b0635 DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1671
diff changeset
234 }
5e99a70b0635 DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1671
diff changeset
235 }
5e99a70b0635 DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1671
diff changeset
236
5e99a70b0635 DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1671
diff changeset
237
1760
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
238 OrthancPluginIdentifierConstraint Convert(IdentifierConstraintType constraint)
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
239 {
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
240 switch (constraint)
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
241 {
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
242 case IdentifierConstraintType_Equal:
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
243 return OrthancPluginIdentifierConstraint_Equal;
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
244
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
245 case IdentifierConstraintType_GreaterOrEqual:
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
246 return OrthancPluginIdentifierConstraint_GreaterOrEqual;
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
247
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
248 case IdentifierConstraintType_SmallerOrEqual:
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
249 return OrthancPluginIdentifierConstraint_SmallerOrEqual;
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
250
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
251 case IdentifierConstraintType_Wildcard:
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
252 return OrthancPluginIdentifierConstraint_Wildcard;
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
253
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
254 default:
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
255 throw OrthancException(ErrorCode_ParameterOutOfRange);
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
256 }
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
257 }
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
258
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
259
1761
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
260 IdentifierConstraintType Convert(OrthancPluginIdentifierConstraint constraint)
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
261 {
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
262 switch (constraint)
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
263 {
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
264 case OrthancPluginIdentifierConstraint_Equal:
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
265 return IdentifierConstraintType_Equal;
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
266
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
267 case OrthancPluginIdentifierConstraint_GreaterOrEqual:
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
268 return IdentifierConstraintType_GreaterOrEqual;
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
269
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
270 case OrthancPluginIdentifierConstraint_SmallerOrEqual:
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
271 return IdentifierConstraintType_SmallerOrEqual;
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
272
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
273 case OrthancPluginIdentifierConstraint_Wildcard:
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
274 return IdentifierConstraintType_Wildcard;
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
275
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
276 default:
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
277 throw OrthancException(ErrorCode_ParameterOutOfRange);
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
278 }
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
279 }
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
280
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
281
1815
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
282 OrthancPluginInstanceOrigin Convert(RequestOrigin origin)
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
283 {
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
284 switch (origin)
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
285 {
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
286 case RequestOrigin_DicomProtocol:
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
287 return OrthancPluginInstanceOrigin_DicomProtocol;
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
288
1823
0ef4e6e66b56 "Origin" metadata for the instances
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1816
diff changeset
289 case RequestOrigin_RestApi:
1815
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
290 return OrthancPluginInstanceOrigin_RestApi;
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
291
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
292 case RequestOrigin_Lua:
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
293 return OrthancPluginInstanceOrigin_Lua;
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
294
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
295 case RequestOrigin_Plugins:
1816
87c069c94ac9 plugin sample: automated jpeg2k compression
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1815
diff changeset
296 return OrthancPluginInstanceOrigin_Plugin;
1815
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
297
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
298 case RequestOrigin_Unknown:
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
299 return OrthancPluginInstanceOrigin_Unknown;
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
300
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
301 default:
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
302 throw OrthancException(ErrorCode_ParameterOutOfRange);
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
303 }
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
304 }
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
305
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
306
1671
2f2e2ec17bc4 sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1669
diff changeset
307 #if !defined(ORTHANC_ENABLE_DCMTK) || ORTHANC_ENABLE_DCMTK != 0
1657
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
308 DcmEVR Convert(OrthancPluginValueRepresentation vr)
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
309 {
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
310 switch (vr)
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
311 {
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
312 case OrthancPluginValueRepresentation_AE:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
313 return EVR_AE;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
314
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
315 case OrthancPluginValueRepresentation_AS:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
316 return EVR_AS;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
317
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
318 case OrthancPluginValueRepresentation_AT:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
319 return EVR_AT;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
320
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
321 case OrthancPluginValueRepresentation_CS:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
322 return EVR_CS;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
323
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
324 case OrthancPluginValueRepresentation_DA:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
325 return EVR_DA;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
326
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
327 case OrthancPluginValueRepresentation_DS:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
328 return EVR_DS;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
329
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
330 case OrthancPluginValueRepresentation_DT:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
331 return EVR_DT;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
332
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
333 case OrthancPluginValueRepresentation_FD:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
334 return EVR_FD;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
335
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
336 case OrthancPluginValueRepresentation_FL:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
337 return EVR_FL;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
338
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
339 case OrthancPluginValueRepresentation_IS:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
340 return EVR_IS;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
341
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
342 case OrthancPluginValueRepresentation_LO:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
343 return EVR_LO;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
344
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
345 case OrthancPluginValueRepresentation_LT:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
346 return EVR_LT;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
347
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
348 case OrthancPluginValueRepresentation_OB:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
349 return EVR_OB;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
350
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
351 case OrthancPluginValueRepresentation_OF:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
352 return EVR_OF;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
353
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
354 case OrthancPluginValueRepresentation_OW:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
355 return EVR_OW;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
356
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
357 case OrthancPluginValueRepresentation_PN:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
358 return EVR_PN;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
359
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
360 case OrthancPluginValueRepresentation_SH:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
361 return EVR_SH;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
362
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
363 case OrthancPluginValueRepresentation_SL:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
364 return EVR_SL;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
365
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
366 case OrthancPluginValueRepresentation_SQ:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
367 return EVR_SQ;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
368
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
369 case OrthancPluginValueRepresentation_SS:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
370 return EVR_SS;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
371
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
372 case OrthancPluginValueRepresentation_ST:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
373 return EVR_ST;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
374
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
375 case OrthancPluginValueRepresentation_TM:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
376 return EVR_TM;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
377
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
378 case OrthancPluginValueRepresentation_UI:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
379 return EVR_UI;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
380
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
381 case OrthancPluginValueRepresentation_UL:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
382 return EVR_UL;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
383
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
384 case OrthancPluginValueRepresentation_UN:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
385 return EVR_UN;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
386
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
387 case OrthancPluginValueRepresentation_US:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
388 return EVR_US;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
389
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
390 case OrthancPluginValueRepresentation_UT:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
391 return EVR_UT;
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
392
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
393 default:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
394 throw OrthancException(ErrorCode_ParameterOutOfRange);
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
395 }
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
396 }
1671
2f2e2ec17bc4 sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1669
diff changeset
397 #endif
1625
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
398 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
399 }