Closed Chris-N-K closed 1 year ago
Possible solutions:
QAbstractTableModel
--> the data in the model must update simultaneously with the plotter
--> save only y data or x data as well? (must respect scaling factor)
--> extract data directly from the layer or from the VoxelPlotter
?napari-matplotlib
toolbar
--> needs a custom icon
--> data can be extracted directly from plotter.axes.lines[n].get_ydata()
(would not need additional objects, both axes, already scaled)
--> no way to inspect the actual values (but wouldn't the plots be enough?)@rjlopez2 maybe you would like to add input here as well ^^
A possible icon for the toolbar button solution:
The button was made based on the save icon from napari_matplotlib, should be mentioned somewhere, not sure where.
Hey Chiris,
it's been a while since last time I was working on this, but recently got a bit of time and I think I got something kinda working for exporting the plotted traces as csv files. My approach was basically create a new tab with export options, where you can select and change directory or filename for the csv file. There is still plenty of room for improvement, for instance a nice feature I think of is to visualize the actual datapoints as a gui table may be?
Anyway... it is still raw but feel free to have a look and see what features we can potentially use form here and polish it to eventually incorporate them in your plugin.
It it's in cloned version I'm currently using internally for our team. Check the last commit in the "custome_use" branch. https://github.com/rjlopez2/napari-time_series_plotter/commit/30e063391289eb500103e767f84ef5351cbfe6ee
Looking forward for your thoughts :)
cheers
Ruben
Hi Ruben,
I'm happy your still working with and on the plug in. Your solution does work fine and the idea to just grab the data during drawing is not bad and far more simple then everything I did ^^', so kudos to you.
I think an additional tab for the data export might be excessive. Thus, I hope to do it with the button mentioned above and a popup, similar to the plot saving approach.
An integrated table view would be a nice addition. For the table view a different approach to data management would be good. I already thought about changing data handling completely and cut data extraction from the plotter. I think it should really only be responsible for plotting and the data should be extracted and stored in a background management object. This way displaying the data with an additional widget in the plugins tab of napari would be easy and straight forward and the saving would be a breeze as well. Sadly that's so good chunk of work.
Your solution could be a fast way to add the feature. I would suggest to save the ROI ID to self.data as well. Therefore, we should probably use a pandas data frame. The DataFrame class has an interface for saving in csv format as well.
I'm happy to work on this feature together. In the near future I should have some time to help you figure things out. I you like you could experiment in both directions. We can directly work on your fork if you like or I open a branch on the main repo.
Best, Chris
The newes release (v0.0.6) added these features. Thus, closing this.
really nice job, I haven't got the time to play in extent with the new feature(s) but by looking at the demo gif ti looks really really nice. Thanks a lot for releasing this changes
Add a widget to store intensity time series of selected pixel / voxel and save all stored data to file.
Features:
TODO: