Page MenuHomePhabricator

Loading 2d images in python wrapping without OpenCV activated leads to import error
Closed, WontfixPublic

Description

Try to import a 2d image in python plugin without opencv activated. Leads to following error:
Traceback (most recent call last):

File "<string>", line 1, in <module>

ImportError: No module named cv2
and the "usual" popup which let's you decide between simpleitk and opencv import doesn't appear.

Event Timeline

heime moved this task from Backlog to Bugsquashing - In Progress on the MITK board.

Works as intended. If opencv Python wrapping is not available the python plugin uses simpleITK to transfer the image as a fallback. Theres no option to check if the cv runtime is available at compile time in the python environment. This is done during runtime. Thats why the import error appears in the console.

heime moved this task from Backlog to Bugsquashing - In Progress on the MITK board.

Works as intended. If opencv Python wrapping is not available the python plugin uses simpleITK to transfer the image as a fallback. Theres no option to check if the cv runtime is available at compile time in the python environment. This is done during runtime. Thats why the import error appears in the console.

kislinsk removed heime as the assignee of this task.
kislinsk added a project: Bulk Edit.
kislinsk added a subscriber: heime.
kislinsk removed a project: Bulk Edit.