Mercurial > hg > orthanc-stone
annotate OrthancStone/UnitTestsSources/SortedFramesTests.cpp @ 1534:0443d04416d9
don't discard the windowing altered by mouse
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 07 Aug 2020 21:48:43 +0200 |
parents | 244ad1e4e76a |
children |
rev | line source |
---|---|
1477 | 1 /** |
2 * Stone of Orthanc | |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
4 * Department, University Hospital of Liege, Belgium | |
5 * Copyright (C) 2017-2020 Osimis S.A., Belgium | |
6 * | |
7 * This program is free software: you can redistribute it and/or | |
8 * modify it under the terms of the GNU Affero General Public License | |
9 * as published by the Free Software Foundation, either version 3 of | |
10 * the License, or (at your option) any later version. | |
11 * | |
12 * This program is distributed in the hope that it will be useful, but | |
13 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 * Affero General Public License for more details. | |
16 * | |
17 * You should have received a copy of the GNU Affero General Public License | |
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
19 **/ | |
20 | |
21 | |
22 #include <gtest/gtest.h> | |
23 | |
1512
244ad1e4e76a
reorganization of folders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1478
diff
changeset
|
24 #include "../Sources/Toolbox/SortedFrames.h" |
1477 | 25 |
1478
fab6c6e795a3
Framework/Toolbox/SortedFrames.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1477
diff
changeset
|
26 #include <OrthancException.h> |
1477 | 27 |
28 | |
29 TEST(SortedFrames, Basic) | |
30 { | |
31 OrthancStone::SortedFrames f; | |
32 ASSERT_TRUE(f.GetStudyInstanceUid().empty()); | |
33 ASSERT_TRUE(f.GetSeriesInstanceUid().empty()); | |
34 ASSERT_EQ(0u, f.GetInstancesCount()); | |
35 ASSERT_THROW(f.GetInstanceTags(0), Orthanc::OrthancException); | |
36 ASSERT_THROW(f.GetSopInstanceUid(0), Orthanc::OrthancException); | |
37 ASSERT_TRUE(f.IsSorted()); | |
38 ASSERT_EQ(0u, f.GetFramesCount()); | |
39 ASSERT_THROW(f.GetFrameTags(0), Orthanc::OrthancException); | |
40 ASSERT_THROW(f.GetFrameSopInstanceUid(0), Orthanc::OrthancException); | |
41 ASSERT_THROW(f.GetFrameSiblingsCount(0), Orthanc::OrthancException); | |
42 ASSERT_THROW(f.GetFrameIndex(0), Orthanc::OrthancException); | |
43 | |
44 Orthanc::DicomMap tags; | |
45 ASSERT_THROW(f.AddInstance(tags), Orthanc::OrthancException); | |
46 tags.SetValue(Orthanc::DICOM_TAG_STUDY_INSTANCE_UID, "study", false); | |
47 ASSERT_THROW(f.AddInstance(tags), Orthanc::OrthancException); | |
48 tags.SetValue(Orthanc::DICOM_TAG_SERIES_INSTANCE_UID, "series", false); | |
49 ASSERT_THROW(f.AddInstance(tags), Orthanc::OrthancException); | |
50 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "sop", false); | |
51 f.AddInstance(tags); | |
52 | |
53 ASSERT_EQ("study", f.GetStudyInstanceUid()); | |
54 ASSERT_EQ("series", f.GetSeriesInstanceUid()); | |
55 ASSERT_EQ(1u, f.GetInstancesCount()); | |
56 std::string s; | |
57 ASSERT_TRUE(f.GetInstanceTags(0).LookupStringValue(s, Orthanc::DICOM_TAG_SOP_INSTANCE_UID, false)); | |
58 ASSERT_EQ("sop", s); | |
59 ASSERT_EQ("sop", f.GetSopInstanceUid(0)); | |
60 ASSERT_FALSE(f.IsSorted()); | |
61 ASSERT_THROW(f.GetFramesCount(), Orthanc::OrthancException); | |
62 ASSERT_THROW(f.GetFrameTags(0), Orthanc::OrthancException); | |
63 ASSERT_THROW(f.GetFrameSopInstanceUid(0), Orthanc::OrthancException); | |
64 ASSERT_THROW(f.GetFrameSiblingsCount(0), Orthanc::OrthancException); | |
65 ASSERT_THROW(f.GetFrameIndex(0), Orthanc::OrthancException); | |
66 | |
67 f.Sort(); | |
68 ASSERT_TRUE(f.IsSorted()); | |
69 ASSERT_EQ(1u, f.GetFramesCount()); | |
70 ASSERT_TRUE(f.GetFrameTags(0).LookupStringValue(s, Orthanc::DICOM_TAG_SOP_INSTANCE_UID, false)); | |
71 ASSERT_EQ("sop", s); | |
72 ASSERT_EQ("sop", f.GetFrameSopInstanceUid(0)); | |
73 ASSERT_EQ(1u, f.GetFrameSiblingsCount(0)); | |
74 ASSERT_EQ(0u, f.GetFrameIndex(0)); | |
75 ASSERT_THROW(f.GetFrameTags(1), Orthanc::OrthancException); | |
76 } | |
77 | |
78 | |
79 TEST(SortedFrames, SortSopInstanceUid) | |
80 { | |
81 Orthanc::DicomMap tags; | |
82 tags.SetValue(Orthanc::DICOM_TAG_STUDY_INSTANCE_UID, "study", false); | |
83 tags.SetValue(Orthanc::DICOM_TAG_SERIES_INSTANCE_UID, "series", false); | |
84 | |
85 OrthancStone::SortedFrames f; | |
86 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "sop3", false); | |
87 tags.SetValue(Orthanc::DICOM_TAG_NUMBER_OF_FRAMES, "1", false); | |
88 f.AddInstance(tags); | |
89 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "sop1", false); | |
90 tags.SetValue(Orthanc::DICOM_TAG_NUMBER_OF_FRAMES, "3", false); | |
91 f.AddInstance(tags); | |
92 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "sop2", false); | |
93 tags.SetValue(Orthanc::DICOM_TAG_NUMBER_OF_FRAMES, "2", false); | |
94 f.AddInstance(tags); | |
95 | |
96 f.Sort(); | |
97 ASSERT_EQ(3u, f.GetInstancesCount()); | |
98 ASSERT_EQ("sop3", f.GetSopInstanceUid(0)); | |
99 ASSERT_EQ("sop1", f.GetSopInstanceUid(1)); | |
100 ASSERT_EQ("sop2", f.GetSopInstanceUid(2)); | |
101 ASSERT_EQ(6u, f.GetFramesCount()); | |
102 ASSERT_EQ("sop1", f.GetFrameSopInstanceUid(0)); ASSERT_EQ(0u, f.GetFrameIndex(0)); | |
103 ASSERT_EQ("sop1", f.GetFrameSopInstanceUid(1)); ASSERT_EQ(1u, f.GetFrameIndex(1)); | |
104 ASSERT_EQ("sop1", f.GetFrameSopInstanceUid(2)); ASSERT_EQ(2u, f.GetFrameIndex(2)); | |
105 ASSERT_EQ("sop2", f.GetFrameSopInstanceUid(3)); ASSERT_EQ(0u, f.GetFrameIndex(3)); | |
106 ASSERT_EQ("sop2", f.GetFrameSopInstanceUid(4)); ASSERT_EQ(1u, f.GetFrameIndex(4)); | |
107 ASSERT_EQ("sop3", f.GetFrameSopInstanceUid(5)); ASSERT_EQ(0u, f.GetFrameIndex(5)); | |
108 } | |
109 | |
110 | |
111 TEST(SortedFrames, SortInstanceNumber) | |
112 { | |
113 Orthanc::DicomMap tags; | |
114 tags.SetValue(Orthanc::DICOM_TAG_STUDY_INSTANCE_UID, "study", false); | |
115 tags.SetValue(Orthanc::DICOM_TAG_SERIES_INSTANCE_UID, "series", false); | |
116 | |
117 OrthancStone::SortedFrames f; | |
118 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "sop1", false); | |
119 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "20", false); | |
120 f.AddInstance(tags); | |
121 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "sop2", false); | |
122 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "-20", false); | |
123 f.AddInstance(tags); | |
124 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "sop2a", false); | |
125 tags.Remove(Orthanc::DICOM_TAG_INSTANCE_NUMBER); | |
126 f.AddInstance(tags); | |
127 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "sop4", false); | |
128 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "10", false); | |
129 f.AddInstance(tags); | |
130 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "sop3", false); | |
131 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "10", false); | |
132 f.AddInstance(tags); | |
133 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "sop5", false); | |
134 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "10", false); | |
135 f.AddInstance(tags); | |
136 | |
137 f.Sort(); | |
138 ASSERT_EQ(6u, f.GetInstancesCount()); | |
139 ASSERT_EQ("sop1", f.GetSopInstanceUid(0)); | |
140 ASSERT_EQ("sop2", f.GetSopInstanceUid(1)); | |
141 ASSERT_EQ("sop2a", f.GetSopInstanceUid(2)); | |
142 ASSERT_EQ("sop4", f.GetSopInstanceUid(3)); | |
143 ASSERT_EQ("sop3", f.GetSopInstanceUid(4)); | |
144 ASSERT_EQ("sop5", f.GetSopInstanceUid(5)); | |
145 ASSERT_EQ(6u, f.GetFramesCount()); | |
146 ASSERT_EQ("sop2", f.GetFrameSopInstanceUid(0)); ASSERT_EQ(0u, f.GetFrameIndex(0)); | |
147 ASSERT_EQ("sop3", f.GetFrameSopInstanceUid(1)); ASSERT_EQ(0u, f.GetFrameIndex(1)); | |
148 ASSERT_EQ("sop4", f.GetFrameSopInstanceUid(2)); ASSERT_EQ(0u, f.GetFrameIndex(2)); | |
149 ASSERT_EQ("sop5", f.GetFrameSopInstanceUid(3)); ASSERT_EQ(0u, f.GetFrameIndex(3)); | |
150 ASSERT_EQ("sop1", f.GetFrameSopInstanceUid(4)); ASSERT_EQ(0u, f.GetFrameIndex(4)); | |
151 ASSERT_EQ("sop2a", f.GetFrameSopInstanceUid(5)); ASSERT_EQ(0u, f.GetFrameIndex(5)); | |
152 } | |
153 | |
154 | |
155 TEST(SortedFrames, SortInstanceNumberAndImageIndex) | |
156 { | |
157 Orthanc::DicomMap tags; | |
158 tags.SetValue(Orthanc::DICOM_TAG_STUDY_INSTANCE_UID, "study", false); | |
159 tags.SetValue(Orthanc::DICOM_TAG_SERIES_INSTANCE_UID, "series", false); | |
160 | |
161 OrthancStone::SortedFrames f; | |
162 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "sop1", false); | |
163 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "20", false); | |
164 f.AddInstance(tags); | |
165 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "sop2", false); | |
166 tags.Remove(Orthanc::DICOM_TAG_INSTANCE_NUMBER); | |
167 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_INDEX, "20", false); | |
168 f.AddInstance(tags); | |
169 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "sop3", false); | |
170 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_INDEX, "30", false); | |
171 f.AddInstance(tags); | |
172 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "sop4", false); | |
173 tags.Remove(Orthanc::DICOM_TAG_IMAGE_INDEX); | |
174 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "30", false); | |
175 f.AddInstance(tags); | |
176 | |
177 f.Sort(); | |
178 ASSERT_EQ(4u, f.GetInstancesCount()); | |
179 ASSERT_EQ("sop1", f.GetSopInstanceUid(0)); | |
180 ASSERT_EQ("sop2", f.GetSopInstanceUid(1)); | |
181 ASSERT_EQ("sop3", f.GetSopInstanceUid(2)); | |
182 ASSERT_EQ("sop4", f.GetSopInstanceUid(3)); | |
183 ASSERT_EQ(4u, f.GetFramesCount()); | |
184 // First instance number, then image index | |
185 ASSERT_EQ("sop1", f.GetFrameSopInstanceUid(0)); ASSERT_EQ(0u, f.GetFrameIndex(0)); | |
186 ASSERT_EQ("sop4", f.GetFrameSopInstanceUid(1)); ASSERT_EQ(0u, f.GetFrameIndex(1)); | |
187 ASSERT_EQ("sop2", f.GetFrameSopInstanceUid(2)); ASSERT_EQ(0u, f.GetFrameIndex(2)); | |
188 ASSERT_EQ("sop3", f.GetFrameSopInstanceUid(3)); ASSERT_EQ(0u, f.GetFrameIndex(3)); | |
189 } | |
190 | |
191 | |
192 TEST(SortedFrames, Knix) // Created using "SortedFramesCreateTest.py" | |
193 { | |
194 Orthanc::DicomMap tags; | |
195 tags.SetValue(Orthanc::DICOM_TAG_STUDY_INSTANCE_UID, "1.2.840.113619.2.176.2025.1499492.7391.1171285944.390", false); | |
196 tags.SetValue(Orthanc::DICOM_TAG_SERIES_INSTANCE_UID, "1.2.840.113619.2.176.2025.1499492.7391.1171285944.392", false); | |
197 OrthancStone::SortedFrames f; | |
198 | |
199 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "67b44a5e-8997f88d-6e527bd6-df342483-dab1674c", false); | |
200 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-60.7285\\-105.586\\73.7768", false); | |
201 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "-0\\1\\0\\-0\\-0\\-1", false); | |
202 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "10", false); | |
203 f.AddInstance(tags); | |
204 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "a8ee83f9-1cc26ad9-ebba3043-8afc47c2-bd784610", false); | |
205 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-42.7285\\-105.586\\73.7768", false); | |
206 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "-0\\1\\0\\-0\\-0\\-1", false); | |
207 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "6", false); | |
208 f.AddInstance(tags); | |
209 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "5a2acb03-063f5063-cac452d1-a55992f9-769900fb", false); | |
210 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-114.729\\-105.586\\73.7768", false); | |
211 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "-0\\1\\0\\-0\\-0\\-1", false); | |
212 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "22", false); | |
213 f.AddInstance(tags); | |
214 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "23d12f39-e9a4fc21-8da338c4-97feff30-48e95534", false); | |
215 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-83.2285\\-105.586\\73.7768", false); | |
216 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "-0\\1\\0\\-0\\-0\\-1", false); | |
217 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "15", false); | |
218 f.AddInstance(tags); | |
219 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "16606f69-83b48518-ab34304a-c8871b7f-a9298d74", false); | |
220 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-78.7285\\-105.586\\73.7768", false); | |
221 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "-0\\1\\0\\-0\\-0\\-1", false); | |
222 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "14", false); | |
223 f.AddInstance(tags); | |
224 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "63d595f3-327a306d-1709bb8b-2a72e11c-4f7221fe", false); | |
225 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-96.7285\\-105.586\\73.7768", false); | |
226 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "-0\\1\\0\\-0\\-0\\-1", false); | |
227 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "18", false); | |
228 f.AddInstance(tags); | |
229 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "8bdecadd-e3477e28-bbbf0297-22b0b680-37b13a7c", false); | |
230 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-65.2285\\-105.586\\73.7768", false); | |
231 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "-0\\1\\0\\-0\\-0\\-1", false); | |
232 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "11", false); | |
233 f.AddInstance(tags); | |
234 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "b590cc95-55789755-ebd10b76-911e855e-f24e4fe7", false); | |
235 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-74.2285\\-105.586\\73.7768", false); | |
236 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "-0\\1\\0\\-0\\-0\\-1", false); | |
237 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "13", false); | |
238 f.AddInstance(tags); | |
239 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "eaa49a94-b9042041-7f45150b-e414f800-d7232874", false); | |
240 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-38.2285\\-105.586\\73.7768", false); | |
241 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "-0\\1\\0\\-0\\-0\\-1", false); | |
242 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "5", false); | |
243 f.AddInstance(tags); | |
244 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "6824db93-ed4e2740-07be953f-6d0a8fb3-af0a3a0b", false); | |
245 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-105.729\\-105.586\\73.7768", false); | |
246 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "-0\\1\\0\\-0\\-0\\-1", false); | |
247 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "20", false); | |
248 f.AddInstance(tags); | |
249 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "e0d82343-9cef01e9-e21df50a-11886a94-1d0216ea", false); | |
250 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-51.7285\\-105.586\\73.7768", false); | |
251 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "-0\\1\\0\\-0\\-0\\-1", false); | |
252 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "8", false); | |
253 f.AddInstance(tags); | |
254 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "dc1576ee-25b0b1ef-e038df76-d296fcad-a1456169", false); | |
255 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-110.229\\-105.586\\73.7768", false); | |
256 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "-0\\1\\0\\-0\\-0\\-1", false); | |
257 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "21", false); | |
258 f.AddInstance(tags); | |
259 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "b9cf5158-06f8e713-7d5111aa-411fd75b-7be2c51e", false); | |
260 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-20.2285\\-105.586\\73.7768", false); | |
261 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "-0\\1\\0\\-0\\-0\\-1", false); | |
262 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "1", false); | |
263 f.AddInstance(tags); | |
264 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "5faf886f-bd5517cf-1a6ba06e-ac0e6ddb-47bdd8b2", false); | |
265 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-101.229\\-105.586\\73.7768", false); | |
266 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "-0\\1\\0\\-0\\-0\\-1", false); | |
267 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "19", false); | |
268 f.AddInstance(tags); | |
269 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "3e8f8ec1-b603f874-825552f1-6fcac7fa-72ca1aa5", false); | |
270 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-24.7285\\-105.586\\73.7768", false); | |
271 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "-0\\1\\0\\-0\\-0\\-1", false); | |
272 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "2", false); | |
273 f.AddInstance(tags); | |
274 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "7a7c0120-37f6dd58-c46312e6-2559975d-5af4616f", false); | |
275 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-87.7285\\-105.586\\73.7768", false); | |
276 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "-0\\1\\0\\-0\\-0\\-1", false); | |
277 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "16", false); | |
278 f.AddInstance(tags); | |
279 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "a0ca6802-56c697c3-0205bab8-42217cfc-84ff0de6", false); | |
280 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-33.7285\\-105.586\\73.7768", false); | |
281 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "-0\\1\\0\\-0\\-0\\-1", false); | |
282 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "4", false); | |
283 f.AddInstance(tags); | |
284 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "efce9ff4-3fe07d83-745846f8-fefe5d64-bfea65e6", false); | |
285 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-56.2285\\-105.586\\73.7768", false); | |
286 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "-0\\1\\0\\-0\\-0\\-1", false); | |
287 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "9", false); | |
288 f.AddInstance(tags); | |
289 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "fa56f961-d1ae8f6a-989c04f4-7a588e9e-b41b1a13", false); | |
290 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-92.2285\\-105.586\\73.7768", false); | |
291 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "-0\\1\\0\\-0\\-0\\-1", false); | |
292 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "17", false); | |
293 f.AddInstance(tags); | |
294 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "f5e889ac-c5afdc37-c5b62074-a8bdeef3-c58d9889", false); | |
295 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-69.7285\\-105.586\\73.7768", false); | |
296 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "-0\\1\\0\\-0\\-0\\-1", false); | |
297 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "12", false); | |
298 f.AddInstance(tags); | |
299 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "c19fb4b6-ad1224f2-2c3a2b28-0ea233be-38eea0de", false); | |
300 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-47.2285\\-105.586\\73.7768", false); | |
301 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "-0\\1\\0\\-0\\-0\\-1", false); | |
302 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "7", false); | |
303 f.AddInstance(tags); | |
304 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "348efc0a-71ee4758-56bd51fa-9703cbff-9b51d4c9", false); | |
305 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-29.2285\\-105.586\\73.7768", false); | |
306 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "-0\\1\\0\\-0\\-0\\-1", false); | |
307 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "3", false); | |
308 f.AddInstance(tags); | |
309 f.Sort(); | |
310 ASSERT_EQ(22u, f.GetFramesCount()); | |
311 ASSERT_EQ(f.GetFrameSopInstanceUid(0), "b9cf5158-06f8e713-7d5111aa-411fd75b-7be2c51e"); | |
312 ASSERT_EQ(f.GetFrameSopInstanceUid(1), "3e8f8ec1-b603f874-825552f1-6fcac7fa-72ca1aa5"); | |
313 ASSERT_EQ(f.GetFrameSopInstanceUid(2), "348efc0a-71ee4758-56bd51fa-9703cbff-9b51d4c9"); | |
314 ASSERT_EQ(f.GetFrameSopInstanceUid(3), "a0ca6802-56c697c3-0205bab8-42217cfc-84ff0de6"); | |
315 ASSERT_EQ(f.GetFrameSopInstanceUid(4), "eaa49a94-b9042041-7f45150b-e414f800-d7232874"); | |
316 ASSERT_EQ(f.GetFrameSopInstanceUid(5), "a8ee83f9-1cc26ad9-ebba3043-8afc47c2-bd784610"); | |
317 ASSERT_EQ(f.GetFrameSopInstanceUid(6), "c19fb4b6-ad1224f2-2c3a2b28-0ea233be-38eea0de"); | |
318 ASSERT_EQ(f.GetFrameSopInstanceUid(7), "e0d82343-9cef01e9-e21df50a-11886a94-1d0216ea"); | |
319 ASSERT_EQ(f.GetFrameSopInstanceUid(8), "efce9ff4-3fe07d83-745846f8-fefe5d64-bfea65e6"); | |
320 ASSERT_EQ(f.GetFrameSopInstanceUid(9), "67b44a5e-8997f88d-6e527bd6-df342483-dab1674c"); | |
321 ASSERT_EQ(f.GetFrameSopInstanceUid(10), "8bdecadd-e3477e28-bbbf0297-22b0b680-37b13a7c"); | |
322 ASSERT_EQ(f.GetFrameSopInstanceUid(11), "f5e889ac-c5afdc37-c5b62074-a8bdeef3-c58d9889"); | |
323 ASSERT_EQ(f.GetFrameSopInstanceUid(12), "b590cc95-55789755-ebd10b76-911e855e-f24e4fe7"); | |
324 ASSERT_EQ(f.GetFrameSopInstanceUid(13), "16606f69-83b48518-ab34304a-c8871b7f-a9298d74"); | |
325 ASSERT_EQ(f.GetFrameSopInstanceUid(14), "23d12f39-e9a4fc21-8da338c4-97feff30-48e95534"); | |
326 ASSERT_EQ(f.GetFrameSopInstanceUid(15), "7a7c0120-37f6dd58-c46312e6-2559975d-5af4616f"); | |
327 ASSERT_EQ(f.GetFrameSopInstanceUid(16), "fa56f961-d1ae8f6a-989c04f4-7a588e9e-b41b1a13"); | |
328 ASSERT_EQ(f.GetFrameSopInstanceUid(17), "63d595f3-327a306d-1709bb8b-2a72e11c-4f7221fe"); | |
329 ASSERT_EQ(f.GetFrameSopInstanceUid(18), "5faf886f-bd5517cf-1a6ba06e-ac0e6ddb-47bdd8b2"); | |
330 ASSERT_EQ(f.GetFrameSopInstanceUid(19), "6824db93-ed4e2740-07be953f-6d0a8fb3-af0a3a0b"); | |
331 ASSERT_EQ(f.GetFrameSopInstanceUid(20), "dc1576ee-25b0b1ef-e038df76-d296fcad-a1456169"); | |
332 ASSERT_EQ(f.GetFrameSopInstanceUid(21), "5a2acb03-063f5063-cac452d1-a55992f9-769900fb"); | |
333 } | |
334 | |
335 | |
336 TEST(SortedFrames, Cardiac) // Created using "SortedFramesCreateTest.py" | |
337 { | |
338 Orthanc::DicomMap tags; | |
339 tags.SetValue(Orthanc::DICOM_TAG_STUDY_INSTANCE_UID, "1.3.51.0.1.1.192.168.29.133.1681753.1681732", false); | |
340 tags.SetValue(Orthanc::DICOM_TAG_SERIES_INSTANCE_UID, "1.3.12.2.1107.5.2.33.37097.2012041612474981424569674.0.0.0", false); | |
341 OrthancStone::SortedFrames f; | |
342 | |
343 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "a468da62-a8a6e0b9-f66b86b0-b15fa30b-93077161", false); | |
344 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-37.318577811371\\-157.20910163001\\232.94204104611", false); | |
345 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "0.73931693068262\\0.61320183243991\\-0.2781977510663\\-0.3521819177853\\-3.9073598e-009\\-0.9359315662938", false); | |
346 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "14", false); | |
347 f.AddInstance(tags); | |
348 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "1cf40ac9-e823e677-cbd5db4b-9e48b451-cccbf950", false); | |
349 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-37.318577811371\\-157.20910163001\\232.94204104611", false); | |
350 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "0.73931693068262\\0.61320183243991\\-0.2781977510663\\-0.3521819177853\\-3.9073598e-009\\-0.9359315662938", false); | |
351 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "21", false); | |
352 f.AddInstance(tags); | |
353 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "d52d5f21-54f1ad99-4015a995-108f7210-ee157944", false); | |
354 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-37.318577811371\\-157.20910163001\\232.94204104611", false); | |
355 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "0.73931693068262\\0.61320183243991\\-0.2781977510663\\-0.3521819177853\\-3.9073598e-009\\-0.9359315662938", false); | |
356 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "15", false); | |
357 f.AddInstance(tags); | |
358 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "b348f629-11d59f98-fb22710b-4964b90a-f44436ff", false); | |
359 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-37.318577811371\\-157.20910163001\\232.94204104611", false); | |
360 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "0.73931693068262\\0.61320183243991\\-0.2781977510663\\-0.3521819177853\\-3.9073598e-009\\-0.9359315662938", false); | |
361 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "12", false); | |
362 f.AddInstance(tags); | |
363 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "aac4f2ba-e863f124-6af96709-053258a7-3d39db26", false); | |
364 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-37.318577811371\\-157.20910163001\\232.94204104611", false); | |
365 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "0.73931693068262\\0.61320183243991\\-0.2781977510663\\-0.3521819177853\\-3.9073598e-009\\-0.9359315662938", false); | |
366 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "13", false); | |
367 f.AddInstance(tags); | |
368 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "8fefe14c-c4c34152-2c3d3514-04e75747-eb7f01f0", false); | |
369 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-37.318577811371\\-157.20910163001\\232.94204104611", false); | |
370 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "0.73931693068262\\0.61320183243991\\-0.2781977510663\\-0.3521819177853\\-3.9073598e-009\\-0.9359315662938", false); | |
371 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "20", false); | |
372 f.AddInstance(tags); | |
373 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "20b42f52-6d5f784b-cdbc0fbe-4bfc6b0c-5a199c75", false); | |
374 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-37.318577811371\\-157.20910163001\\232.94204104611", false); | |
375 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "0.73931693068262\\0.61320183243991\\-0.2781977510663\\-0.3521819177853\\-3.9073598e-009\\-0.9359315662938", false); | |
376 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "17", false); | |
377 f.AddInstance(tags); | |
378 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "931d0c36-8fbb4101-70e6d756-edb15431-aaa9a31b", false); | |
379 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-37.318577811371\\-157.20910163001\\232.94204104611", false); | |
380 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "0.73931693068262\\0.61320183243991\\-0.2781977510663\\-0.3521819177853\\-3.9073598e-009\\-0.9359315662938", false); | |
381 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "19", false); | |
382 f.AddInstance(tags); | |
383 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "9e3b97ec-25b86a67-2cbb8f77-94e73268-4509d383", false); | |
384 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-37.318577811371\\-157.20910163001\\232.94204104611", false); | |
385 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "0.73931693068262\\0.61320183243991\\-0.2781977510663\\-0.3521819177853\\-3.9073598e-009\\-0.9359315662938", false); | |
386 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "10", false); | |
387 f.AddInstance(tags); | |
388 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "caa62568-fdf894fe-08f830a2-5a468967-681d954b", false); | |
389 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-37.318577811371\\-157.20910163001\\232.94204104611", false); | |
390 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "0.73931693068262\\0.61320183243991\\-0.2781977510663\\-0.3521819177853\\-3.9073598e-009\\-0.9359315662938", false); | |
391 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "18", false); | |
392 f.AddInstance(tags); | |
393 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "e734c170-96b0a397-95e3b43e-d7a5ed74-025843c8", false); | |
394 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-37.318577811371\\-157.20910163001\\232.94204104611", false); | |
395 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "0.73931693068262\\0.61320183243991\\-0.2781977510663\\-0.3521819177853\\-3.9073598e-009\\-0.9359315662938", false); | |
396 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "22", false); | |
397 f.AddInstance(tags); | |
398 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "efc9f411-9f4294e0-66d292a1-b8b6b421-897f1d80", false); | |
399 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-37.318577811371\\-157.20910163001\\232.94204104611", false); | |
400 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "0.73931693068262\\0.61320183243991\\-0.2781977510663\\-0.3521819177853\\-3.9073598e-009\\-0.9359315662938", false); | |
401 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "11", false); | |
402 f.AddInstance(tags); | |
403 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "8346a1db-0b08a22b-9045aaad-57098aac-5b2e9159", false); | |
404 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-37.318577811371\\-157.20910163001\\232.94204104611", false); | |
405 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "0.73931693068262\\0.61320183243991\\-0.2781977510663\\-0.3521819177853\\-3.9073598e-009\\-0.9359315662938", false); | |
406 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "16", false); | |
407 f.AddInstance(tags); | |
408 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "8c7d1e4d-7936f799-c4b8b56b-32d0d9a6-2b492e98", false); | |
409 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-37.318577811371\\-157.20910163001\\232.94204104611", false); | |
410 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "0.73931693068262\\0.61320183243991\\-0.2781977510663\\-0.3521819177853\\-3.9073598e-009\\-0.9359315662938", false); | |
411 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "3", false); | |
412 f.AddInstance(tags); | |
413 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "faec09f9-ca7fe0f0-2b25c370-bb1bfaef-8ccfa560", false); | |
414 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-37.318577811371\\-157.20910163001\\232.94204104611", false); | |
415 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "0.73931693068262\\0.61320183243991\\-0.2781977510663\\-0.3521819177853\\-3.9073598e-009\\-0.9359315662938", false); | |
416 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "4", false); | |
417 f.AddInstance(tags); | |
418 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "99c20bcc-115ae447-84d616f2-cb6c5576-9f67aa7a", false); | |
419 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-37.318577811371\\-157.20910163001\\232.94204104611", false); | |
420 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "0.73931693068262\\0.61320183243991\\-0.2781977510663\\-0.3521819177853\\-3.9073598e-009\\-0.9359315662938", false); | |
421 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "23", false); | |
422 f.AddInstance(tags); | |
423 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "7906b806-47190031-72c5043c-d42704c1-688a3b23", false); | |
424 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-37.318577811371\\-157.20910163001\\232.94204104611", false); | |
425 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "0.73931693068262\\0.61320183243991\\-0.2781977510663\\-0.3521819177853\\-3.9073598e-009\\-0.9359315662938", false); | |
426 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "9", false); | |
427 f.AddInstance(tags); | |
428 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "c9dfc022-7b377063-08bdc5e8-fedcc463-8de22ee6", false); | |
429 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-37.318577811371\\-157.20910163001\\232.94204104611", false); | |
430 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "0.73931693068262\\0.61320183243991\\-0.2781977510663\\-0.3521819177853\\-3.9073598e-009\\-0.9359315662938", false); | |
431 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "6", false); | |
432 f.AddInstance(tags); | |
433 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "6570b6c0-7d2f324d-db7cad50-843f62df-d0446352", false); | |
434 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-37.318577811371\\-157.20910163001\\232.94204104611", false); | |
435 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "0.73931693068262\\0.61320183243991\\-0.2781977510663\\-0.3521819177853\\-3.9073598e-009\\-0.9359315662938", false); | |
436 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "5", false); | |
437 f.AddInstance(tags); | |
438 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "0be36fe7-6c7a762b-281cf109-fff9d8ea-42e16b7a", false); | |
439 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-37.318577811371\\-157.20910163001\\232.94204104611", false); | |
440 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "0.73931693068262\\0.61320183243991\\-0.2781977510663\\-0.3521819177853\\-3.9073598e-009\\-0.9359315662938", false); | |
441 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "7", false); | |
442 f.AddInstance(tags); | |
443 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "ec282396-a8209d00-1c5091f3-f632bf3d-a1bcebba", false); | |
444 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-37.318577811371\\-157.20910163001\\232.94204104611", false); | |
445 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "0.73931693068262\\0.61320183243991\\-0.2781977510663\\-0.3521819177853\\-3.9073598e-009\\-0.9359315662938", false); | |
446 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "8", false); | |
447 f.AddInstance(tags); | |
448 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "fda415d4-f1429b07-5d1cd9f0-675059ff-c0ce9e67", false); | |
449 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-37.318577811371\\-157.20910163001\\232.94204104611", false); | |
450 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "0.73931693068262\\0.61320183243991\\-0.2781977510663\\-0.3521819177853\\-3.9073598e-009\\-0.9359315662938", false); | |
451 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "1", false); | |
452 f.AddInstance(tags); | |
453 tags.SetValue(Orthanc::DICOM_TAG_SOP_INSTANCE_UID, "f555ef96-6b01a90c-bdc2585a-dd17bb3a-75e89920", false); | |
454 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, "-37.318577811371\\-157.20910163001\\232.94204104611", false); | |
455 tags.SetValue(Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, "0.73931693068262\\0.61320183243991\\-0.2781977510663\\-0.3521819177853\\-3.9073598e-009\\-0.9359315662938", false); | |
456 tags.SetValue(Orthanc::DICOM_TAG_INSTANCE_NUMBER, "2", false); | |
457 f.AddInstance(tags); | |
458 f.Sort(); | |
459 ASSERT_EQ(23u, f.GetFramesCount()); | |
460 ASSERT_EQ(f.GetFrameSopInstanceUid(0), "fda415d4-f1429b07-5d1cd9f0-675059ff-c0ce9e67"); | |
461 ASSERT_EQ(f.GetFrameSopInstanceUid(1), "f555ef96-6b01a90c-bdc2585a-dd17bb3a-75e89920"); | |
462 ASSERT_EQ(f.GetFrameSopInstanceUid(2), "8c7d1e4d-7936f799-c4b8b56b-32d0d9a6-2b492e98"); | |
463 ASSERT_EQ(f.GetFrameSopInstanceUid(3), "faec09f9-ca7fe0f0-2b25c370-bb1bfaef-8ccfa560"); | |
464 ASSERT_EQ(f.GetFrameSopInstanceUid(4), "6570b6c0-7d2f324d-db7cad50-843f62df-d0446352"); | |
465 ASSERT_EQ(f.GetFrameSopInstanceUid(5), "c9dfc022-7b377063-08bdc5e8-fedcc463-8de22ee6"); | |
466 ASSERT_EQ(f.GetFrameSopInstanceUid(6), "0be36fe7-6c7a762b-281cf109-fff9d8ea-42e16b7a"); | |
467 ASSERT_EQ(f.GetFrameSopInstanceUid(7), "ec282396-a8209d00-1c5091f3-f632bf3d-a1bcebba"); | |
468 ASSERT_EQ(f.GetFrameSopInstanceUid(8), "7906b806-47190031-72c5043c-d42704c1-688a3b23"); | |
469 ASSERT_EQ(f.GetFrameSopInstanceUid(9), "9e3b97ec-25b86a67-2cbb8f77-94e73268-4509d383"); | |
470 ASSERT_EQ(f.GetFrameSopInstanceUid(10), "efc9f411-9f4294e0-66d292a1-b8b6b421-897f1d80"); | |
471 ASSERT_EQ(f.GetFrameSopInstanceUid(11), "b348f629-11d59f98-fb22710b-4964b90a-f44436ff"); | |
472 ASSERT_EQ(f.GetFrameSopInstanceUid(12), "aac4f2ba-e863f124-6af96709-053258a7-3d39db26"); | |
473 ASSERT_EQ(f.GetFrameSopInstanceUid(13), "a468da62-a8a6e0b9-f66b86b0-b15fa30b-93077161"); | |
474 ASSERT_EQ(f.GetFrameSopInstanceUid(14), "d52d5f21-54f1ad99-4015a995-108f7210-ee157944"); | |
475 ASSERT_EQ(f.GetFrameSopInstanceUid(15), "8346a1db-0b08a22b-9045aaad-57098aac-5b2e9159"); | |
476 ASSERT_EQ(f.GetFrameSopInstanceUid(16), "20b42f52-6d5f784b-cdbc0fbe-4bfc6b0c-5a199c75"); | |
477 ASSERT_EQ(f.GetFrameSopInstanceUid(17), "caa62568-fdf894fe-08f830a2-5a468967-681d954b"); | |
478 ASSERT_EQ(f.GetFrameSopInstanceUid(18), "931d0c36-8fbb4101-70e6d756-edb15431-aaa9a31b"); | |
479 ASSERT_EQ(f.GetFrameSopInstanceUid(19), "8fefe14c-c4c34152-2c3d3514-04e75747-eb7f01f0"); | |
480 ASSERT_EQ(f.GetFrameSopInstanceUid(20), "1cf40ac9-e823e677-cbd5db4b-9e48b451-cccbf950"); | |
481 ASSERT_EQ(f.GetFrameSopInstanceUid(21), "e734c170-96b0a397-95e3b43e-d7a5ed74-025843c8"); | |
482 ASSERT_EQ(f.GetFrameSopInstanceUid(22), "99c20bcc-115ae447-84d616f2-cb6c5576-9f67aa7a"); | |
483 } |