Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-Column Selection #42

Open
gab1one opened this issue May 23, 2016 · 6 comments
Open

Multi-Column Selection #42

gab1one opened this issue May 23, 2016 · 6 comments

Comments

@gab1one
Copy link
Member

gab1one commented May 23, 2016

If a command has only one input which is assigned to a column selection, e.g one input image, we should create a multi column selection for that input.

Notes

  • there should be a way to turn this off programmatically (e.g. special
    annotation)
  • If multiple columns are selected the command is executed for each of them and the resulting columns are either appended or a new table is created.

We need to have a multi column selection for input parameters. E.g. when we want to apply a filter to several image columns in a table.

Ideas:

Manual

  • Add Varags Annotation that enables multiselect for a parameter.

JAVA:

@Parameter(attr={@Attr("multiCol" = "true")})
private ImgPlus[] inputImgs;

JavaScript:

\\ @Input(multiCol = 'true') ImgPlus[]  inputImgs

Automatic

Commandinputs fitting the following parameters will always get multi col select:

  • Command with single input image will get multi selection for that input
@gab1one gab1one self-assigned this May 23, 2016
@gab1one gab1one changed the title Multicolumn selection Add multicolumn selection May 23, 2016
@dietzc
Copy link
Member

dietzc commented Aug 31, 2016

I'm not sure if we need the extra @Attr anymore.

@Squareys Squareys modified the milestone: knip-scijava-1.0.0-beta Sep 6, 2016
@Squareys
Copy link
Contributor

@dietzc Maybe a second StyleHook constant?

@dietzc
Copy link
Member

dietzc commented Sep 13, 2016

If we have to add a hook, then certainly a StyleHook. However we have to be careful and think this through in all detail:

Use-case 1:

  • We only have a single column selection in a ModuleInfo (either enforced by a hook or because there is no widget for it):
  • We can add a Multi-Column Selection in this case, as we can process the module for each selected column individually.
  • Output-table-style: New Table, Append Columns , Replace Column (by many).

Use-case 2:

  • We have one or many Array input for which no dialog-widget exists, e.g. ImgPlus<T>[] or List<ImgPlus<T>> or ... This results in one or many multi-column selections where you can select the columns. Please note that we may have to use the generic-type-matching magic of @ctrueden in case of generics and nested generics.
  • Output-table-style: New Table, Append Columns

Use-case 3:

  • We have a e.g. a Float[] input for which a dialog-widget exists as well as a special cell-type in KNIME. For this Float[] we could enforce a column-selection but also a multi-column-selection.
  • Output-table-style: New Table, Append Columns and Replace if single column selection.

So yes we need another enforcer-hook but we also need more. Let me know if it makes sense what I wrote and if not, what your concerns are.

@Squareys
Copy link
Contributor

So yes we need another enforcer-hook but we also need more. Let me know if it makes sense what I wrote and if not, what your concerns are.

The "need more" only refers to code outside of the Scijava command, like the output-table-style etc., right?

We can add a Multi-Column Selection in this case

Meaning, we will add a Multi-Column Selection in this case, right?

Everything else makes total sense, I think those use cases are well separated 👍

@dietzc
Copy link
Member

dietzc commented Sep 14, 2016

The "need more" only refers to code outside of the Scijava command, like the output-table-style etc., right?

We need to handle all the other use-cases. The output-table-style is a different issue (would be great if you could open the issue with a first proposal what we do on this front).

@dietzc
Copy link
Member

dietzc commented Sep 14, 2016

Meaning, we will add a Multi-Column Selection in this case, right?

Can in the sense of: we are allowed without being inconsistent. So yes, we will ;-)

@dietzc dietzc changed the title Add multicolumn selection Multi-Column Selection Sep 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants