]> Creatis software - gdcm.git/blobdiff - gdcmPython/testSuite.py
include files for 8 bits Jpeg Lossy (from IJG 6b)
[gdcm.git] / gdcmPython / testSuite.py
index 695e671fc54f8b346a80fae4e4f3d5a4cb62df8f..8a19d58b6c6bf34c292abf92fcd416413da1abd8 100644 (file)
@@ -187,10 +187,14 @@ class gdcmTestCase(unittest.TestCase):
            ["Manufacturer", "Acme Products"],
          # FIXME: 92160 / (120*256) = 3 bytes per pixel NOT 1. Maybe
          # it has something to do with [Samples Per Pixel] = [3] ???
+         # You said it, puffy (tu l'as dit, bouffi, in french language)
+         # RGB is 3 bytes per pixel
+         # + Planar configuration (0028,0006) = 0 --> Pixels RGB       
            ["Pixel Data", "gdcm::NotLoaded. Address:904 Length:92160"] ] ],
       ["US-RGB-8-epicard.dcm",
          # Interest: Big endian transfert syntax
          [ ["Transfer Syntax UID", "1.2.840.10008.1.2.2"],  # Big endian
+         # But ... group 0000 is LE .
            ["Modality", "US"],
            ["Photometric Interpretation", "RGB"],
            ["Rows", "480"],
@@ -201,8 +205,7 @@ class gdcmTestCase(unittest.TestCase):
            ["Pixel Representation", "0"],
            ["Manufacturer", "G.E. Medical Systems"],
            ["Manufacturer Model Name", "LOGIQ 700"],
-         # FIXME: 921600/(480*640) = 3 bytes per pixel NOT 1. Maybe
-         # it has something to do with [Samples Per Pixel] = [3] ???
+         # + Planar configuration (0028,0006) = 1 --> Plane R, Plane G, Plane B  
            ["Implementation Version Name", "OFFIS-DCMTK-311"],
            ["Pixel Data", "gdcm::NotLoaded. Address:1012 Length:921600"] ] ],
    ]
@@ -525,14 +528,19 @@ class gdcmTestCase(unittest.TestCase):
       Source.GetImageData()
       TargetFileName = "junk"
       Target = Source.WriteDcmImplVR(TargetFileName)
-      Sign = '5af8739c15dd579dea223eb3930cacda'
+      Sign = 'c3d27238647b7eaa773bff6ea0692b54'
       ComputeSign = md5.new(open(TargetFileName).read()).hexdigest()
-      #print ComputeSign
       self.assertEqual(ComputeSign, Sign,
           ("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 "   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()