fixed Elastic Montage using the wrong linear model when
[trakem2.git] / test / test_distortioncorrection_trakem2.js
blob75c62b39673d43390098ad4e6860b6ae25a7f059
1 importClass( Packages.lenscorrection.DistortionCorrectionTask );
2 importClass( Packages.ini.trakem2.display.Display );
3 importClass( Packages.ini.trakem2.display.Patch );
5 /** Remove all coordinate transforms from all patches in the layer set */
6 var layers = Display.getFront().getSelection().getLayer().getParent().getLayers();
7 for ( var i = 0; i < layers.size(); ++i )
9         var patches = layers.get( i ).getDisplayables( Patch );
10         for ( var j = 0; j < patches.size(); ++j )
11         {
12                 var patch = patches.get( j );
13                 patch.setCoordinateTransform( null );
14                 patch.updateMipmaps();
15         }
18 /** Estimate and apply distortion correction model */
19 DistortionCorrectionTask.correctDistortionFromSelection( Display.getFront().getSelection() );