<div dir="ltr">Hi all,<br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 20, 2013 at 12:27 PM, Curtis Rueden <span dir="ltr"><<a href="mailto:ctrueden@wisc.edu" target="_blank">ctrueden@wisc.edu</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Lee,<div><br></div><div><div>> I was thinking it would be nice (= makes my life a little easier) if</div>

<div>> imglib2-io was a test phase dependency of imglib-algorithms so you</div><div>> could use test images in imglib2 tests.</div>


</div><div><br></div><div>I think that's a good idea. However, a couple of comments:</div><div><br></div><div>1) net.imglib2:imglib2-io:2.0.0-SNAPSHOT will go away soon, in favor of io.scif:scifio:0.3.0. In other words: the latest ImgOpener/ImgSaver work is being done in the SCIFIO repository (<a href="https://github.com/scifio/scifio" target="_blank">https://github.com/scifio/scifio</a>) rather than in the ImgLib2 repo. The reason is that imglib2-io already depends on SCIFIO to do this stuff, and SCIFIO depends on imglib2 core, so why not consolidate and give all SCIFIO users the capability of working with ImgLib2 data structures?</div>




<div><br></div><div>So, imglib-algorithms would then have a test-phase dependency on scifio. Same difference though. </div></div></blockquote><div><br></div><div>I'll look at pulling in scifio instead or possibly hold off on committing the tests until things gel a bit more.</div>

<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div> </div></div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr"><div></div><div><div>> I'm thinking of storing very small .tifs as resources</div></div>

<div><br></div><div>2) Rather than TIFFs, you can use .fake file paths for testing without needing to commit any actual images to the repository. The .fake "file format" was invented for exactly such a purpose, to make unit testing easy. The only downside is that you can't precisely control the pixel contents, but for unit tests you rarely need to. Rather, you typically want the test to verify that it processes data in various structures properly (RGB vs. grayscale, huge plane sizes, etc.).</div>




<div><br></div><div>Would that work for you?</div><div><br></div></div></blockquote><div>For the pyramids, I want to compare the output of the C reference implementation against my own. That means that I have to generate the results using an image with known contents. Johannes suggested generating test images. In CellProfiler, I often do similar - use a pseudo-random number generator with fixed seed to generate the same image every time. I was planning to include the reference implementation outputs (there are six different variants = 6 outputs), but perhaps it's enough to randomly sample the values at a handful of coordinates and check those instead of checking the entire image.</div>
<div><br></div><div style>For CP unit tests, we have a standard set of images that we use throughout the tests (stored in an svn repository, not GIT). ImageJ has those example images and maybe those are enough for testing.</div>
<div style><br></div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div></div><div>Regards,</div><div>Curtis</div><div class="gmail_extra"><br><br><div class="gmail_quote">

On Thu, Jun 20, 2013 at 8:53 AM, Lee Kamentsky <span dir="ltr"><<a href="mailto:leek@broadinstitute.org" target="_blank">leek@broadinstitute.org</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi all,<div>I was thinking it would be nice (= makes my life a little easier) if imglib2-io was a test phase dependency of imglib-algorithms so you could use test images in imglib2 tests. I'm thinking of storing very small .tifs as resources in the test packages, hope 100x100 pixels is a reasonable size for GIT, still haven't figured out the best strategy for writing the resource to a file so that it can be loaded.</div>




<span><font color="#888888">
<div><br></div><div>--Lee</div></font></span></div>
<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" target="_blank">http://imagej.net/mailman/listinfo/imagej-devel</a><br>
<br></blockquote></div><br></div></div>
</blockquote></div><br></div></div>