Skip to content
Snippets Groups Projects
Commit 6237687f authored by Céline  TREBEAU's avatar Céline TREBEAU
Browse files

Code cleanup

parent c5f43390
No related branches found
No related tags found
1 merge request!10Surface reconstruction Refactoring
...@@ -40,18 +40,18 @@ public class SurfacesExtraction ...@@ -40,18 +40,18 @@ public class SurfacesExtraction
/* First step : Pixel selection */ /* First step : Pixel selection */
Pixels[][] maximums = SurfacePixelSelection.run( input, amplitude, threshold, sigmas ); Pixels[][] maximums = SurfacePixelSelection.run( input, amplitude, threshold, sigmas );
int width = ( int ) input.dimension( 0 ); int width = ( int ) input.dimension( 0 );
int heigth = ( int ) input.dimension( 1 ); int height = ( int ) input.dimension( 1 );
try try
{ {
/* First round construction*/ /* 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() ); System.out.println( "first round surfaces = " + surfaces.size() );
// //
// for (Surface surface : surfaces) { for (Surface surface : surfaces) {
// displaySurface(surface); displaySurface(surface);
// } }
// Second round construction // Second round construction
ArrayList< Surface > finalSurfaces = secondRoundConstruction( surfaces, width, heigth ); ArrayList< Surface > finalSurfaces = secondRoundConstruction( surfaces, width, height );
// if ( !finalSurfaces.isEmpty() ) // if ( !finalSurfaces.isEmpty() )
// { // {
int index = 0; int index = 0;
...@@ -176,6 +176,7 @@ public class SurfacesExtraction ...@@ -176,6 +176,7 @@ public class SurfacesExtraction
} }
} }
} }
displayMaximums( tempCoordinates );
return tempCoordinates; return tempCoordinates;
} }
...@@ -252,7 +253,6 @@ public class SurfacesExtraction ...@@ -252,7 +253,6 @@ public class SurfacesExtraction
{ {
// Merging step. // Merging step.
ArrayList< Surface > toRemoved = new ArrayList<>(); ArrayList< Surface > toRemoved = new ArrayList<>();
for ( int i = surfaces.size() - 1; i > 0; i-- ) for ( int i = surfaces.size() - 1; i > 0; i-- )
{ {
Surface one = surfaces.get( i ); Surface one = surfaces.get( i );
...@@ -324,36 +324,6 @@ public class SurfacesExtraction ...@@ -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. * Displays the local maximums found using jzy3D package.
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment