Mercurial > hg > orthanc-tests
changeset 296:b55b959647ed c-get
merge default -> c-get
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Tue, 12 May 2020 14:36:29 +0200 |
parents | 946b2199f481 (diff) 192665e6113f (current diff) |
children | da2be3ff2db5 |
files | Tests/Tests.py |
diffstat | 1 files changed, 40 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/Tests/Tests.py Tue May 12 12:43:25 2020 +0200 +++ b/Tests/Tests.py Tue May 12 14:36:29 2020 +0200 @@ -27,6 +27,7 @@ import pprint import tempfile import unittest +import shutil from PIL import ImageChops from Toolbox import * @@ -5632,3 +5633,42 @@ self.assertEqual('1.2.840.10008.1.2.4.57', GetTransferSyntax(z.read('IMAGES/IM0'))) + + def test_getscu(self): + + # no transcoding required + UploadInstance(_REMOTE, 'DummyCT.dcm') + + if os.path.isdir('/tmp/GETSCU'): + shutil.rmtree('/tmp/GETSCU') + os.makedirs('/tmp/GETSCU') + + subprocess.check_call([ FindExecutable('getscu'), + _REMOTE['Server'], + str(_REMOTE['DicomPort']), + '-aec', 'ORTHANC', + '-aet', 'ORTHANCTEST', # pretend to be the other orthanc + '-k', '0020,000d=1.2.840.113619.2.176.2025.1499492.7391.1171285944.390', + '-k', '0008,0052=STUDY', + '--output-directory', '/tmp/GETSCU/' + ]) + + self.assertTrue(os.path.isfile('/tmp/GETSCU/MR.1.2.840.113619.2.176.2025.1499492.7040.1171286242.109')) + + # transcoding required + # UploadInstance(_REMOTE, 'Formats/JpegLossless.dcm') + + # subprocess.check_call([ FindExecutable('getscu'), + # _REMOTE['Server'], + # str(_REMOTE['DicomPort']), + # '-aec', 'ORTHANC', + # '-aet', 'ORTHANCTEST', # pretend to be the other orthanc + # '-k', '0020,000d=1.2.276.0.7230010.3.1.2.2831176407.19977.1434973482.75580', + # '-k', '0008,0052=STUDY', + # '--output-directory', '/tmp/GETSCU/' + # ]) + + # self.assertTrue(os.path.isfile('/tmp/GETSCU/MR.1.2.276.0.7230010.3.1.4.2831176407.19977.1434973482.75579')) + + +