diff --git a/Python/HandleDMPFiles.py b/Python/HandleDMPFiles.py index 54e8d96..b513092 100644 --- a/Python/HandleDMPFiles.py +++ b/Python/HandleDMPFiles.py @@ -22,11 +22,12 @@ def readDMP(filename): dmpfile = open(filename, 'rb') # The DMP file format is a very simple file format; the header consists of # 3 unsigned 16bit integers specifying the image dimensions, followed by a - # stream of 32-bit floats in little-endian byte order. - # Load Header. It's first two values are the image size. + # stream of 32-bit floats in little-endian byte order. It's first two + # values are the image size. + # Load Header. header = numpy.fromfile(dmpfile, numpy.int16, 3) imageSize = (header[1], header[0]) - # Load file and reshape to the size from the header + # Load the whole file and reshape to the size given in the header image = numpy.fromfile(dmpfile, numpy.float32) image = image.reshape(imageSize) dmpfile.close()