X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=gdcmPython%2FtestSuite.py;h=d33cc3cce1f75b3fefd3d888a6e830850315c25c;hb=8fb1011e6fca9654c69d4921642f18146c66ca7f;hp=c6fc0e1baaaf3b683f0c9a55f233dbe99b5579dc;hpb=7a05cf86c9ad068d7d098d60d1537bf4503d0879;p=gdcm.git diff --git a/gdcmPython/testSuite.py b/gdcmPython/testSuite.py index c6fc0e1b..d33cc3cc 100644 --- a/gdcmPython/testSuite.py +++ b/gdcmPython/testSuite.py @@ -1,6 +1,7 @@ import unittest import os from gdcmPython import * +from vtkgdcmPython import * class gdcmTestCase(unittest.TestCase): # The files whose name starts with a modality (e.g. CR-MONO1-10-chest.dcm) @@ -478,7 +479,15 @@ class gdcmTestCase(unittest.TestCase): # and (\f °, ¶ 016) is NOT an OB item TAG which is required to be # present (at least there should be a sequence delimiter), refer to # PS 3.5-2001 page 50. - ["gdcm-JPEG-LossLess3b.dcm", + # + # That's right : + # at 9ec : ItemTag : fffe,e000 + # at 9f0 : Basic Offset Table Item Lentgh (??) 0 x(00000000) + # at 9f4 : ItemTag : fffe,e000 + # at 9f8 : fragment length 212866 x(00033f82) + # at 3497e : ItemTag b00c,0eb6 (should be fffe,e000 or fffe,e0dd): + + ["gdcm-JPEG-LossLessThoravision.dcm", # Interest: - Jpeg compression [Lossless, hierar., first-order # pred. 14, Select. Val. 1] # - encoding is sligthly different from LossLess3a.dcm ??? @@ -534,13 +543,24 @@ class gdcmTestCase(unittest.TestCase): ("Wrong signature for file %s (got %s, shoud be %s)" % (SourceFileName, ComputeSign, Sign)) ) os.unlink(TargetFileName) - + if __name__ == '__main__': if not GDCM_TEST_DATA_PATH: - print "GDCM_TEST_DATA_PATH is not setup properly. This test suite" - print " requires that some Dicom reference files be installed." + print "GDCM_TEST_DATA_PATH (internal variable) is not setup properly." + print " This test suite requires that some Dicom reference files be " + print " installed." print " For further details on installation of gdcmData, please" print " refer to the developper's section of page " print " http://www.creatis.insa-lyon.fr/Public/Gdcm" - unittest.main() + print "" + print "gdcmData directory (used in the test suite) must be placed in" + print "the gdcm directory. The gdcm tree must be :" + print " gdcm" + print " |____Dicts" + print " |____Doc" + print " |____gdcmData (not in gdcm by default)" + print " |____gdcmPython" + print " |____Test" + else: + unittest.main()