1 importClass( Packages.mpicbg.trakem2.transform.MovingLeastSquaresTransform );
3 IJ.log( ">>> Test mpicbg.trakem2.transform.MovingLeastSquaresTransform >>>" );
5 var l1 = new java.lang.reflect.Array.newInstance( java.lang.Float.TYPE, 2 );
9 var l2 = new java.lang.reflect.Array.newInstance( java.lang.Float.TYPE, 2 );
13 var l3 = new java.lang.reflect.Array.newInstance( java.lang.Float.TYPE, 2 );
17 var w1 = new java.lang.reflect.Array.newInstance( java.lang.Float.TYPE, 2 );
21 var w2 = new java.lang.reflect.Array.newInstance( java.lang.Float.TYPE, 2 );
25 var w3 = new java.lang.reflect.Array.newInstance( java.lang.Float.TYPE, 2 );
31 l1[ 0 ] + " " + l1[ 1 ] + " " +
32 w1[ 0 ] + " " + w1[ 1 ] + " " +
33 l2[ 0 ] + " " + l2[ 1 ] + " " +
34 w2[ 0 ] + " " + w2[ 1 ] + " " +
35 l3[ 0 ] + " " + l3[ 1 ] + " " +
36 w3[ 0 ] + " " + w3[ 1 ];
38 var m = new MovingLeastSquaresTransform();
41 var l1p = m.apply( l1 );
42 var l2p = m.apply( l2 );
43 var l3p = m.apply( l3 );
46 w1[ 0 ] == l1p[ 0 ] &&
47 w1[ 1 ] == l1p[ 1 ] &&
48 w2[ 0 ] == l2p[ 0 ] &&
49 w2[ 1 ] == l2p[ 1 ] &&
50 w3[ 0 ] == l3p[ 0 ] &&
52 IJ.log( " + transferring control points correctly passed" )
54 IJ.error( " - transferring control points correctly failed" )
56 IJ.log( "<<< Test mpicbg.trakem2.transform.MovingLeastSquaresTransform <<<" );
58 //IJ.run( "Clown (14K)" );