Correct 3D drift implementation in KNIME

I noticed that a lot of my workflows lack a 3D drift correction node like the imagej plugins “Correct 3D drift” or “stackreg” / “multistackreg”. Currently, I always do this step outside of KNIME which slows everything down considerably (mostly because the image writer node is slow). I was wondering if anyone had tried to implement registration/drift correction functions directly in KNIME yet?

I spent some time attempting to do this myself. The easiest thing looked like taking “Correct 3D drift” script, annotating it for KNIME and using Maven to package the jar.

I ran into a number of problems though, likely because I am a horrendously inexperienced with ImageJ2 macros. Most of the examples I’ve found online (thanks @imagejan, @stelfrich) use Java. “Correct 3D drift” is python, so how do I correctly annotate this for KNIME? Do I need to rewrite everything in Java using command classes? Am I better off / is is possible to run this as a pure python script off of a python node?

Thanks for any help or suggestions!

If anyone would like to take a crack at this themselves, here is a link to 2 a channel image of a cell that moves a little over time.

2 Likes

Hi Andrew!

There’s the Align image node that does registration of images along a dimension (in contrast to what its name suggests). Works quite well for the example data that you have provided!

Unfortunately, that won’t work in KNIME. @Christian_Tischer, however, has worked on a native Java Image Registration Suite some time ago. Progress seems to have stalled a little, though. If you are curious, discussions have happened in this thread:

Best,
Stefan

2 Likes

Ah yes, I didn’t realize the “align” node could be used like that! This works great for my use case. I’ll take a look at Image Registration Suite, thanks for the link.

1 Like

In case someone needs it in the future, I made a quick example workflow showing how the align node can work in some cases (link). This workflow takes a 2 channel time series. It aligns channel 2 relative to channel 1. Then it aligns both channels through time.

3 Likes

Thanks, Andrew, for sharing the example! The link requires me to request access, is that intended? Did you know you can also share workflows via the KNIME hub now? :wink:

1 Like

this would be great on the knime hub! cheers,SC

2 Likes

Thanks for pointing that out. My academic google drive seems to have extra restrictions on sharing so I am glad KNIME hub exists: link here

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.