changeset 68:a8d1a347a701

SlicesShort
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 07 Dec 2015 10:00:05 +0100
parents e711ba6af7ea
children 83fd88230097
files Tests/Tests.py
diffstat 1 files changed, 25 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Tests/Tests.py	Wed Dec 02 11:42:06 2015 +0100
+++ b/Tests/Tests.py	Mon Dec 07 10:00:05 2015 +0100
@@ -2466,6 +2466,11 @@
         for j in range(76):
             self.assertEqual('/instances/9e05eb0a-18b6268c-e0d36085-8ddab517-3b5aec02/frames/%d' % j, o['Slices'][j])
 
+        self.assertEqual(1, len(o['SlicesShort']))
+        self.assertEqual('9e05eb0a-18b6268c-e0d36085-8ddab517-3b5aec02', o['SlicesShort'][0][0])
+        self.assertEqual(0, o['SlicesShort'][0][1])
+        self.assertEqual(76, o['SlicesShort'][0][2])
+
         i = UploadInstance(_REMOTE, 'Brainix/Epi/IM-0001-0001.dcm')['ID']
         j = UploadInstance(_REMOTE, 'Brainix/Epi/IM-0001-0002.dcm')['ID']
         k = UploadInstance(_REMOTE, 'Brainix/Epi/IM-0001-0003.dcm')['ID']
@@ -2482,6 +2487,17 @@
         self.assertEqual('/instances/%s/frames/0' % j, o['Slices'][1])
         self.assertEqual('/instances/%s/frames/0' % k, o['Slices'][0])
 
+        self.assertEqual(3, len(o['SlicesShort']))
+        self.assertEqual(k, o['SlicesShort'][0][0])
+        self.assertEqual(0, o['SlicesShort'][0][1])
+        self.assertEqual(1, o['SlicesShort'][0][2])
+        self.assertEqual(j, o['SlicesShort'][1][0])
+        self.assertEqual(0, o['SlicesShort'][1][1])
+        self.assertEqual(1, o['SlicesShort'][1][2])
+        self.assertEqual(i, o['SlicesShort'][2][0])
+        self.assertEqual(0, o['SlicesShort'][2][1])
+        self.assertEqual(1, o['SlicesShort'][2][2])
+
         i = UploadInstance(_REMOTE, 'Beaufix/IM-0001-0001.dcm')['ID']
         j = UploadInstance(_REMOTE, 'Beaufix/IM-0001-0002.dcm')['ID']
         s = DoGet(_REMOTE, '/instances/%s' % i)['ParentSeries']
@@ -2495,6 +2511,15 @@
         self.assertEqual('/instances/%s/frames/0' % i, o['Slices'][0])
         self.assertEqual('/instances/%s/frames/0' % j, o['Slices'][1])
 
+        self.assertEqual(2, len(o['SlicesShort']))
+        self.assertEqual(i, o['SlicesShort'][0][0])
+        self.assertEqual(0, o['SlicesShort'][0][1])
+        self.assertEqual(1, o['SlicesShort'][0][2])
+        self.assertEqual(j, o['SlicesShort'][1][0])
+        self.assertEqual(0, o['SlicesShort'][1][1])
+        self.assertEqual(1, o['SlicesShort'][1][2])
+
+
 
     def test_incoming_movescu_accession(self):
         UploadInstance(_REMOTE, 'Knee/T1/IM-0001-0001.dcm')