Mercurial > hg > orthanc-tests
changeset 7:302f06f3bba2
test_multi_frame
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 17 Jun 2015 12:04:23 +0200 |
parents | 6d645b3011e1 |
children | f8d781d1d267 |
files | Database/Multiframe.dcm Database/README.txt Tests/Tests.py |
diffstat | 3 files changed, 37 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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"
--- 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)) +