bonej-org / BoneJ2

Plugins for bone image analysis
BSD 2-Clause "Simplified" License
20 stars 12 forks source link

Can't easily save BoneJ results from table #129

Closed mdoube closed 3 years ago

mdoube commented 6 years ago

BoneJ2 results are stored in a SharedTable called "BoneJ results" and displayed to the user (or not, if running headless).

There appears to be no programmatic way to save the results - commands from the File menu have no effect, and there is no 'save' method in the parent Table class.

It is possible to copy paste via the UI into a spreadsheet like LibreOffice Calc or into a text editor.

Users need a way to save table data via UI and scripts.

imagejan commented 6 years ago

FYI, the net.imagej.table.* classes will soon be deprecated and replaced by org.scijava.table.* from scijava-table. Except for the package naming and dependencies, the API is mostly unchanged. See https://github.com/imagej/imagej-common/pull/78 for details.

Together with this move, we also moved the IO component to scijava-plugins-io-table, see also https://github.com/scijava/scijava-plugins-io-table/pull/3.

There are plans to integrate some UI in the table display to allow saving of tables: https://github.com/imagej/imagej-common/issues/75

If you're missing any functionality, or consider some parts of SharedTable etc. worth being moved into the respective SciJava component, I'd be happy to know and accept PRs :)

mdoube commented 6 years ago

OK, I will have a go at reconfiguring Maven to use scijava-table

rimadoma commented 6 years ago

Copy-pasting is possible from the table in the UI (click in the table, and ctrl-a, ctrl-c), and @alessandrofelder and I have done that while testing results from Intertrabecular angle

@mdoube Thanks for labelling the issue!

tristan05 commented 5 years ago

Hello -

I am using boneJ2 via the ImageJ-Matlab interface. I would like to get numerical results from the "BoneJ results" table back to Matlab, but it does not appear as though the results window is treated as a table in Fiji. Is there a programmatic workaround to automatically store numerical results? By the way, copy and paste of the results does not work when boneJ2 is being run via Matlab. Many thanks, Tristan

mdoube commented 5 years ago

@tristan05 please make a forum post requesting assistance with this https://forum.image.sc/ In the meantime take a look at BoneJ2's SharedTable API, in particular SharedTable.getTable(), which returns an org.scijava.table.Table object, that might be amenable to parsing values from. Programmatic access to BoneJ2 results might also be better using the APIs of the classes you are interested in, rather than via the table. (But I am not sure if that is possible from Matlab - hence the recommendation to make a forum post).

mdoube commented 4 years ago

There is a workaround mentioned here to export tables: https://forum.image.sc/t/accessing-bonej2-results-table-via-imagej-matlab/29252/5 Need to get the snapshots finished off and included in the user release.

imagejan commented 4 years ago

All components are released and pinned in the latest pom-scijava.

<scijava-plugins-io-table.version>0.2.0</scijava-plugins-io-table.version>

<scijava-table.version>0.5.0</scijava-table.version>

No need to pin to any SNAPSHOT versions. With the next big round of Fiji updates (by @ctrueden) these will be available from the Java-8 update site.

(see also https://github.com/scijava/scijava-table/pull/9)

mdoube commented 3 years ago

This is now fixed by the user command File > Export > Table ...