You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried using your plugin, and I encountered a problem when trying to run it. Specifically, when I choose the fixed image, the moving image, keep the rigid preset, and hit "register," the plugin is giving me an error ( traceback below ).
Other errors are happening when I try to click anything else (see a short video).
I am running Windows 10, and I'm including the list of packages I have installed.
elastix_issue.mp4
Thank you for making this plugin and for any assistance you can provide.
Best regards,
Anna
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
File src\psygnal\_signal.py:851, in _run_emit_loop()
File src\psygnal\_signal.py:1181, in __call__()
File ~\miniconda3\envs\napari-plugin-test\lib\site-packages\magicgui\widgets\_function_gui.py:212, in FunctionGui.__init__.<locals>._disable_button_and_call()
211 try:
--> 212 self.__call__()
self = <FunctionGui elastix_registration(fixed: napari.layers.image.image.Image = <Image layer '33' at 0x1d921ffc730>, moving: napari.layers.image.image.Image = <Image layer '0' at 0x1d92375ba90>, preset: str = 'rigid', fixed_mask: napari.layers.image.image.Image = None, moving_mask: napari.layers.image.image.Image = None, fixed_ps: Sequence[pathlib.Path] = (), moving_ps: Sequence[pathlib.Path] = (), param1: Sequence[pathlib.Path] = (), param2: Sequence[pathlib.Path] = (), param3: Sequence[pathlib.Path] = (), init_trans: Sequence[pathlib.Path] = (), metric: str = 'AdvancedMattesMutualInformation', resolutions: int = 4, max_iterations: int = 500, nr_spatial_samples: int = 512, max_step_length: float = 1.0, masks: bool = False, advanced: bool = False) -> napari.layers.image.image.Image>
213 finally:
File ~\miniconda3\envs\napari-plugin-test\lib\site-packages\magicgui\widgets\_function_gui.py:324, in FunctionGui.__call__(self=<FunctionGui elastix_registration(fixed: napari....bool = False) -> napari.layers.image.image.Image>, update_widget=False, *args=(), **kwargs={})
323 with _function_name_pointing_to_widget(self):
--> 324 value = self._function(*bound.args, **bound.kwargs)
self = <FunctionGui elastix_registration(fixed: napari.layers.image.image.Image = <Image layer '33' at 0x1d921ffc730>, moving: napari.layers.image.image.Image = <Image layer '0' at 0x1d92375ba90>, preset: str = 'rigid', fixed_mask: napari.layers.image.image.Image = None, moving_mask: napari.layers.image.image.Image = None, fixed_ps: Sequence[pathlib.Path] = (), moving_ps: Sequence[pathlib.Path] = (), param1: Sequence[pathlib.Path] = (), param2: Sequence[pathlib.Path] = (), param3: Sequence[pathlib.Path] = (), init_trans: Sequence[pathlib.Path] = (), metric: str = 'AdvancedMattesMutualInformation', resolutions: int = 4, max_iterations: int = 500, nr_spatial_samples: int = 512, max_step_length: float = 1.0, masks: bool = False, advanced: bool = False) -> napari.layers.image.image.Image>
bound = <BoundArguments (fixed=<Image layer '33' at 0x1d921ffc730>, moving=<Image layer '0' at 0x1d92375ba90>, preset='rigid', fixed_mask=None, moving_mask=None, fixed_ps=(), moving_ps=(), param1=(), param2=(), param3=(), init_trans=(), metric='AdvancedMattesMutualInformation', resolutions=4, max_iterations=500, nr_spatial_samples=512, max_step_length=1.0, masks=False, advanced=False)>
self._function = <function elastix_registration at 0x000001D928A08280>
326 self._call_count += 1
File ~\miniconda3\envs\napari-plugin-test\lib\site-packages\elastix_napari\elastix_registration.py:110, in elastix_registration(fixed=<Image layer '33'>, moving=<Image layer '0'>, preset='rigid', fixed_mask=None, moving_mask=None, fixed_ps=(), moving_ps=(), param1=(), param2=(), param3=(), init_trans=(), metric='AdvancedMattesMutualInformation', resolutions=4, max_iterations=500, nr_spatial_samples=512, max_step_length=1.0, masks=False, advanced=False)
109 return utils.error("No images selected for registration.")
--> 110 if utils.check_filename(fixed_ps) != utils.check_filename(moving_ps):
fixed_ps = ()
moving_ps = ()
utils = <module 'elastix_napari.utils' from 'C:\\Users\\Lemon\\miniconda3\\envs\\napari-plugin-test\\lib\\site-packages\\elastix_napari\\utils.py'>
111 print("Select both fixed and moving point set.")
File ~\miniconda3\envs\napari-plugin-test\lib\site-packages\elastix_napari\utils.py:21, in check_filename(filename=())
18 """
19 Checks if filename adheres to the correct format.
20 """
---> 21 if '.txt' in str(filename[0]) or '.vtk' in str(filename[0]):
filename = ()
22 return True
IndexError: tuple index out of range
The above exception was the direct cause of the following exception:
EmitLoopError Traceback (most recent call last)
File ~\miniconda3\envs\napari-plugin-test\lib\site-packages\magicgui\widgets\_bases\value_widget.py:57, in ValueWidget._on_value_change(self=PushButton(value=False, annotation=None, name='call_button'), value=False)
55 if value is self.null_value and not self._nullable:
56 return
---> 57 self.changed.emit(value)
value = False
self.changed = <SignalInstance 'changed' on PushButton(value=False, annotation=None, name='call_button')>
self = PushButton(value=False, annotation=None, name='call_button')
File src\psygnal\_signal.py:805, in emit()
File src\psygnal\_signal.py:856, in _run_emit_loop()
EmitLoopError: calling <function FunctionGui.__init__.<locals>._disable_button_and_call at 0x000001D93D8AB4C0> with args=(False,) caused IndexError in emit loop.
Hi @LemonJust, thanks! The issue got fixed and hopefully the latest version 0.1.8 of plugin works now. I noticed that I closed the issue (long ago) without letting you know - sorry for that.
Hello everyone,
I tried using your plugin, and I encountered a problem when trying to run it. Specifically, when I choose the fixed image, the moving image, keep the rigid preset, and hit "register," the plugin is giving me an error ( traceback below ).
Other errors are happening when I try to click anything else (see a short video).
I am running Windows 10, and I'm including the list of packages I have installed.
elastix_issue.mp4
Thank you for making this plugin and for any assistance you can provide.
Best regards,
Anna
The text was updated successfully, but these errors were encountered: