Skip to content

Commit

Permalink
do not use multi-threaded solve because it gets stuck in an inifite l…
Browse files Browse the repository at this point in the history
…oop if there are no connections
  • Loading branch information
StephanPreibisch committed Oct 23, 2024
1 parent 4ca0d5d commit 6986936
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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() + "):" );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" );
Expand Down

0 comments on commit 6986936

Please sign in to comment.