4040import net .imglib2 .type .numeric .real .FloatType ;
4141
4242import org .junit .Test ;
43+ import org .scijava .ops .core .builder .OpBuilder ;
4344import org .scijava .ops .function .Functions ;
4445import org .scijava .ops .types .Nil ;
4546import org .scijava .thread .ThreadService ;
@@ -57,7 +58,7 @@ public class DefaultPearsonsTest extends ColocalisationTest {
5758 */
5859 @ Test
5960 public void fastPearsonsZeroCorrTest (){
60- double result = ( Double ) new OpBuilder (ops , "coloc.pearsons" ).input (zeroCorrelationImageCh1 , zeroCorrelationImageCh2 ).apply ();
61+ double result = new OpBuilder (ops , "coloc.pearsons" ).input (zeroCorrelationImageCh1 , zeroCorrelationImageCh2 ). outType ( Double . class ).apply ();
6162 assertEquals (0.0 , result , 0.05 );
6263 }
6364
@@ -67,7 +68,7 @@ public void fastPearsonsZeroCorrTest(){
6768 */
6869 @ Test
6970 public void fastPearsonsPositiveCorrTest () {
70- double result = ( Double ) new OpBuilder (ops , "coloc.pearsons" ).input (positiveCorrelationImageCh1 , positiveCorrelationImageCh2 ).apply ();
71+ double result = new OpBuilder (ops , "coloc.pearsons" ).input (positiveCorrelationImageCh1 , positiveCorrelationImageCh2 ). outType ( Double . class ).apply ();
7172 assertEquals (0.75 , result , 0.01 );
7273 }
7374
@@ -86,7 +87,7 @@ public void differentMeansTest() {
8687 512 , 512 , mean , spread , sigma , 0x01234567 );
8788 RandomAccessibleInterval <FloatType > ch2 = produceMeanBasedNoiseImage (new FloatType (),
8889 512 , 512 , mean , spread , sigma , 0x98765432 );
89- double resultFast = ( Double ) new OpBuilder (ops , "coloc.pearsons" ).input (ch1 , ch2 ).apply ();
90+ double resultFast = new OpBuilder (ops , "coloc.pearsons" ).input (ch1 , ch2 ). outType ( Double . class ).apply ();
9091 assertEquals (0.0 , resultFast , 0.1 );
9192
9293 /* If the means are the same, it causes a numerical problem in the classic implementation of Pearson's
0 commit comments