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

CCA column preview empty after Image Cropper #494

Open
stelfrich opened this issue Jan 29, 2018 · 7 comments
Open

CCA column preview empty after Image Cropper #494

stelfrich opened this issue Jan 29, 2018 · 7 comments
Labels

Comments

@stelfrich
Copy link
Member

It seems that if Adjust Dimensionality? is unchecked in an Image Cropper node, the output tables of subsequent Connected Component Analysis nodes do not show a preview of the labeling. Clicking on the cell shows the labeling as expected.

Example workflow: CCAPreviewAfterImageCropper.zip

@gab1one gab1one added the bug label Jan 29, 2018
@gab1one
Copy link
Member

gab1one commented Jan 29, 2018

Thank you for reporting this, it seems to be a bug with our preview rendering.

@imagejan
Copy link

imagejan commented Feb 7, 2018

I noticed the same issue with Adjust Dimensionality? being checked and cropping an XYZ image with a defined Z range: after a Global Thresholder and a Connected Component Analysis, the thumbnails are missing in the output table.

@gab1one
Copy link
Member

gab1one commented Feb 8, 2018

@stelfrich @imagejan This issue is related to the Image Cropper not renormalizing the axis minima. I created a metanode ZeroMin metanode.zip which performs the needed ZeroMin operation. Just add this as a workaround to your workflows where the cropper behavior causes you issues. We might add this as a popper node to KNIP at a later point in time.

@imagejan
Copy link

I noticed that this can also problems when trying to use a legacy ij.ImagePlus as an input parameter in an ImageJ2 plugin.

I got:

ERROR ThreadPool                      An exception occurred while executing a runnable.

... when running my TrackMateSpotDetector on a cropped input image. (Strangely, it still worked when I was running the saved workflow, but threw these errors after I had reconfigured the node...)

Adding your ZeroMin metanode helped here, but I see no way of fixing this inside my own plugin, while still taking an ImagePlus input (and I'd like to avoid the need of a ZeroMin node in the final workflow, ideally).

@gab1one
Copy link
Member

gab1one commented Feb 27, 2018

You could always run Views.zeroMin(..) on your input images? Something like:

RAI myImp = Views.zeroMin(imp);

@imagejan
Copy link

@gab1one yes, of course, if I take an ImgPlus or RAI; but as I take an ImagePlus for using it with TrackMate, I wanted to avoid the additional wrapping, because that's what the framework is supposed to do correctly if I define an @Parameter ImagePlus, no?

@gab1one
Copy link
Member

gab1one commented Mar 1, 2018

In most cases you will actually get an ImgPlus converted to a ImagePlus, at least in KNIME we always use IJ2 / Imglib2 data structures internally. We do not run Views.zeroMin() on our cropped image segments because then you lose the offset information, which you need if you want to recombine the segments at a later time (e.g. using compose image in the GroupBy node).

Maybe we can add an improved conversion strategy in the future, until then I recommend you just request a ImgPlus / RAI as input, wrap it into an ImagePlus yourself after performing Views.zeroMin(..) on it. Then you have maximal control over it. I am sorry that there is currently no easier way for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants