Hi,
we have been trying to get Neuroglancer to query only a subset of segment ids by querying the celltype in the segment_query search bar. The backend for this querying task is already set up.
For this, we added a callback, so we get the wanted celltype from the frontend with the viewer.shared_state.add_changed_callback(self.on_state_changed) (line 57) function. The on_state_changed() function looks like this:
The set_state_segment_ids() creates a deep copy of the viewer state and sets the segment query of this state to a subset of the segment ids and returns it (new_state line 74).
This approach results in a block, as the execution doesn't go past set_state (line 76) method. It stops at _dispatch_changed_callbacks(), as add_changed_callback() (line 57) already acquired the lock.
Is this approach faulty? How could we set a new state for Neuroglancer Viewer with our preferred segmentation ids?
Thank you in advance!
Best regards,
Andrei Mancu