knime-ip / knip-scijava

KNIP - SciJava Commands Plugin
2 stars 3 forks source link

Multi-Column Selection #42

Open gab1one opened 8 years ago

gab1one commented 8 years ago

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

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

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:

dietzc commented 7 years ago

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

Squareys commented 7 years ago

@dietzc Maybe a second StyleHook constant?

dietzc commented 7 years ago

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:

Use-case 2:

Use-case 3:

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 commented 7 years ago

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 :+1:

dietzc commented 7 years ago

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 commented 7 years ago

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 ;-)