Skip to content

DeStripe error with ome-zarr #8

@romainGuiet

Description

@romainGuiet

Dear @jxchen01 , @yuliu96 ,

I converted my tiff to ome.zarr/ome-ngff using the NGFFconverter and used napari-ome-zarr plugin, .
I can open the zarr file in napari and navigate it but when I start DeStripe I get the error below

Best regards,

Romain

Start DeStripe...

---------------------------------------------------------------------------                                                                 
UnsupportedFileFormatError                Traceback (most recent call last)                                                                 
File /opt/conda/envs/leonardo/lib/python3.9/site-packages/lsfm_destripe_napari/_widget.py:451, in DestripeWidget.                           process(self=<lsfm_destripe_napari._widget.DestripeWidget object>)                                                                          
    437     return                                                                                                                          
    438 model = DeStripe(                                                                                                                   
    439     resample_ratio=params["resample_ratio"],                                                                                        
    440     guided_upsample_kernel=params["guided_upsample_kernel"],                                                                        
   (...)                                                                                                                                    
    449     backend=params["backend"],                                                                                                      
    450 )                                                                                                                                   
--> 451 output_image = model.train(                                                                                                         
        model = <lsfm_destripe.core.DeStripe object at 0x79b6a070eb80>                                                                       
        params = {'mask': None, 'input_image': <MultiScaleData at 0x79b8e9116700. 5 levels, '>u2', shapes: ((5, 2                           40, 2304, 2304), (5, 240, 1152, 1152), (5, 240, 576, 576), (5, 240, 288, 288), (5, 240, 144, 144))>, 'resample_ra                           tio': 3, 'guided_upsample_kernel': 49, 'hessian_kernel_sigma': 1.0, 'lambda_masking_mse': 1.0, 'lambda_tv': 1.0,                            'lambda_hessian': 1.0, 'inc': 16, 'n_epochs': 300, 'wedge_degree': 29, 'n_neighbors': 16, 'backend': 'jax', 'is_v                           ertical': True, 'angle_offset': [0.0], 'non_positive': False}                                                                               
        params["is_vertical"] = True                                                                                                        
        params["input_image"] = <MultiScaleData at 0x79b8e9116700. 5 levels, '>u2', shapes: ((5, 240, 2304, 2304)                           , (5, 240, 1152, 1152), (5, 240, 576, 576), (5, 240, 288, 288), (5, 240, 144, 144))>                                                        
        params["mask"] = None                                                                                                               
        params["angle_offset"] = [0.0]                                                                                                      
        params["non_positive"] = False                                                                                                      
    452     is_vertical=params["is_vertical"],                                                                                              
    453     x=params["input_image"],                                                                                                        
    454     mask=params["mask"],                                                                                                            
    455     angle_offset=params["angle_offset"],                                                                                            
    456     display=False,
    457     non_positive=params["non_positive"],
    458     display_angle_orientation=False,
    459 )
    460 self.viewer.add_image(
    461     output_image,
    462     name="destriped image",
    463 )

File /opt/conda/envs/leonardo/lib/python3.9/site-packages/lsfm_destripe/core.py:433, in DeStripe.train(self=<lsfm_destripe.core.DeStripe object>, is_vertical=True, x=<MultiScaleData at 0x79b8e9116700. 5 levels, '>u...6, 576), (5, 240, 288, 288), (5, 240, 144, 144))>, mask=None, fusion_mask=None, display=False, display_angle_orientation=False, non_positive=False, **kwargs={'angle_offset': [0.0]})
    431     print("Start DeStripe...\n")
    432     flag_compose = False
--> 433     X_handle = AICSImage(x)
        x = <MultiScaleData at 0x79b8e9116700. 5 levels, '>u2', shapes: ((5, 240, 2304, 2304), (5, 240, 1152, 1152), (5, 240, 576, 576), (5, 240, 288, 288), (5, 240, 144, 144))>
        AICSImage = <class 'aicsimageio.aics_image.AICSImage'>
    434     X = X_handle.get_image_dask_data("ZYX", T=0, C=0)[:, None, ...]
    435 else:

File /opt/conda/envs/leonardo/lib/python3.9/site-packages/aicsimageio/aics_image.py:277, in AICSImage.__init__(self=<class 'aicsimageio.aics_image.AICSImage'> instance, image=<MultiScaleData at 0x79b8e9116700. 5 levels, '>u...6, 576), (5, 240, 288, 288), (5, 240, 144, 144))>, reader=None, reconstruct_mosaic=True, fs_kwargs={}, **kwargs={})
    267 def __init__(
    268     self,
    269     image: types.ImageLike,
   (...)
    273     **kwargs: Any,
    274 ):
    275     if reader is None:
    276         # Determine reader class and create dask delayed array
--> 277         ReaderClass = self.determine_reader(image, fs_kwargs=fs_kwargs, **kwargs)
        Exception trying to inspect frame. No more locals available.
    278     else:
    279         # Init reader
    280         ReaderClass = reader

File /opt/conda/envs/leonardo/lib/python3.9/site-packages/aicsimageio/aics_image.py:257, in AICSImage.determine_reader(image=<MultiScaleData at 0x79b8e9116700. 5 levels, '>u...6, 576), (5, 240, 288, 288), (5, 240, 144, 144))>, fs_kwargs={}, **kwargs={})
    255 # If we haven't hit anything yet, we likely don't support this file / object
    256 image_type = str(type(image))
--> 257 raise exceptions.UnsupportedFileFormatError(
        exceptions = <module 'aicsimageio.exceptions' from '/opt/conda/envs/leonardo/lib/python3.9/site-packages/aicsimageio/exceptions.py'>
        image_type = "<class 'napari.layers._multiscale_data.MultiScaleData'>"
    258     "AICSImage",
    259     image_type,
    260     msg_extra=(
    261         "You may need to install an extra format dependency. "
    262         "See all known format extensions and their extra install "
    263         "name with `aicsimageio.formats.FORMAT_IMPLEMENTATIONS`."
    264     ),
    265 )

UnsupportedFileFormatError: AICSImage does not support the image: '<class 'napari.layers._multiscale_data.MultiScaleData'>'. You may need to install an extra format dependency. See all known format extensions and their extra install name with `aicsimageio.formats.FORMAT_IMPLEMENTATIONS`.

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