Mercurial > hg > orthanc
annotate OrthancFramework/Resources/CodeGeneration/GenerateTransferSyntaxesDcmtk.mustache @ 4566:f52d0bc19e07 db-changes
fix build for msvc2008
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 08 Mar 2021 13:54:02 +0100 |
parents | d9473bd5ed43 |
children | 7053502fbf97 |
rev | line source |
---|---|
3730
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1 /** |
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
2 * Orthanc - A Lightweight, RESTful DICOM Store |
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
4437
d9473bd5ed43
upgrade to year 2021
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4119
diff
changeset
|
5 * Copyright (C) 2017-2021 Osimis S.A., Belgium |
3730
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
6 * |
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
7 * This program is free software: you can redistribute it and/or |
4119
bf7b9edf6b81
re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
8 * modify it under the terms of the GNU Lesser General Public License |
bf7b9edf6b81
re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
9 * as published by the Free Software Foundation, either version 3 of |
bf7b9edf6b81
re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
10 * the License, or (at your option) any later version. |
3730
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
11 * |
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
12 * This program is distributed in the hope that it will be useful, but |
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
13 * WITHOUT ANY WARRANTY; without even the implied warranty of |
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
4119
bf7b9edf6b81
re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
15 * Lesser General Public License for more details. |
3730
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
16 * |
4119
bf7b9edf6b81
re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
17 * You should have received a copy of the GNU Lesser General Public |
bf7b9edf6b81
re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
18 * License along with this program. If not, see |
bf7b9edf6b81
re-licensing the OrthancFramework to LGPL, in order to license Stone of Orthanc under LGPL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4044
diff
changeset
|
19 * <http://www.gnu.org/licenses/>. |
3730
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
20 **/ |
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
21 |
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
22 // This file is autogenerated by "../Resources/GenerateTransferSyntaxes.py" |
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 |
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 namespace Orthanc |
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 { |
3743
33c19a6643e1
creating IDicomTranscoder abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3730
diff
changeset
|
26 bool FromDcmtkBridge::LookupDcmtkTransferSyntax(E_TransferSyntax& target, |
33c19a6643e1
creating IDicomTranscoder abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3730
diff
changeset
|
27 DicomTransferSyntax source) |
3730
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 { |
3743
33c19a6643e1
creating IDicomTranscoder abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3730
diff
changeset
|
29 switch (source) |
3730
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 { |
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 {{#Syntaxes}} |
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 {{#DCMTK}} |
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 {{#SinceDCMTK}} |
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 #if DCMTK_VERSION_NUMBER >= {{SinceDCMTK}} |
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 {{/SinceDCMTK}} |
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
36 case DicomTransferSyntax_{{Value}}: |
3769
eb044cc49d51
compatibility with DCMTK 3.6.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3743
diff
changeset
|
37 {{#DCMTK360}} |
eb044cc49d51
compatibility with DCMTK 3.6.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3743
diff
changeset
|
38 # if DCMTK_VERSION_NUMBER <= 360 |
eb044cc49d51
compatibility with DCMTK 3.6.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3743
diff
changeset
|
39 target = {{DCMTK360}}; |
eb044cc49d51
compatibility with DCMTK 3.6.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3743
diff
changeset
|
40 # else |
3730
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
41 target = {{DCMTK}}; |
3769
eb044cc49d51
compatibility with DCMTK 3.6.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3743
diff
changeset
|
42 # endif |
eb044cc49d51
compatibility with DCMTK 3.6.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3743
diff
changeset
|
43 {{/DCMTK360}} |
eb044cc49d51
compatibility with DCMTK 3.6.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3743
diff
changeset
|
44 {{^DCMTK360}} |
eb044cc49d51
compatibility with DCMTK 3.6.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3743
diff
changeset
|
45 target = {{DCMTK}}; |
eb044cc49d51
compatibility with DCMTK 3.6.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3743
diff
changeset
|
46 {{/DCMTK360}} |
3730
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
47 return true; |
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
48 {{#SinceDCMTK}} |
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
49 #endif |
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
50 {{/SinceDCMTK}} |
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
51 |
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
52 {{/DCMTK}} |
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
53 {{/Syntaxes}} |
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
54 default: |
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
55 return false; |
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
56 } |
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
57 } |
3743
33c19a6643e1
creating IDicomTranscoder abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3730
diff
changeset
|
58 |
33c19a6643e1
creating IDicomTranscoder abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3730
diff
changeset
|
59 |
33c19a6643e1
creating IDicomTranscoder abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3730
diff
changeset
|
60 bool FromDcmtkBridge::LookupOrthancTransferSyntax(DicomTransferSyntax& target, |
33c19a6643e1
creating IDicomTranscoder abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3730
diff
changeset
|
61 E_TransferSyntax source) |
33c19a6643e1
creating IDicomTranscoder abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3730
diff
changeset
|
62 { |
33c19a6643e1
creating IDicomTranscoder abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3730
diff
changeset
|
63 switch (source) |
33c19a6643e1
creating IDicomTranscoder abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3730
diff
changeset
|
64 { |
33c19a6643e1
creating IDicomTranscoder abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3730
diff
changeset
|
65 {{#Syntaxes}} |
33c19a6643e1
creating IDicomTranscoder abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3730
diff
changeset
|
66 {{#DCMTK}} |
33c19a6643e1
creating IDicomTranscoder abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3730
diff
changeset
|
67 {{#SinceDCMTK}} |
33c19a6643e1
creating IDicomTranscoder abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3730
diff
changeset
|
68 #if DCMTK_VERSION_NUMBER >= {{SinceDCMTK}} |
33c19a6643e1
creating IDicomTranscoder abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3730
diff
changeset
|
69 {{/SinceDCMTK}} |
3769
eb044cc49d51
compatibility with DCMTK 3.6.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3743
diff
changeset
|
70 {{#DCMTK360}} |
eb044cc49d51
compatibility with DCMTK 3.6.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3743
diff
changeset
|
71 # if DCMTK_VERSION_NUMBER <= 360 |
eb044cc49d51
compatibility with DCMTK 3.6.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3743
diff
changeset
|
72 case {{DCMTK360}}: |
eb044cc49d51
compatibility with DCMTK 3.6.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3743
diff
changeset
|
73 # else |
3743
33c19a6643e1
creating IDicomTranscoder abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3730
diff
changeset
|
74 case {{DCMTK}}: |
3769
eb044cc49d51
compatibility with DCMTK 3.6.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3743
diff
changeset
|
75 # endif |
eb044cc49d51
compatibility with DCMTK 3.6.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3743
diff
changeset
|
76 {{/DCMTK360}} |
eb044cc49d51
compatibility with DCMTK 3.6.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3743
diff
changeset
|
77 {{^DCMTK360}} |
eb044cc49d51
compatibility with DCMTK 3.6.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3743
diff
changeset
|
78 case {{DCMTK}}: |
eb044cc49d51
compatibility with DCMTK 3.6.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3743
diff
changeset
|
79 {{/DCMTK360}} |
3743
33c19a6643e1
creating IDicomTranscoder abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3730
diff
changeset
|
80 target = DicomTransferSyntax_{{Value}}; |
33c19a6643e1
creating IDicomTranscoder abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3730
diff
changeset
|
81 return true; |
33c19a6643e1
creating IDicomTranscoder abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3730
diff
changeset
|
82 {{#SinceDCMTK}} |
33c19a6643e1
creating IDicomTranscoder abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3730
diff
changeset
|
83 #endif |
33c19a6643e1
creating IDicomTranscoder abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3730
diff
changeset
|
84 {{/SinceDCMTK}} |
33c19a6643e1
creating IDicomTranscoder abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3730
diff
changeset
|
85 |
33c19a6643e1
creating IDicomTranscoder abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3730
diff
changeset
|
86 {{/DCMTK}} |
33c19a6643e1
creating IDicomTranscoder abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3730
diff
changeset
|
87 {{/Syntaxes}} |
33c19a6643e1
creating IDicomTranscoder abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3730
diff
changeset
|
88 default: |
33c19a6643e1
creating IDicomTranscoder abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3730
diff
changeset
|
89 return false; |
33c19a6643e1
creating IDicomTranscoder abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3730
diff
changeset
|
90 } |
33c19a6643e1
creating IDicomTranscoder abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3730
diff
changeset
|
91 } |
3730
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
92 } |