diff --git a/src/main/java/fr/pasteur/ida/zellige/surfaceConstruction/construction/SurfacesExtraction.java b/src/main/java/fr/pasteur/ida/zellige/surfaceConstruction/construction/SurfacesExtraction.java index d20c59516f97e84c3e068eb05b8dbe368bf5e772..0aef9d768b981b99eeb17ce3f2248937385b04f3 100644 --- a/src/main/java/fr/pasteur/ida/zellige/surfaceConstruction/construction/SurfacesExtraction.java +++ b/src/main/java/fr/pasteur/ida/zellige/surfaceConstruction/construction/SurfacesExtraction.java @@ -40,18 +40,18 @@ public class SurfacesExtraction /* First step : Pixel selection */ Pixels[][] maximums = SurfacePixelSelection.run( input, amplitude, threshold, sigmas ); int width = ( int ) input.dimension( 0 ); - int heigth = ( int ) input.dimension( 1 ); + int height = ( int ) input.dimension( 1 ); try { /* First round construction*/ - ArrayList< Surface > surfaces = firstRoundConstruction( maximums, width, heigth ); + ArrayList< Surface > surfaces = firstRoundConstruction( maximums, width, height ); System.out.println( "first round surfaces = " + surfaces.size() ); // -// for (Surface surface : surfaces) { -// displaySurface(surface); -// } + for (Surface surface : surfaces) { + displaySurface(surface); + } // Second round construction - ArrayList< Surface > finalSurfaces = secondRoundConstruction( surfaces, width, heigth ); + ArrayList< Surface > finalSurfaces = secondRoundConstruction( surfaces, width, height ); // if ( !finalSurfaces.isEmpty() ) // { int index = 0; @@ -176,6 +176,7 @@ public class SurfacesExtraction } } } + displayMaximums( tempCoordinates ); return tempCoordinates; } @@ -252,7 +253,6 @@ public class SurfacesExtraction { // Merging step. ArrayList< Surface > toRemoved = new ArrayList<>(); - for ( int i = surfaces.size() - 1; i > 0; i-- ) { Surface one = surfaces.get( i ); @@ -324,36 +324,6 @@ public class SurfacesExtraction } -// public static int getX() -// { -// return width; -// } -// -// public static void setX( int x ) -// { -// width = x; -// } -// -// public static int getY() -// { -// return height; -// } -// -// public static void setY( int y ) -// { -// height = y; -// } -// -// public static int getZ() -// { -// return Z; -// } -// -// public static void setZ( int z ) -// { -// Z = z; -// } - /** * Displays the local maximums found using jzy3D package. */