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

Empty electrodes set breaks visualization #225

Open
mshavliuk opened this issue May 19, 2023 · 0 comments
Open

Empty electrodes set breaks visualization #225

mshavliuk opened this issue May 19, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@mshavliuk
Copy link
Collaborator

Description

Steps to reproduce

I'm getting error if I check "Visible" checkbox of an empty electrode set and click "Visualize surfaces". The electrodes set was created automatically for a new project, even though the import_segmentation.zef did not have a type,sensors line.

  1. Create a new project without electrodes, by importing the segmentation without electrodes
  2. Click "visible" checkbox for an empty electrodes set in Segmentation tool
  3. Click "Visualize surface" in Mesh Visualization tool

The following error occur:

Brace indexing is not supported for variables of this type.

Error in zef_plot_meshes (line 531)
                    h_text = text(sensors(i,1),sensors(i,2),sensors(i,3),sensors_name{i});

Error in zef_visualize_surfaces (line 3)
zef_update_fig_details;zef_plot_meshes([]);
 
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 427)
Error while evaluating Button PrivateButtonPushedFcn.

Interestingly, it doesn't happen when any of the clipping planes is enabled.

Expected behavior

  1. I would expect the empty electrodes set not to be created for no reason
  2. Whenever an empty set of electrodes is visible, it shouldn't break the program

Screenshots

bug.mp4

Context

Name Value
Version 0aa7664
OS MacOS
Shell N/A
@mshavliuk mshavliuk added the bug Something isn't working label May 19, 2023
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