Skip to content

Why can't I read my czi file? PixelType( Bgra32 ): numberOfSamples: Pixel Type unsupported by libCZI #123

@zerosky010

Description

@zerosky010

System and Software

  • aicspylibczi Version: 3.2.0
  • Python Version:3.10
  • Operating System: Windows

Description

A clear description of the bug
I'm just starting to learn about czi file handling.
However, when I am running a demo script ,


        filepath='sample.czi'
        import numpy as np
        from aicspylibczi import CziFile
        from pathlib import Path
        import matplotlib.pyplot as plt
        pth = Path('sample.czi')
        czi = CziFile(pth)

It turns out:

Traceback (most recent call last)
        Cell In[13], line 8
                  5 import matplotlib.pyplot as plt
                  7 pth = Path('sample.czi')
         ----> 8 czi = CziFile(pth)
                  10 # Get the shape of the data, the coordinate pairs are (start index, size)
                  11 dimensions = czi.get_dims_shape()  # [{'X': (0, 1900), 'Y': (0, 1300), 'Z': (0, 60), 'C': (0, 4), 'S': (0, 40), 'B': (0, 1)}]
        
        File e:\\anaconda3\\envs\apari-env\\lib\\site-packages\\aicspylibczi\\CziFile.py:63, in CziFile.__init__(self, czi_filename, verbose)
                  60 import _aicspylibczi
                  62 self.czilib = _aicspylibczi
          ---> 63 self.reader = self.czilib.Reader(self._bytes)
                  65 self.meta_root = None
        
        PylibCZI_PixelTypeException: PixelType( Bgra32 ): numberOfSamples: Pixel Type unsupported by libCZI."

How can I fix this problem? Or how to convert the format?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions