<div dir="ltr">Hi Jay,<div><br></div><div>Interesting bug. I did some digging. The two Img<UnsignedByteType> instances are identical in terms of dimensionality and pixel values, so that isn't the culprit.</div><div><br></div><div>I also tried disabling the labeling computation for SCIFIO to see if it was an issue of tainted state, but the order of computation doesn't seem to make a difference either.</div><div><br></div><div>I also stepped a bit with the debugger and certainly the issue is inside of ConnectedComponents.labelAllConnectedComponents. On line 115, the value of numLabels comes back as 2 for the SCIFIO image and 1 for the IJ1 image. Digging deeper becomes tricky due to the multithreadedness of the algorithm, but I fear that's what you'll have to do in order to isolate the difference in behavior.</div><div><br></div><div>Regards,</div><div>Curtis</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 30, 2015 at 1:01 AM, Jay Warrick <span dir="ltr"><<a href="mailto:warrick@wisc.edu" target="_blank">warrick@wisc.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi All,<br>
<br>
I am getting different behavior using the new ConnectedComponents class of imglib2-algorithm depending on whether I get and Img<UnsignedByteType> from a SCIFIO ImageOpener vs. when I get the same image as an Img<UnsignedByteType> by wrapping an ImagePlus. In the SCIFIO case, ConnectedComponents finds the expected single circle while with a wrapped ImagePlus, it doesn't find any regions.<br>
<br>
Any thoughts/fixes? Might there be something occurring during the wrapping process to cause an issue? Here is a tiny commented maven project with the example scenario.<br>
<br>
<a href="https://github.com/jaywarrick/ConnectedComponentsTest" rel="noreferrer" target="_blank">https://github.com/jaywarrick/ConnectedComponentsTest</a><br>
<br>
The tiny .tif I'm using is included in the project but is loaded by a string path. Thus, you need to retype the path to the image to match your computer, but that should be it. Sorry... wasn't sure how to avoid that easily.<br>
<br>
Thanks for your help,<br>
<br>
Jay<br>
<br>
<br>
_______________________________________________<br>
ImageJ-devel mailing list<br>
<a href="mailto:ImageJ-devel@imagej.net" target="_blank">ImageJ-devel@imagej.net</a><br>
<a href="http://imagej.net/mailman/listinfo/imagej-devel" rel="noreferrer" target="_blank">http://imagej.net/mailman/listinfo/imagej-devel</a><br>
</blockquote></div><br></div></div>