How to use the tifffile.lazyattr function in tifffile

To help you get started, we’ve selected a few tifffile examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github flika-org / flika / tifffile.py View on Github external
    @lazyattr
    def is_lsm(self):
        return self.pages[0].is_lsm
github flika-org / flika / tifffile.py View on Github external
    @lazyattr
    def is_tiled(self):
        """True if page contains tiled image."""
        return 'tile_width' in self.tags
github AllenCellModeling / aicsimageio / aicsimageio / vendor / czifile.py View on Github external
    @lazyattr
    def attachment_directory(self):
        """Return list of all AttachmentEntryA1 in file.

        Use AttachmentDirectorySegment if exists, else find AttachmentSegments.

        """
        if self.header.attachment_directory_position:
            segment = Segment(self._fh,
                              self.header.attachment_directory_position)
            if segment.sid == AttachmentDirectorySegment.SID:
                return segment.data().entries
        warnings.warn("AttachmentDirectory segment not found")
        return list(segment.attachment_entry for segment in
                    self.segments(AttachmentSegment.SID))
github AllenCellModeling / aicsimageio / aicsimageio / vendor / czifile.py View on Github external
    @lazyattr
    def pixel_type(self):
        return PIXEL_TYPE[self.dtype]
github flika-org / flika / tifffile.py View on Github external
    @lazyattr
    def is_palette(self):
        return all(p.is_palette for p in self.pages)
github flika-org / flika / tifffile.py View on Github external
    @lazyattr
    def is_fluoview(self):
        """True if page contains FluoView MM_STAMP tag."""
        return 'mm_stamp' in self.tags
github AllenCellModeling / aicsimageio / aicsimageio / vendor / czifile.py View on Github external
    @lazyattr
    def dtype(self):
        """Return numpy dtype of image data in file."""
        # subblock data can be of different pixel type
        dtype = numpy.dtype(self.filtered_subblock_directory[0].dtype[-2:])
        for directory_entry in self.filtered_subblock_directory:
            dtype = numpy.promote_types(dtype, directory_entry.dtype[-2:])
        return dtype
github flika-org / flika / tifffile.py View on Github external
    @lazyattr
    def is_ome(self):
        return self.pages[0].is_ome
github flika-org / flika / tifffile.py View on Github external
    @lazyattr
    def is_nih(self):
        return self.pages[0].is_nih
github sebi06 / BioFormatsRead / czifile.py View on Github external
    @lazyattr
    def attachment_directory(self):
        """Return list of all AttachmentEntryA1 in file.

        Use AttachmentDirectorySegment if exists, else find AttachmentSegments.

        """
        if self.header.attachment_directory_position:
            segment = Segment(self._fh,
                              self.header.attachment_directory_position)
            if segment.sid == AttachmentDirectorySegment.SID:
                return segment.data().entries
        warnings.warn("AttachmentDirectory segment not found")
        return list(segment.attachment_entry for segment in
                    self.segments(AttachmentSegment.SID))