Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.LIF file doesn't load #596

Closed
arjunrajlab opened this issue Nov 8, 2023 · 6 comments
Closed

.LIF file doesn't load #596

arjunrajlab opened this issue Nov 8, 2023 · 6 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@arjunrajlab
Copy link
Collaborator

This LIF file doesn't seem to parse properly:

https://www.dropbox.com/scl/fi/hfqxqw7qbmyqe5ve81nt4/1031_P_12.lif?rlkey=9jglpahomo6ds8es59hj4j3n8&dl=0

This file has two separate image objects in it, one is an RGB image, and one is 3 color Z stack. Nimbus seems to only recognize the channels. Is it only picking the first object in the LIF file? Or does it pick the largest one?

@arjunrajlab arjunrajlab added the bug Something isn't working label Nov 8, 2023
@arjunrajlab arjunrajlab added this to the Alpha-Version milestone Nov 8, 2023
@manthey
Copy link
Collaborator

manthey commented Nov 9, 2023

See girder/large_image#1365

@arjunrajlab
Copy link
Collaborator Author

OK, that worked if I don't transcode to TIFF, but if I do transcode, the following error appears:

Processing frame 49/126
Processing frame 50/126
Processing frame 51/126
Processing frame 52/126
Processing frame 53/126
Processing frame 54/126
Processing frame 55/126
Processing frame 56/126
Processing frame 57/126
Processing frame 58/126
Processing frame 59/126
Processing frame 60/126
Processing frame 61/126
Processing frame 62/126
Processing frame 63/126
Processing frame 64/126
Processing frame 65/126
Processing frame 66/126
Processing frame 67/126
Failed in large image conversion
Traceback (most recent call last):
  File "/venv/lib/python3.11/site-packages/large_image_source_bioformats/__init__.py", line 607, in getTile
    tile = self._bioimage.read(
           ^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/bioformats/formatreader.py", line 840, in read
    index = self.rdr.getIndex(z,c,t)
            ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/javabridge/jutil.py", line 965, in method
    result = call(self.o, name, sig, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/javabridge/jutil.py", line 896, in call
    result = fn(*nice_args)
             ^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/javabridge/jutil.py", line 863, in fn
    raise JavaException(x)
javabridge.jutil.JavaException: Invalid Z index: 1/1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/venv/lib/python3.11/site-packages/large_image_tasks/tasks.py", line 136, in convert_image_job
    dest = create_tiff(
           ^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/celery/local.py", line 182, in __call__
    return self._get_current_object()(*a, **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/girder_worker/task.py", line 153, in __call__
    results = super().__call__(*_t_args, **_t_kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/celery/app/task.py", line 411, in __call__
    return self.run(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/large_image_tasks/tasks.py", line 67, in create_tiff
    large_image_converter.convert(
  File "/venv/lib/python3.11/site-packages/large_image_converter/__init__.py", line 927, in convert
    _convert_large_image(inputPath, outputPath, tempPath, lidata, **kwargs)
  File "/venv/lib/python3.11/site-packages/large_image_converter/__init__.py", line 563, in _convert_large_image
    _drain_pool(pool, tasks)
  File "/venv/lib/python3.11/site-packages/large_image_converter/__init__.py", line 390, in _drain_pool
    tasks[0][-1].result(0.1)
  File "/.pyenv/versions/3.11.6/lib/python3.11/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/.pyenv/versions/3.11.6/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/.pyenv/versions/3.11.6/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/large_image_converter/__init__.py", line 527, in _convert_large_image_frame
    _drain_pool(pool, tasks)
  File "/venv/lib/python3.11/site-packages/large_image_converter/__init__.py", line 390, in _drain_pool
    tasks[0][-1].result(0.1)
  File "/.pyenv/versions/3.11.6/lib/python3.11/concurrent/futures/_base.py", line 456, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/.pyenv/versions/3.11.6/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/.pyenv/versions/3.11.6/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/large_image_converter/__init__.py", line 479, in _convert_large_image_tile
    data = tile['tile']
           ~~~~^^^^^^^^
  File "/src/large_image/large_image/tilesource/tiledict.py", line 174, in __getitem__
    tileData = self._retileTile()
               ^^^^^^^^^^^^^^^^^^
  File "/src/large_image/large_image/tilesource/tiledict.py", line 127, in _retileTile
    tileData = self.source.getTile(
               ^^^^^^^^^^^^^^^^^^^^
  File "/src/large_image/large_image/cache_util/cache.py", line 98, in wrapper
    v = func(self, *args, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/large_image_source_multi/__init__.py", line 1060, in getTile
    tile = self._addSourceToTile(tile, sourceEntry, corners, scale)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/large_image_source_multi/__init__.py", line 1005, in _addSourceToTile
    sourceTile, _ = ts.getRegion(
                    ^^^^^^^^^^^^^
  File "/src/large_image/large_image/tilesource/base.py", line 2128, in getRegion
    subimage, _ = _imageToNumpy(tile['tile'])
                                ~~~~^^^^^^^^
  File "/src/large_image/large_image/tilesource/tiledict.py", line 166, in __getitem__
    tileData = self.source.getTile(
               ^^^^^^^^^^^^^^^^^^^^
  File "/src/large_image/large_image/cache_util/cache.py", line 98, in wrapper
    v = func(self, *args, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/large_image_source_bioformats/__init__.py", line 621, in getTile
    raise TileSourceError('Failed to get Bioformat region (%s, %r).' % (es, (
large_image.exceptions.TileSourceError: Failed to get Bioformat region (java.lang.IllegalArgumentException: Invalid Z index: 1/1, (0, 1, 0, {'series': [0], 'sizeX': 1600, 'sizeY': 1600}, 1600, 1600, 0, 0, 1600, 1600)).
Failed in large image conversion (Failed to get Bioformat region (java.lang.IllegalArgumentException: Invalid Z index: 1/1, (0, 1, 0, {'series': [0], 'sizeX': 1600, 'sizeY': 1600}, 1600, 1600, 0, 0, 1600, 1600)).)
Processing frame 68/126
Processing frame 69/126

@manthey
Copy link
Collaborator

manthey commented Nov 9, 2023

See girder/large_image#1367, and try again.

@arjunrajlab
Copy link
Collaborator Author

arjunrajlab commented Nov 9, 2023

Okay, that worked… but… now I am getting again the very slow performance if I transcode to optimized TIFF. If I just leave the file alone, the performance is fine. I suspect the same front end issue may be at play @bruyeret.

@arjunrajlab
Copy link
Collaborator Author

arjunrajlab commented Nov 10, 2023

@arjunrajlab
Copy link
Collaborator Author

LIF files now load, as long as they are not transcoded. Transcoding memory usage issue now put here:

#595

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants