def get_info (self):
        """ Return basic information about the file.
        """
        l = []
        subfile_types = self.get_subfile_types()
        l.append ('Number of subfile types: %s' % (len (subfile_types)))
        for subfile_type in subfile_types:
            ifd = self.get_first_ifd(subfile_type=subfile_type)
            l.append ('-'*50)
            l.append('Subfile type: %s' % (subfile_type))
            l.append('Number of images: %s' % (self.get_depth(subfile_type = subfile_type)))
            for tag in ['ImageLength', 
                        'ImageWidth', 
                        'SamplesPerPixel','ExtraSamples',
                        'SampleFormat',
                        'Compression','Predictor',
                        'PhotometricInterpretation',
                        'Orientation',
                        'PlanarConfiguration',
                        'MinSampleValue', 'MaxSampleValue',
                        'XResolution', 'YResolution','ResolutionUnit',
                        'XPosition','YPosition',
                        'DocumentName',
                        'Software',
                        'HostComputer',
                        'Artist',
                        'DateTime',
                        'Make','Model','Copyright',
                        'ImageDescription',
                        ]:
                v = ifd.get_value(tag, human=True)
                if v is None:
                    continue
                if tag=='ImageDescription' and subfile_type==0:
                    if v.startswith ('<?xml') or v[:4].lower()=='<ome':
                        try:
                            import lxml.etree
                            tree = lxml.etree.fromstring(v)
                            v = lxml.etree.tostring (tree, pretty_print=True)
                        except Exception, msg:
                            print '%s.get_info: failed to parse xml in ImageDescription: %s' % (self.__class__.__name__, msg)
                        l.append ('%s:\n"""%s"""' % (tag, v))
                    else:
                        l.append ('%s:\n"""%s"""' % (tag, v))
                else:
                    l.append ('%s: %s' % (tag, v))
            if self.is_lsm and subfile_types==0:
                l.append ('LSM info:\n"""%s"""' % (self.lsminfo))

        return '\n'.join(l)
dataset/ETHPy150Open pearu/pylibtiff/libtiff/tiff_file.py/TIFFfile.get_info/original