diff --git a/src/main/java/net/preibisch/mvrecon/process/interestpointregistration/global/GlobalOpt.java b/src/main/java/net/preibisch/mvrecon/process/interestpointregistration/global/GlobalOpt.java index ef7d0525..ad70a5c5 100644 --- a/src/main/java/net/preibisch/mvrecon/process/interestpointregistration/global/GlobalOpt.java +++ b/src/main/java/net/preibisch/mvrecon/process/interestpointregistration/global/GlobalOpt.java @@ -32,12 +32,14 @@ import mpicbg.models.Affine3D; import mpicbg.models.AffineModel3D; +import mpicbg.models.ErrorStatistic; import mpicbg.models.IllDefinedDataPointsException; import mpicbg.models.Model; import mpicbg.models.NotEnoughDataPointsException; import mpicbg.models.RigidModel3D; import mpicbg.models.Tile; import mpicbg.models.TileConfiguration; +import mpicbg.models.TileUtil; import mpicbg.spim.data.sequence.ViewId; import net.imglib2.util.Pair; import net.imglib2.util.ValuePair; @@ -105,7 +107,10 @@ public static < M extends Model< M > > HashMap< ViewId, Tile< M > > computeTiles else IOFunctions.println( "(" + new Date( System.currentTimeMillis() ) + "): prealigned all tiles" ); - tc.optimize( cs.getMaxError(), cs.getMaxIterations(), cs.getMaxPlateauWidth() ); + System.out.println( "new code ... "); + + tc.optimizeSilently(new ErrorStatistic( cs.getMaxPlateauWidth() + 1 ), cs.getMaxError(), cs.getMaxIterations(), cs.getMaxPlateauWidth() ); + //tc.optimize( cs.getMaxError(), cs.getMaxIterations(), cs.getMaxPlateauWidth() ); IOFunctions.println( "(" + new Date( System.currentTimeMillis() ) + "): Global optimization of " + tc.getTiles().size() + " view-tiles (Model=" + model.getClass().getSimpleName() + "):" ); diff --git a/src/main/java/net/preibisch/mvrecon/process/interestpointregistration/global/GlobalOptIterative.java b/src/main/java/net/preibisch/mvrecon/process/interestpointregistration/global/GlobalOptIterative.java index c1b7ff73..746c8094 100644 --- a/src/main/java/net/preibisch/mvrecon/process/interestpointregistration/global/GlobalOptIterative.java +++ b/src/main/java/net/preibisch/mvrecon/process/interestpointregistration/global/GlobalOptIterative.java @@ -107,9 +107,10 @@ public static < M extends Model< M > > HashMap< ViewId, Tile< M > > computeTiles else IOFunctions.println( "(" + new Date( System.currentTimeMillis() ) + "): prealigned all tiles" ); - TileUtil.optimizeConcurrently( + tc.optimizeSilently(new ErrorStatistic( ics.getMaxPlateauWidth() + 1 ), ics.getMaxError(), ics.getMaxIterations(), ics.getMaxPlateauWidth() ); + /*TileUtil.optimizeConcurrently( new ErrorStatistic( ics.getMaxPlateauWidth() + 1 ), ics.getMaxError(), ics.getMaxIterations(), ics.getMaxPlateauWidth(), 1.0f, - tc, tc.getTiles(), tc.getFixedTiles(), Runtime.getRuntime().availableProcessors()); + tc, tc.getTiles(), tc.getFixedTiles(), Runtime.getRuntime().availableProcessors());*/ IOFunctions.println( "(" + new Date( System.currentTimeMillis() ) + "): Global optimization of " + tc.getTiles().size()); IOFunctions.println( "(" + new Date( System.currentTimeMillis() ) + "): Avg Error: " + tc.getError() + "px" );