set_data()#216
Conversation
|
running into a small issue for setting the data when the ndims of the data increase beyond "txy" setting the overall data: however, if the dims are higher than 3 and I am trying to update the current displayed image, I get broadcasting errors because the shapes become mismatched would need to do something like |
|
Just do the 0th index for all dims upto the last 2. Also I just realized we shouldn't directly set the graphic data, if windows functions or something are being used etc. So I would just set the current_index property. But it doesn't do anything if the current index is the same! So you could make a private method that has the logic for the current index setter with a "force" argument to force the update. |
I do not understand what logic in This to me seems that since the data has changed that the frame returned using the It appears to me that regardless of whether the index has changed or not that the data is getting updated... |
|
the examples I have to set_data are working locally, I think it is sufficient to just force a call to the current index setter in order to get the graphics to update |
|
Maybe it's true that a simple call to the current_index setter is sufficient to set the image graphic data, haven't seen that code in a while. If it works then it works! :D |
* use numpy array instead of tuple for indexing collections * set_data() (#216) * set_data() * fix small logic piece * requested changes * refactor reset_vmin_vmax() to work without sliders * should be functional, need to do some more extensive testing * removing unneccessary method * tweaks, not yet tested * image widget set_data fully works --------- Co-authored-by: kushalkolar <kushalkolar@gmail.com> * use numpy array instead of tuple for indexing collections * update nb * progresS --------- Co-authored-by: Caitlin Lewis <69729525+clewis7@users.noreply.github.com>
#190
add public method to ImageWidget to change the data