<div dir="ltr"><div>Hi Folks, </div><div>I'm trying to write a unit test to catch a bug I just fixed. </div><div><br></div><div>The test involves opening a tiff image and using it as  a mask image as an imglib2 Cursor to only analyse pixels in the test images that are "on" in the mask image. </div><div><br></div><div>I made some progress fighting my way through the fun Generic Types maze, and my test code compiles... but it pukes at run time with a casting error</div><div>can't cast UnsignedByteType to BitType</div><div><br></div><div>in Class file MandersColocalizationTest.java in the Coloc_2 plugin's tests package,</div><div>its the mandersRealNoisyImagesTest() method (2nd test method)</div><div><br></div><div>my fork-branch with the failing code is at</div><a href="https://github.com/chalkie666/Colocalisation_Analysis/tree/MandersRealNoisyTest">https://github.com/chalkie666/Colocalisation_Analysis/tree/MandersRealNoisyTest</a><br><div>in the latest commit. </div><div><br></div><div>any clues from the Generic Types heros?????</div><div><br></div><div>cheers</div><div><br></div><div>Dan</div></div>