Mercurial > hg > orthanc-tests
comparison Tests/Tests.py @ 64:369e439cdfd6
test access header
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 26 Nov 2015 18:52:40 +0100 |
parents | 2652d562267a |
children | 09fc27e0899a 821d9eb73c45 |
comparison
equal
deleted
inserted
replaced
63:2652d562267a | 64:369e439cdfd6 |
---|---|
196 self.assertEqual(358, im.size[1]) | 196 self.assertEqual(358, im.size[1]) |
197 | 197 |
198 im = GetImage(_REMOTE, '/instances/%s/frames/0/image-uint16' % i) | 198 im = GetImage(_REMOTE, '/instances/%s/frames/0/image-uint16' % i) |
199 self.assertEqual(512, im.size[0]) | 199 self.assertEqual(512, im.size[0]) |
200 self.assertEqual(358, im.size[1]) | 200 self.assertEqual(358, im.size[1]) |
201 | 201 |
202 # This is Little Endian Explicit | |
203 self.assertEqual('1.2.840.10008.1.2.1', DoGet(_REMOTE, '/instances/%s/header?simplify' % i)['TransferSyntaxUID']) | |
204 | |
202 | 205 |
203 def test_hierarchy(self): | 206 def test_hierarchy(self): |
204 UploadFolder(_REMOTE, 'Brainix/Epi') | 207 UploadFolder(_REMOTE, 'Brainix/Epi') |
205 UploadFolder(_REMOTE, 'Brainix/Flair') | 208 UploadFolder(_REMOTE, 'Brainix/Flair') |
206 UploadFolder(_REMOTE, 'Knee/T1') | 209 UploadFolder(_REMOTE, 'Knee/T1') |
1910 | 1913 |
1911 def test_storescu_jpeg(self): | 1914 def test_storescu_jpeg(self): |
1912 self.assertEqual(0, len(DoGet(_REMOTE, '/exports')['Exports'])) | 1915 self.assertEqual(0, len(DoGet(_REMOTE, '/exports')['Exports'])) |
1913 | 1916 |
1914 knixStudy = 'b9c08539-26f93bde-c81ab0d7-bffaf2cb-a4d0bdd0' | 1917 knixStudy = 'b9c08539-26f93bde-c81ab0d7-bffaf2cb-a4d0bdd0' |
1915 UploadInstance(_REMOTE, 'Knix/Loc/IM-0001-0001.dcm') | 1918 i = UploadInstance(_REMOTE, 'Knix/Loc/IM-0001-0001.dcm')['ID'] |
1919 | |
1920 # This is JPEG lossless | |
1921 self.assertEqual('1.2.840.10008.1.2.4.70', DoGet(_REMOTE, '/instances/%s/header?simplify' % i)['TransferSyntaxUID']) | |
1922 | |
1916 UploadInstance(_REMOTE, 'Knix/Loc/IM-0001-0002.dcm') | 1923 UploadInstance(_REMOTE, 'Knix/Loc/IM-0001-0002.dcm') |
1917 UploadInstance(_REMOTE, 'Knix/Loc/IM-0001-0003.dcm') | 1924 UploadInstance(_REMOTE, 'Knix/Loc/IM-0001-0003.dcm') |
1918 | 1925 |
1919 a = UploadInstance(_REMOTE, 'Brainix/Flair/IM-0001-0001.dcm')['ID'] | 1926 a = UploadInstance(_REMOTE, 'Brainix/Flair/IM-0001-0001.dcm')['ID'] |
1920 b = UploadInstance(_REMOTE, 'ColorTestImageJ.dcm')['ID'] | 1927 b = UploadInstance(_REMOTE, 'ColorTestImageJ.dcm')['ID'] |