Chris-N-K / napari-time-series-plotter

A napari Plugin for visualisaton of pixel values over time (t+ nD) as graphs.
BSD 3-Clause "New" or "Revised" License
10 stars 5 forks source link

Add widget to save pixel / voxel time series to file #7

Closed Chris-N-K closed 1 year ago

Chris-N-K commented 2 years ago

Add a widget to store intensity time series of selected pixel / voxel and save all stored data to file.

Features:

TODO:

Chris-N-K commented 1 year ago

Possible solutions:

Chris-N-K commented 1 year ago

@rjlopez2 maybe you would like to add input here as well ^^

Chris-N-K commented 1 year ago

A possible icon for the toolbar button solution: ToCSV

The button was made based on the save icon from napari_matplotlib, should be mentioned somewhere, not sure where.

rjlopez2 commented 1 year ago

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

Chris-N-K commented 1 year ago

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

Chris-N-K commented 1 year ago

The newes release (v0.0.6) added these features. Thus, closing this.

rjlopez2 commented 1 year ago

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