Skip to content

All annotated points are exported as "Interphase" #47

@bramthijssen

Description

@bramthijssen

When I tried running the code in the A_CNN_Annotation_with_Napari.ipynb" notebook, I could add points and change their state; but when exporting the data, all cells received the "Interphase" state regardless of their color/state.

It looks like the "current_properties" of the napari points layer is not actually updated. I think this line should do that:
points_layer.current_properties['State'] = np.array([current_state.value])
But that line doesn't actually change the current_properties, at least not with the current napari version. I believe it is not working because it's retrieving the current_properties dict, and then modifying the local value, rather than the member of the points_layer. Changing that line to this:
points_layer.current_properties = {'State': np.array([current_state.value])}
seems to make everything work again. I guess this will use the current_properties setter function instead of the getter function. Perhaps these things changed in a recent napari version?

I'm not confident enough to submit this as pull request though

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions