-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
put StabilizingAffineModel2D back in, removed dynamiclambda
- Loading branch information
1 parent
b6c0236
commit ff8262f
Showing
4 changed files
with
231 additions
and
47 deletions.
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
...ws-java-client/src/main/java/org/janelia/render/client/newsolver/solvers/WorkerTools.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package org.janelia.render.client.newsolver.solvers; | ||
|
||
import java.util.ArrayList; | ||
import java.util.HashMap; | ||
import java.util.List; | ||
|
||
import org.janelia.render.client.newsolver.solvers.affine.AffineBlockDataWrapper; | ||
|
||
import mpicbg.models.Affine2D; | ||
import mpicbg.models.Model; | ||
import mpicbg.models.Tile; | ||
|
||
public class WorkerTools | ||
{ | ||
public static class LayerDetails< M extends Model<M> & Affine2D< M >> | ||
{ | ||
final public String tileId; | ||
final public int tileCol, tileRow; | ||
final public Tile< M > prevGroupedTile; | ||
|
||
public LayerDetails( final String tileId, final int tileCol, final int tileRow, final Tile< M > prevGroupedTile ) | ||
{ | ||
this.tileId = tileId; | ||
this.tileCol = tileCol; | ||
this.tileRow = tileRow; | ||
this.prevGroupedTile = prevGroupedTile; | ||
} | ||
} | ||
|
||
public static < M extends Model<M> & Affine2D< M >> ArrayList< LayerDetails< M > > layerDetails( | ||
final ArrayList< Integer > allZ, | ||
final HashMap< Integer, List<Tile<M>> > zToGroupedTileList, | ||
final AffineBlockDataWrapper< M, ?, ? > solveItem, | ||
final int i ) | ||
{ | ||
final ArrayList< LayerDetails< M > > prevTiles = new ArrayList<>(); | ||
|
||
if ( i < 0 || i >= allZ.size() ) | ||
return prevTiles; | ||
|
||
for ( final Tile< M > prevGroupedTile : zToGroupedTileList.get( allZ.get( i ) ) ) | ||
for ( final Tile< M > imageTile : solveItem.groupedTileToTiles().get( prevGroupedTile ) ) | ||
{ | ||
final String tileId = solveItem.tileToIdMap().get( imageTile ); | ||
final int tileCol = solveItem.blockData().idToTileSpec().get( tileId ).getLayout().getImageCol();//.getImageCol(); | ||
final int tileRow = solveItem.blockData().idToTileSpec().get( tileId ).getLayout().getImageRow();// | ||
|
||
prevTiles.add( new LayerDetails<>(tileId, tileCol, tileRow, prevGroupedTile ) );//new ValuePair<>( new ValuePair<>( tileCol, tileId ), prevGroupedTile ) ); | ||
} | ||
|
||
return prevTiles; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.