knime-ip / knip-scripting

KNIP Scripting Extension based on SciJava-Scripting
3 stars 0 forks source link

Make Scripting Node Streamable #18

Closed dietzc closed 9 years ago

dietzc commented 9 years ago

see above. Should be a null brainer (ask @seebacherd he knows how to do that).

Squareys commented 9 years ago

Yeah, I thought about this, too.

@seebacherd How do I do that? :D

IdealOutage commented 9 years ago

@Squareys if you're using a CellFactory take a look at the ValueToCellNodeModel, you need the three methods createStreamableOperator(), getInputPortRoles() and getOutputPortRoles().

if you're doing it Row by Row take a look at createStreamableOperator() method of the ImgReaderTableNodeModel

@tibuch this might be interesting for you, too.

dietzc commented 9 years ago

see e.g. https://github.com/knime-ip/knip/blob/rc_1.4.0/org.knime.knip.base/src/org/knime/knip/base/node/ValueToCellNodeModel.java

Squareys commented 9 years ago

I cannot use ValueToCellNodeModel, since the ScriptingNode may possibly output more rows in the output than in the input table. Or less. Or possibly none at all, or exactly equally many. I guess this basically defeats the entire possibility of streaming, right?

dietzc commented 9 years ago

no? ;-) as long as the output can be processed row by row you can still stream. I just showed you the ValueToCellNodeModel as an example.

Squareys commented 9 years ago

Should be done in 0b166d5730d2a2b51e9d7074756ac98be1698b96 but is still untested

Squareys commented 9 years ago

Worx 097e758d5c0d1c110376ccd8aaba1001eb153d8a