[go: nahoru, domu]

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

Crash in nd2reader while reading 8-bit RGB image #2

Closed
SilverViking opened this issue Oct 13, 2021 · 2 comments
Closed

Crash in nd2reader while reading 8-bit RGB image #2

SilverViking opened this issue Oct 13, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@SilverViking
Copy link
Collaborator

python nis2pyr.py "g:\NISMakePyramidal\Testfiles\SlideExpressJaneDoe\Slide2-17-1_ChannelBrightfield_Seq0079.nd2" e:\temp\

gives

E:\Anaconda3\envs\nis\lib\site-packages\pims\base_frames.py:472: UserWarning: Please call FramesSequenceND.__init__() at the start of thethe reader initialization.
  warn("Please call FramesSequenceND.__init__() at the start of the"
ND2 file: #frames=1, #components=3, #planes=1, bits per component=8, is RGB=True, pixel size=0.48 um, frames.sizes={'x': 79200, 'y': 26829, 'c': 3}
Reading image
Traceback (most recent call last):
  File "nis2pyr.py", line 100, in <module>
    image, metadata = read_nd2(args.nd2_filename)
  File "E:\xx\xx\xx\xx\reader.py", line 34, in read_nd2
    image = frames[0]
  File "E:\Anaconda3\envs\nis\lib\site-packages\slicerator\__init__.py", line 188, in __getitem__
    return self._get(indices)
  File "E:\Anaconda3\envs\nis\lib\site-packages\pims\base_frames.py", line 98, in __getitem__
    return self.get_frame(key)
  File "E:\Anaconda3\envs\nis\lib\site-packages\pims\base_frames.py", line 592, in get_frame
    result = self._get_frame_wrapped(**coords)
  File "E:\Anaconda3\envs\nis\lib\site-packages\pims\base_frames.py", line 252, in get_frame_T
    return get_frame(**ind).transpose(transposition)
  File "E:\Anaconda3\envs\nis\lib\site-packages\pims\base_frames.py", line 265, in get_frame_bundled
    frame = get_frame(**ind)
  File "E:\Anaconda3\envs\nis\lib\site-packages\pims\base_frames.py", line 303, in get_frame_dropped
    result = get_frame(**ind)
  File "E:\Anaconda3\envs\nis\lib\site-packages\pims_nd2\nd2reader.py", line 194, in get_frame_2D
    h.Lim_FileGetImageData(self._handle, i, self._buf_p, self._buf_md)
OSError: exception: access violation writing 0x00000271BF0DB000
@SilverViking SilverViking added the bug Something isn't working label Oct 13, 2021
@SilverViking
Copy link
Collaborator Author

Note that .nd2 RGB images in general can be converted just fine, the crash happens for this specific image. Wild guess: is it an out-of-memory issue, the image is quite large.

@SilverViking
Copy link
Collaborator Author

Solved (in nis2pyr >= v0.4.0) by switching from pims_nd2 to the more robust nd2 library for reading ND2 files.

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

1 participant