annotate Plugins/Engine/PluginsEnumerations.cpp @ 2470:45de30d4f362

log
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 17 Jan 2018 17:34:15 +0100
parents 878b59270859
children 89b789366596
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
1900
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1861
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
1625
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
2447
878b59270859 upgrade to year 2018
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2424
diff changeset
5 * Copyright (C) 2017-2018 Osimis S.A., Belgium
1625
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 *
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * This program is free software: you can redistribute it and/or
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * modify it under the terms of the GNU General Public License as
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * published by the Free Software Foundation, either version 3 of the
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * License, or (at your option) any later version.
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 *
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * In addition, as a special exception, the copyright holders of this
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * program give permission to link the code of its release with the
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * OpenSSL project's "OpenSSL" library (or with modified versions of it
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * that use the same license as the "OpenSSL" library), and distribute
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 * the linked executables. You must obey the GNU General Public License
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * 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
18 * modify file(s) with this exception, you may extend this exception to
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 * 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
20 * you do not wish to do so, delete this exception statement from your
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 * version. If you delete this exception statement from all source files
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 * in the program, then also delete it here.
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 *
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 * This program is distributed in the hope that it will be useful, but
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 * WITHOUT ANY WARRANTY; without even the implied warranty of
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 * General Public License for more details.
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 *
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 * You should have received a copy of the GNU General Public License
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 * along with this program. If not, see <http://www.gnu.org/licenses/>.
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
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 #include "../../OrthancServer/PrecompiledHeadersServer.h"
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 #include "PluginsEnumerations.h"
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36
2136
dd609a99d39a uniformization of the macro naming
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2007
diff changeset
37 #if ORTHANC_ENABLE_PLUGINS != 1
1632
eb8fbcf008b5 fix build with plugins disabled
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1630
diff changeset
38 #error The plugin support is disabled
eb8fbcf008b5 fix build with plugins disabled
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1630
diff changeset
39 #endif
eb8fbcf008b5 fix build with plugins disabled
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1630
diff changeset
40
eb8fbcf008b5 fix build with plugins disabled
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1630
diff changeset
41
1625
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 #include "../../Core/OrthancException.h"
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 namespace Orthanc
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 namespace Plugins
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 OrthancPluginResourceType Convert(ResourceType type)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 switch (type)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 case ResourceType_Patient:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 return OrthancPluginResourceType_Patient;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 case ResourceType_Study:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 return OrthancPluginResourceType_Study;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 case ResourceType_Series:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 return OrthancPluginResourceType_Series;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 case ResourceType_Instance:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 return OrthancPluginResourceType_Instance;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 default:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 throw OrthancException(ErrorCode_ParameterOutOfRange);
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
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69
1669
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
70 ResourceType Convert(OrthancPluginResourceType type)
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
71 {
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
72 switch (type)
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
73 {
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
74 case OrthancPluginResourceType_Patient:
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
75 return ResourceType_Patient;
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
76
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
77 case OrthancPluginResourceType_Study:
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
78 return ResourceType_Study;
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
79
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
80 case OrthancPluginResourceType_Series:
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
81 return ResourceType_Series;
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
82
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
83 case OrthancPluginResourceType_Instance:
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
84 return ResourceType_Instance;
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
85
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
86 default:
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
87 throw OrthancException(ErrorCode_ParameterOutOfRange);
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
a412ad57f0f9 refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1657
diff changeset
91
1625
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92 OrthancPluginChangeType Convert(ChangeType type)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 switch (type)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96 case ChangeType_CompletedSeries:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97 return OrthancPluginChangeType_CompletedSeries;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99 case ChangeType_Deleted:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100 return OrthancPluginChangeType_Deleted;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 case ChangeType_NewChildInstance:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103 return OrthancPluginChangeType_NewChildInstance;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105 case ChangeType_NewInstance:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106 return OrthancPluginChangeType_NewInstance;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108 case ChangeType_NewPatient:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109 return OrthancPluginChangeType_NewPatient;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111 case ChangeType_NewSeries:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112 return OrthancPluginChangeType_NewSeries;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 case ChangeType_NewStudy:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115 return OrthancPluginChangeType_NewStudy;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117 case ChangeType_StablePatient:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118 return OrthancPluginChangeType_StablePatient;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120 case ChangeType_StableSeries:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121 return OrthancPluginChangeType_StableSeries;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 case ChangeType_StableStudy:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124 return OrthancPluginChangeType_StableStudy;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125
1773
613df4362575 New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1761
diff changeset
126 case ChangeType_UpdatedAttachment:
613df4362575 New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1761
diff changeset
127 return OrthancPluginChangeType_UpdatedAttachment;
613df4362575 New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1761
diff changeset
128
613df4362575 New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1761
diff changeset
129 case ChangeType_UpdatedMetadata:
613df4362575 New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1761
diff changeset
130 return OrthancPluginChangeType_UpdatedMetadata;
613df4362575 New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1761
diff changeset
131
1625
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132 default:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
133 throw OrthancException(ErrorCode_ParameterOutOfRange);
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
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138 OrthancPluginPixelFormat Convert(PixelFormat format)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
139 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
140 switch (format)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
141 {
2424
7ef9207f31d4 New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
142 case PixelFormat_BGRA32:
7ef9207f31d4 New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
143 return OrthancPluginPixelFormat_BGRA32;
7ef9207f31d4 New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
144
7ef9207f31d4 New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
145 case PixelFormat_Float32:
7ef9207f31d4 New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
146 return OrthancPluginPixelFormat_Float32;
7ef9207f31d4 New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
147
1625
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
148 case PixelFormat_Grayscale16:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
149 return OrthancPluginPixelFormat_Grayscale16;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
150
2424
7ef9207f31d4 New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
151 case PixelFormat_Grayscale32:
7ef9207f31d4 New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
152 return OrthancPluginPixelFormat_Grayscale32;
7ef9207f31d4 New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
153
1625
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154 case PixelFormat_Grayscale8:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155 return OrthancPluginPixelFormat_Grayscale8;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
156
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
157 case PixelFormat_RGB24:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
158 return OrthancPluginPixelFormat_RGB24;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
159
2424
7ef9207f31d4 New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
160 case PixelFormat_RGB48:
7ef9207f31d4 New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
161 return OrthancPluginPixelFormat_RGB48;
7ef9207f31d4 New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
162
1625
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
163 case PixelFormat_RGBA32:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
164 return OrthancPluginPixelFormat_RGBA32;
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 PixelFormat_SignedGrayscale16:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
167 return OrthancPluginPixelFormat_SignedGrayscale16;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
168
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
169 default:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
170 throw OrthancException(ErrorCode_ParameterOutOfRange);
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
171 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
172 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
173
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
174
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
175 PixelFormat Convert(OrthancPluginPixelFormat format)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
176 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
177 switch (format)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
178 {
2424
7ef9207f31d4 New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
179 case OrthancPluginPixelFormat_BGRA32:
7ef9207f31d4 New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
180 return PixelFormat_BGRA32;
7ef9207f31d4 New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
181
7ef9207f31d4 New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
182 case OrthancPluginPixelFormat_Float32:
7ef9207f31d4 New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
183 return PixelFormat_Float32;
7ef9207f31d4 New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
184
1625
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
185 case OrthancPluginPixelFormat_Grayscale16:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
186 return PixelFormat_Grayscale16;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
187
2424
7ef9207f31d4 New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
188 case OrthancPluginPixelFormat_Grayscale32:
7ef9207f31d4 New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
189 return PixelFormat_Grayscale32;
7ef9207f31d4 New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
190
1625
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
191 case OrthancPluginPixelFormat_Grayscale8:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
192 return PixelFormat_Grayscale8;
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 OrthancPluginPixelFormat_RGB24:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
195 return PixelFormat_RGB24;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
196
2424
7ef9207f31d4 New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
197 case OrthancPluginPixelFormat_RGB48:
7ef9207f31d4 New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
198 return PixelFormat_RGB48;
7ef9207f31d4 New pixel formats exposed in plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2244
diff changeset
199
1625
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
200 case OrthancPluginPixelFormat_RGBA32:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
201 return PixelFormat_RGBA32;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
202
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
203 case OrthancPluginPixelFormat_SignedGrayscale16:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
204 return PixelFormat_SignedGrayscale16;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
205
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
206 default:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
207 throw OrthancException(ErrorCode_ParameterOutOfRange);
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
208 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
209 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
210
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
211
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
212 OrthancPluginContentType Convert(FileContentType type)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
213 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
214 switch (type)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
215 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
216 case FileContentType_Dicom:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
217 return OrthancPluginContentType_Dicom;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
218
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
219 case FileContentType_DicomAsJson:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
220 return OrthancPluginContentType_DicomAsJson;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
221
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
222 default:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
223 return OrthancPluginContentType_Unknown;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
224 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
225 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
226
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
227
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
228 FileContentType Convert(OrthancPluginContentType type)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
229 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
230 switch (type)
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
231 {
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
232 case OrthancPluginContentType_Dicom:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
233 return FileContentType_Dicom;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
234
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
235 case OrthancPluginContentType_DicomAsJson:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
236 return FileContentType_DicomAsJson;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
237
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
238 default:
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
239 return FileContentType_Unknown;
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
240 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
241 }
1657
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
242
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
243
1740
5e99a70b0635 DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1671
diff changeset
244 DicomToJsonFormat Convert(OrthancPluginDicomToJsonFormat format)
5e99a70b0635 DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1671
diff changeset
245 {
5e99a70b0635 DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1671
diff changeset
246 switch (format)
5e99a70b0635 DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1671
diff changeset
247 {
5e99a70b0635 DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1671
diff changeset
248 case OrthancPluginDicomToJsonFormat_Full:
5e99a70b0635 DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1671
diff changeset
249 return DicomToJsonFormat_Full;
5e99a70b0635 DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1671
diff changeset
250
5e99a70b0635 DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1671
diff changeset
251 case OrthancPluginDicomToJsonFormat_Short:
5e99a70b0635 DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1671
diff changeset
252 return DicomToJsonFormat_Short;
5e99a70b0635 DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1671
diff changeset
253
1860
c7d70f659190 DicomToJsonFormat_Simple -> DicomToJsonFormat_Human
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1823
diff changeset
254 case OrthancPluginDicomToJsonFormat_Human:
c7d70f659190 DicomToJsonFormat_Simple -> DicomToJsonFormat_Human
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1823
diff changeset
255 return DicomToJsonFormat_Human;
1740
5e99a70b0635 DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1671
diff changeset
256
5e99a70b0635 DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1671
diff changeset
257 default:
5e99a70b0635 DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1671
diff changeset
258 throw OrthancException(ErrorCode_ParameterOutOfRange);
5e99a70b0635 DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1671
diff changeset
259 }
5e99a70b0635 DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1671
diff changeset
260 }
5e99a70b0635 DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1671
diff changeset
261
5e99a70b0635 DicomToJson callable from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1671
diff changeset
262
1760
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
263 OrthancPluginIdentifierConstraint Convert(IdentifierConstraintType constraint)
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
264 {
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
265 switch (constraint)
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
266 {
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
267 case IdentifierConstraintType_Equal:
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
268 return OrthancPluginIdentifierConstraint_Equal;
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
269
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
270 case IdentifierConstraintType_GreaterOrEqual:
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
271 return OrthancPluginIdentifierConstraint_GreaterOrEqual;
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
272
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
273 case IdentifierConstraintType_SmallerOrEqual:
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
274 return OrthancPluginIdentifierConstraint_SmallerOrEqual;
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
275
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
276 case IdentifierConstraintType_Wildcard:
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
277 return OrthancPluginIdentifierConstraint_Wildcard;
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
278
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
279 default:
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
280 throw OrthancException(ErrorCode_ParameterOutOfRange);
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
281 }
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
282 }
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
283
51db4a25a741 LookupIdentifier is plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1740
diff changeset
284
1761
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
285 IdentifierConstraintType Convert(OrthancPluginIdentifierConstraint constraint)
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
286 {
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
287 switch (constraint)
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
288 {
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
289 case OrthancPluginIdentifierConstraint_Equal:
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
290 return IdentifierConstraintType_Equal;
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
291
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
292 case OrthancPluginIdentifierConstraint_GreaterOrEqual:
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
293 return IdentifierConstraintType_GreaterOrEqual;
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
294
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
295 case OrthancPluginIdentifierConstraint_SmallerOrEqual:
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
296 return IdentifierConstraintType_SmallerOrEqual;
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
297
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
298 case OrthancPluginIdentifierConstraint_Wildcard:
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
299 return IdentifierConstraintType_Wildcard;
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
300
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
301 default:
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
302 throw OrthancException(ErrorCode_ParameterOutOfRange);
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
303 }
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
304 }
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
305
f4286d99ee0a fix sample database plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1760
diff changeset
306
1815
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
307 OrthancPluginInstanceOrigin Convert(RequestOrigin origin)
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
308 {
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
309 switch (origin)
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
310 {
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
311 case RequestOrigin_DicomProtocol:
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
312 return OrthancPluginInstanceOrigin_DicomProtocol;
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
313
1823
0ef4e6e66b56 "Origin" metadata for the instances
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1816
diff changeset
314 case RequestOrigin_RestApi:
1815
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
315 return OrthancPluginInstanceOrigin_RestApi;
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
316
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
317 case RequestOrigin_Lua:
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
318 return OrthancPluginInstanceOrigin_Lua;
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
319
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
320 case RequestOrigin_Plugins:
1816
87c069c94ac9 plugin sample: automated jpeg2k compression
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1815
diff changeset
321 return OrthancPluginInstanceOrigin_Plugin;
1815
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
322
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
323 case RequestOrigin_Unknown:
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
324 return OrthancPluginInstanceOrigin_Unknown;
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
325
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
326 default:
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
327 throw OrthancException(ErrorCode_ParameterOutOfRange);
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
328 }
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
329 }
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
330
2abfdca9b915 OrthancPluginGetInstanceOrigin
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1773
diff changeset
331
1961
ef1e9856c26f New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
332 OrthancPluginHttpMethod Convert(HttpMethod method)
ef1e9856c26f New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
333 {
ef1e9856c26f New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
334 switch (method)
ef1e9856c26f New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
335 {
ef1e9856c26f New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
336 case HttpMethod_Get:
ef1e9856c26f New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
337 return OrthancPluginHttpMethod_Get;
ef1e9856c26f New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
338
ef1e9856c26f New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
339 case HttpMethod_Post:
ef1e9856c26f New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
340 return OrthancPluginHttpMethod_Post;
ef1e9856c26f New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
341
ef1e9856c26f New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
342 case HttpMethod_Put:
ef1e9856c26f New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
343 return OrthancPluginHttpMethod_Put;
ef1e9856c26f New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
344
ef1e9856c26f New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
345 case HttpMethod_Delete:
ef1e9856c26f New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
346 return OrthancPluginHttpMethod_Delete;
ef1e9856c26f New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
347
ef1e9856c26f New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
348 default:
ef1e9856c26f New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
349 throw OrthancException(ErrorCode_ParameterOutOfRange);
ef1e9856c26f New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
350 }
ef1e9856c26f New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
351 }
ef1e9856c26f New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
352
ef1e9856c26f New callback to filter incoming HTTP requests: OrthancPluginRegisterIncomingHttpRequestFilter()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1900
diff changeset
353
2006
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
354 ValueRepresentation Convert(OrthancPluginValueRepresentation vr)
1657
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
355 {
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
356 switch (vr)
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
357 {
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
358 case OrthancPluginValueRepresentation_AE:
2006
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
359 return ValueRepresentation_ApplicationEntity;
1657
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
360
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
361 case OrthancPluginValueRepresentation_AS:
2006
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
362 return ValueRepresentation_AgeString;
1657
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
363
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
364 case OrthancPluginValueRepresentation_AT:
2006
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
365 return ValueRepresentation_AttributeTag;
1657
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
366
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
367 case OrthancPluginValueRepresentation_CS:
2006
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
368 return ValueRepresentation_CodeString;
1657
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
369
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
370 case OrthancPluginValueRepresentation_DA:
2006
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
371 return ValueRepresentation_Date;
1657
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
372
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
373 case OrthancPluginValueRepresentation_DS:
2006
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
374 return ValueRepresentation_DecimalString;
1657
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
375
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
376 case OrthancPluginValueRepresentation_DT:
2006
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
377 return ValueRepresentation_DateTime;
1657
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
378
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
379 case OrthancPluginValueRepresentation_FD:
2006
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
380 return ValueRepresentation_FloatingPointDouble;
1657
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
381
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
382 case OrthancPluginValueRepresentation_FL:
2006
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
383 return ValueRepresentation_FloatingPointSingle;
1657
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
384
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
385 case OrthancPluginValueRepresentation_IS:
2006
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
386 return ValueRepresentation_IntegerString;
1657
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
387
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
388 case OrthancPluginValueRepresentation_LO:
2006
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
389 return ValueRepresentation_LongString;
1657
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
390
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
391 case OrthancPluginValueRepresentation_LT:
2006
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
392 return ValueRepresentation_LongText;
1657
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
393
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
394 case OrthancPluginValueRepresentation_OB:
2006
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
395 return ValueRepresentation_OtherByte;
1657
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
396
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
397 case OrthancPluginValueRepresentation_OF:
2006
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
398 return ValueRepresentation_OtherFloat;
1657
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
399
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
400 case OrthancPluginValueRepresentation_OW:
2006
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
401 return ValueRepresentation_OtherWord;
1657
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
402
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
403 case OrthancPluginValueRepresentation_PN:
2007
655489d9165d DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2006
diff changeset
404 return ValueRepresentation_PersonName;
1657
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
405
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
406 case OrthancPluginValueRepresentation_SH:
2006
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
407 return ValueRepresentation_ShortString;
1657
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
408
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
409 case OrthancPluginValueRepresentation_SL:
2006
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
410 return ValueRepresentation_SignedLong;
1657
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
411
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
412 case OrthancPluginValueRepresentation_SQ:
2006
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
413 return ValueRepresentation_Sequence;
1657
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
414
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
415 case OrthancPluginValueRepresentation_SS:
2006
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
416 return ValueRepresentation_SignedShort;
1657
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
417
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
418 case OrthancPluginValueRepresentation_ST:
2006
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
419 return ValueRepresentation_ShortText;
1657
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
420
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
421 case OrthancPluginValueRepresentation_TM:
2006
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
422 return ValueRepresentation_Time;
1657
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
423
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
424 case OrthancPluginValueRepresentation_UI:
2006
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
425 return ValueRepresentation_UniqueIdentifier;
1657
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
426
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
427 case OrthancPluginValueRepresentation_UL:
2006
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
428 return ValueRepresentation_UnsignedLong;
1657
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
429
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
430 case OrthancPluginValueRepresentation_UN:
2006
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
431 return ValueRepresentation_Unknown;
1657
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
432
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
433 case OrthancPluginValueRepresentation_US:
2006
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
434 return ValueRepresentation_UnsignedShort;
1657
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
435
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
436 case OrthancPluginValueRepresentation_UT:
2006
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
437 return ValueRepresentation_UnlimitedText;
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
438
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
439 default:
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
440 throw OrthancException(ErrorCode_ParameterOutOfRange);
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
441
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
442 /*
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
443 Not supported as of DCMTK 3.6.0:
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
444 return ValueRepresentation_OtherDouble
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
445 return ValueRepresentation_OtherLong
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
446 return ValueRepresentation_UniversalResource
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
447 return ValueRepresentation_UnlimitedCharacters
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
448 */
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
449 }
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
450 }
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
451
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
452
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
453 OrthancPluginValueRepresentation Convert(ValueRepresentation vr)
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
454 {
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
455 switch (vr)
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
456 {
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
457 case ValueRepresentation_ApplicationEntity:
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
458 return OrthancPluginValueRepresentation_AE;
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
459
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
460 case ValueRepresentation_AgeString:
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
461 return OrthancPluginValueRepresentation_AS;
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
462
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
463 case ValueRepresentation_AttributeTag:
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
464 return OrthancPluginValueRepresentation_AT;
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
465
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
466 case ValueRepresentation_CodeString:
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
467 return OrthancPluginValueRepresentation_CS;
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
468
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
469 case ValueRepresentation_Date:
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
470 return OrthancPluginValueRepresentation_DA;
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
471
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
472 case ValueRepresentation_DecimalString:
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
473 return OrthancPluginValueRepresentation_DS;
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
474
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
475 case ValueRepresentation_DateTime:
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
476 return OrthancPluginValueRepresentation_DT;
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
477
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
478 case ValueRepresentation_FloatingPointDouble:
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
479 return OrthancPluginValueRepresentation_FD;
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
480
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
481 case ValueRepresentation_FloatingPointSingle:
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
482 return OrthancPluginValueRepresentation_FL;
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
483
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
484 case ValueRepresentation_IntegerString:
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
485 return OrthancPluginValueRepresentation_IS;
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
486
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
487 case ValueRepresentation_LongString:
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
488 return OrthancPluginValueRepresentation_LO;
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
489
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
490 case ValueRepresentation_LongText:
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
491 return OrthancPluginValueRepresentation_LT;
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
492
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
493 case ValueRepresentation_OtherByte:
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
494 return OrthancPluginValueRepresentation_OB;
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
495
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
496 case ValueRepresentation_OtherFloat:
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
497 return OrthancPluginValueRepresentation_OF;
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
498
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
499 case ValueRepresentation_OtherWord:
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
500 return OrthancPluginValueRepresentation_OW;
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
501
2007
655489d9165d DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2006
diff changeset
502 case ValueRepresentation_PersonName:
2006
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
503 return OrthancPluginValueRepresentation_PN;
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
504
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
505 case ValueRepresentation_ShortString:
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
506 return OrthancPluginValueRepresentation_SH;
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
507
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
508 case ValueRepresentation_SignedLong:
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
509 return OrthancPluginValueRepresentation_SL;
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
510
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
511 case ValueRepresentation_Sequence:
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
512 return OrthancPluginValueRepresentation_SQ;
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
513
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
514 case ValueRepresentation_SignedShort:
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
515 return OrthancPluginValueRepresentation_SS;
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
516
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
517 case ValueRepresentation_ShortText:
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
518 return OrthancPluginValueRepresentation_ST;
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
519
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
520 case ValueRepresentation_Time:
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
521 return OrthancPluginValueRepresentation_TM;
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
522
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
523 case ValueRepresentation_UniqueIdentifier:
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
524 return OrthancPluginValueRepresentation_UI;
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
525
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
526 case ValueRepresentation_UnsignedLong:
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
527 return OrthancPluginValueRepresentation_UL;
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
528
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
529 case ValueRepresentation_UnsignedShort:
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
530 return OrthancPluginValueRepresentation_US;
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
531
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
532 case ValueRepresentation_UnlimitedText:
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
533 return OrthancPluginValueRepresentation_UT;
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
534
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
535 case ValueRepresentation_Unknown:
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
536 return OrthancPluginValueRepresentation_UN; // Unknown
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
537
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
538 // These VR are not supported as of DCMTK 3.6.0, so they are
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
539 // mapped to "UN" (unknown) VR in the plugins
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
540 case ValueRepresentation_OtherDouble:
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
541 case ValueRepresentation_OtherLong:
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
542 case ValueRepresentation_UniversalResource:
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
543 case ValueRepresentation_UnlimitedCharacters:
6301bbcbcaed more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1961
diff changeset
544 return OrthancPluginValueRepresentation_UN;
1657
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
545
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
546 default:
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
547 throw OrthancException(ErrorCode_ParameterOutOfRange);
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
548 }
5360cdba70d8 New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1646
diff changeset
549 }
1625
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
550 }
c17b1142caab reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
551 }