def __init__(self,filename):

        if filename[-7:] == '.abs.gz':
            # Assume the date is a zlib compressed abs file 
            f = gzip.open(filename)
            
        if filename[-4:] == '.abs':
            # Assume uncompressed
            f = open(filename)
        
        #print buffer[:100]
        
        #lines = buffer.split(EOL)
        rows = int(f.next().split()[0])
        cols = int(f.next().split()[0])
        #format = f.next()
        
        self.width = cols
        self.height = rows
        
        self.flags = np.array([int(v) for v in f.next().split()]).reshape(rows,cols).transpose()
        self.x = np.array([float(v) for v in f.next().split()]).reshape(rows,cols).transpose()
        self.y = np.array([float(v) for v in f.next().split()]).reshape(rows,cols).transpose()
        self.z = np.array([float(v) for v in f.next().split()]).reshape(rows,cols).transpose()
Reads a file containing range data.
dataset/ETHPy150Open bolme/pyvision/src/pyvision/types/RangeImage.py/RangeImage.__init__