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

Error in importing multipage tiffs on Mac M1 chip or Big Sur #77

Open
kaparna126 opened this issue Aug 31, 2021 · 2 comments
Open

Error in importing multipage tiffs on Mac M1 chip or Big Sur #77

kaparna126 opened this issue Aug 31, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@kaparna126
Copy link
Contributor

When import files is hit, "import completed, loading image" appears but nothing else happens.

2021-08-30 19:14:34,499 - root - INFO - Initiating ROI Editor
2021-08-30 19:14:34,499 - root - INFO - margin: None, savefig: png
2021-08-30 19:14:34,500 - root - INFO - zoom_levels: [1. 1.] max_zoom: 1.0
2021-08-30 19:14:34,516 - root - INFO - 2D border: [0. 0. 0.]
2021-08-30 19:14:34,516 - root - INFO - z_overview: 0
2021-08-30 19:14:34,526 - root - INFO - plane xy downsampling factors by image: [1, 1, 1]
2021-08-30 19:14:34,544 - traits - ERROR - Exception occurred in traits notification handler for object: <magmap.gui.visualizer.Visualization object at 0x158a95780>, trait: _filename, old value: , new value: /Users/aparnakumar/Desktop/sample_region/myvolume
Traceback (most recent call last):
  File "traits/trait_notifiers.py", line 524, in _dispatch_change_event
  File "traits/trait_notifiers.py", line 486, in dispatch
  File "magmap/gui/visualizer.py", line 1671, in _image_path_updated
  File "magmap/gui/visualizer.py", line 1818, in redraw_selected_viewer
  File "magmap/gui/visualizer.py", line 2255, in _launch_roi_editor
  File "magmap/gui/roi_editor.py", line 814, in plot_2d_stack
  File "magmap/gui/roi_editor.py", line 459, in _show_overview
  File "magmap/gui/roi_editor.py", line 398, in update_coords
  File "magmap/gui/plot_editor.py", line 245, in update_coord
  File "magmap/gui/plot_editor.py", line 429, in show_overview
  File "magmap/plot/plot_support.py", line 363, in overlay_images
  File "magmap/plot/plot_support.py", line 221, in imshow_multichannel
  File "matplotlib/__init__.py", line 1447, in inner
  File "matplotlib/axes/_axes.py", line 5523, in imshow
  File "matplotlib/image.py", line 712, in set_data
TypeError: Invalid shape (52, 200, 200) for image data
2021-08-30 19:14:34,545 - root - CRITICAL - Unhandled exception. Additional log saved to: /var/folders/wc/47wwrtpd1y97_vgmgfkn_knh0000gn/T/magellanmapper_error_pub4i6g3.log
Traceback (most recent call last):
  File "magmap/gui/visualizer.py", line 3037, in <lambda>
  File "magmap/gui/visualizer.py", line 1623, in update_filename
  File "traits/trait_notifiers.py", line 478, in __call__
  File "traits/trait_notifiers.py", line 553, in _notify_method_listener
  File "traits/trait_notifiers.py", line 532, in _dispatch_change_event
  File "traits/trait_notifiers.py", line 149, in _handle_exception
  File "traits/trait_notifiers.py", line 524, in _dispatch_change_event
  File "traits/trait_notifiers.py", line 486, in dispatch
  File "magmap/gui/visualizer.py", line 1671, in _image_path_updated
  File "magmap/gui/visualizer.py", line 1818, in redraw_selected_viewer
  File "magmap/gui/visualizer.py", line 2255, in _launch_roi_editor
  File "magmap/gui/roi_editor.py", line 814, in plot_2d_stack
  File "magmap/gui/roi_editor.py", line 459, in _show_overview
  File "magmap/gui/roi_editor.py", line 398, in update_coords
  File "magmap/gui/plot_editor.py", line 245, in update_coord
  File "magmap/gui/plot_editor.py", line 429, in show_overview
  File "magmap/plot/plot_support.py", line 363, in overlay_images
  File "magmap/plot/plot_support.py", line 221, in imshow_multichannel
  File "matplotlib/__init__.py", line 1447, in inner
  File "matplotlib/axes/_axes.py", line 5523, in imshow
  File "matplotlib/image.py", line 712, in set_data
TypeError: Invalid shape (52, 200, 200) for image data
@yoda-vid
Copy link
Collaborator

Thanks for reporting, @kaparna126 ! Looks like it may be interpreting the shape of the sample multi-page TIFs incorrectly for some reason. On my tests, the import works fine on Mac 10.15, MagellanMapper v1.4.0, so this could potentially be something platform specific. Will need to look into this, thanks for sharing!

@yoda-vid yoda-vid added the bug Something isn't working label Aug 31, 2021
@yoda-vid
Copy link
Collaborator

yoda-vid commented Nov 2, 2021

Tested importing/viewing multipage TIFs in Big Sur (11.6.1) and Monterey (12.0.1) on an Intel-based Mac, which works ok for me. Will need to try this on an M1-based Mac to see if the issue may be specific to the new chip.

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