# HG changeset patch # User Sebastien Jodogne # Date 1434535463 -7200 # Node ID 302f06f3bba27ce9ae1fae59d2c229fb646193bd # Parent 6d645b3011e147b227740c24484eda76d8578900 test_multi_frame diff -r 6d645b3011e1 -r 302f06f3bba2 Database/Multiframe.dcm Binary file Database/Multiframe.dcm has changed diff -r 6d645b3011e1 -r 302f06f3bba2 Database/README.txt --- a/Database/README.txt Wed Jun 17 11:31:11 2015 +0200 +++ b/Database/README.txt Wed Jun 17 12:04:23 2015 +0200 @@ -2,6 +2,10 @@ Source of the test images ========================= +------ +OsiriX +------ + Many of the images that are used by the integration tests of Orthanc come from the OsiriX samples available at: http://www.osirix-viewer.com/datasets/ @@ -10,10 +14,25 @@ research and teaching! You are not authorized to redistribute or sell them, or use them for commercial purposes. + +---- +GDCM +---- + +Some images were collected by the GDCM project. They can be downloaded +courtesy of Jean-Pierre Roux at the following URL: +http://www.creatis.insa-lyon.fr/~jpr/PUBLIC/gdcm/gdcmSampleData + + +------------- +Other sources +------------- + Other images were publicly posted by external contributors to the Orthanc project, or were generated manually by the Orthanc team. + ------- Content ------- @@ -24,3 +43,4 @@ - DummyCT.dcm : From Osirix, "KNEE" with PixelData removed. - Phenix/* : From OsiriX, "PHENIX". - Knee/* : From OsiriX, "KNEE". +- Multiframe.dcm : From GDCM, "images_of_interest/PHILIPS_Integris_H-8-MONO2-Multiframe.dcm" diff -r 6d645b3011e1 -r 302f06f3bba2 Tests/Tests.py --- a/Tests/Tests.py Wed Jun 17 11:31:11 2015 +0200 +++ b/Tests/Tests.py Wed Jun 17 12:04:23 2015 +0200 @@ -211,3 +211,20 @@ DropOrthanc(_REMOTE) self.assertEqual('0', DoGet(_REMOTE, '/statistics')['TotalDiskSize']) self.assertEqual('0', DoGet(_REMOTE, '/statistics')['TotalUncompressedSize']) + + + def test_multi_frame(self): + i = UploadInstance(_REMOTE, 'Multiframe.dcm')['ID'] + self.assertEqual(76, len(DoGet(_REMOTE, '/instances/%s/frames' % i))) + + im = GetImage(_REMOTE, '/instances/%s/frames/0/preview' % i) + self.assertEqual("L", im.mode) + self.assertEqual(512, im.size[0]) + self.assertEqual(512, im.size[1]) + + DoGet(_REMOTE, '/instances/%s/frames/0/image-uint8' % i) + DoGet(_REMOTE, '/instances/%s/frames/0/image-uint16' % i) + DoGet(_REMOTE, '/instances/%s/frames/75/preview' % i) + self.assertRaises(Exception, lambda: DoGet(_REMOTE, '/instances/%s/frames/aaa/preview' % i)) + self.assertRaises(Exception, lambda: DoGet(_REMOTE, '/instances/%s/frames/76/preview' % i)) +