From 9b398a797324b59541612aacf4d73c5c9133723b Mon Sep 17 00:00:00 2001 From: Stephan Saalfeld Date: Sat, 7 Aug 2010 22:38:43 +0200 Subject: [PATCH] finding connected tiles moved into base class (cherry picked from commit 05827edaee04e29d65ed91b343736deac0da01ce) --- ini/trakem2/imaging/StitchingTEM.java | 2 +- mpicbg/trakem2/align/AbstractAffineTile2D.java | 24 ------------------------ 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/ini/trakem2/imaging/StitchingTEM.java b/ini/trakem2/imaging/StitchingTEM.java index 06d3f457..40038381 100644 --- a/ini/trakem2/imaging/StitchingTEM.java +++ b/ini/trakem2/imaging/StitchingTEM.java @@ -956,7 +956,7 @@ A: for ( final AbstractAffineTile2D< ? > t : tiles ) { if ( p.getDistance() >= e.max ) { - final AbstractAffineTile2D< ? > o = t.findConnectedTile( p ); + final Tile< ? > o = t.findConnectedTile( p ); t.removeConnectedTile( o ); o.removeConnectedTile( t ); //Utils.log2( "Removing bad match from configuration, error = " + e.max ); diff --git a/mpicbg/trakem2/align/AbstractAffineTile2D.java b/mpicbg/trakem2/align/AbstractAffineTile2D.java index 3864a0ed..eedab42c 100644 --- a/mpicbg/trakem2/align/AbstractAffineTile2D.java +++ b/mpicbg/trakem2/align/AbstractAffineTile2D.java @@ -90,30 +90,6 @@ abstract public class AbstractAffineTile2D< A extends AbstractAffineModel2D< A > virtualMatches.clear(); } - /** - * Try to find the tile which is connected by a particular - * {@link PointMatch}. - * - * Note that this method searches only the known connected tiles to limit - * the cost of that anyway expensive search. - * - * @param match - * - * @return connectedTile or null - */ - final public AbstractAffineTile2D< ? > findConnectedTile( PointMatch match ) - { - final Point p = match.getP2(); - for ( final mpicbg.models.Tile< ? > t : connectedTiles ) - { - for ( final PointMatch m : t.getMatches() ) - { - if ( p == m.getP1() ) return ( AbstractAffineTile2D< ? > )t; - } - } - return null; - } - abstract protected void initModel(); public AbstractAffineTile2D( final A model, final Patch patch ) -- 2.11.4.GIT