Open
Conversation
This converter allows to get a ResultsTable by its title string. In addition, the populateInputCandidates() method allows to get a list of open results tables, e.g. to generate a choice dropdown in ObjectWidget. Since we're using ImageJ1 classes directly, we need to add the new converter class to the exceptions in ImageJ1EncapsulationTest.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This converter allows to get a
ResultsTableby its title string. In addition, thepopulateInputCandidates()method allows to get a list of open results tables, e.g. to generate a choice dropdown inObjectWidget.Since we're using ImageJ1 classes directly, we need to add the new converter class to the exceptions in
ImageJ1EncapsulationTest.See also this forum discussion.
To be discussed:
It would be nice to extend the functionality to also allow loading
ResultsTables from files, using the staticResultsTable.open(String path)method (possibly delegating to a newFileToResultsTableConverter). I'll leave this to a future pull request.The current implementation of
ObjectWidgetandObjectService#getName()returns theResultsTable'stoString()value, resulting in a rather cryptic identifier in the dropdown choice:We could create a custom widget for
ResultsTable, but I'd prefer usingObjectWidgetto keep everything concise (and staying with a converter has the added benefit that#@parameters are callable from CLI/macros right away). Maybe we can improveObjectServicesomehow to be extensible via a (new)NameProviderplugin mechanism, but I'm not sure if this would be overdoing it? @ctrueden do you have some opinion/advice here?Tests for the new converter are currently missing.