diff --git a/src/main/java/StartingOSStats.java b/src/main/java/StartingOSStats.java index 49b17e282b2aac9d179c6da92e81c8f388a6c845..82b35fef20e0a1bb6cc3fd84d780f6a4cc925e0b 100644 --- a/src/main/java/StartingOSStats.java +++ b/src/main/java/StartingOSStats.java @@ -1,5 +1,5 @@ import fr.pasteur.ida.zellige.surfaceConstruction.construction.SurfacesExtraction; -import fr.pasteur.ida.zellige.surfaceConstruction.element.os.OS; +import fr.pasteur.ida.zellige.surfaceConstruction.element.os.OSE; import fr.pasteur.ida.zellige.utils.TestMIP; import ij.IJ; import ij.ImageJ; @@ -9,7 +9,6 @@ import net.imglib2.img.Img; import net.imglib2.img.display.imagej.ImageJFunctions; import net.imglib2.type.NativeType; import net.imglib2.type.numeric.RealType; -import org.apache.commons.io.output.StringBuilderWriter; import java.io.BufferedWriter; import java.io.FileWriter; @@ -107,8 +106,8 @@ public class StartingOSStats } StartingOSStats startingOSStats = new StartingOSStats( fileName ); startingOSStats.writeParameter( args[ 0 ] , args[ 1 ] , args[ 2 ], args[ 3 ] ); - startingOSStats.writeInfo( "OS count ", OS.getCount() ); - startingOSStats.writeHistogram( OS.getOcc() ); + startingOSStats.writeInfo( "OS count ", OSE.getCount() ); +// startingOSStats.writeHistogram( OSE.getOcc() ); startingOSStats.close(); } } diff --git a/src/main/java/fr/pasteur/ida/zellige/jzy3D/OSDisplay.java b/src/main/java/fr/pasteur/ida/zellige/jzy3D/OSDisplay.java index 4df227ac1133eb6aa8b6bc4b9bbdf888035880ae..0c2152b73eca3a27115cc60d9ebec7efb7a58830 100644 --- a/src/main/java/fr/pasteur/ida/zellige/jzy3D/OSDisplay.java +++ b/src/main/java/fr/pasteur/ida/zellige/jzy3D/OSDisplay.java @@ -1,7 +1,7 @@ package fr.pasteur.ida.zellige.jzy3D; import fr.pasteur.ida.zellige.surfaceConstruction.element.Coordinate; -import fr.pasteur.ida.zellige.surfaceConstruction.element.os.OS; +import fr.pasteur.ida.zellige.surfaceConstruction.element.os.OSE; import fr.pasteur.ida.zellige.surfaceConstruction.element.os.OSList; import org.jzy3d.analysis.AbstractAnalysis; import org.jzy3d.chart.factories.AWTChartComponentFactory; @@ -26,7 +26,7 @@ public class OSDisplay extends AbstractAnalysis { public void init() { int count = 0; for (OSList osList : osLists) { - for (OS os : osList) { + for ( OSE os : osList) { count = count+os.size(); } } @@ -42,7 +42,7 @@ public class OSDisplay extends AbstractAnalysis { int index = 0; for (OSList osList : osLists) { - for (OS os : osList) { + for ( OSE os : osList) { // one color per OS float G = r.nextFloat() ; float R = r.nextFloat() ; diff --git a/src/main/java/fr/pasteur/ida/zellige/surfaceConstruction/construction/OSConstruction.java b/src/main/java/fr/pasteur/ida/zellige/surfaceConstruction/construction/OSConstruction.java index 7482f6645e37d883b14fe237d66062774d33d7ef..df468e813fadf5af7ca6305e5147d503f4b18d4c 100644 --- a/src/main/java/fr/pasteur/ida/zellige/surfaceConstruction/construction/OSConstruction.java +++ b/src/main/java/fr/pasteur/ida/zellige/surfaceConstruction/construction/OSConstruction.java @@ -2,12 +2,14 @@ package fr.pasteur.ida.zellige.surfaceConstruction.construction; import fr.pasteur.ida.zellige.surfaceConstruction.element.Coordinate; import fr.pasteur.ida.zellige.surfaceConstruction.element.Pixels; -import fr.pasteur.ida.zellige.surfaceConstruction.element.os.OS; +import fr.pasteur.ida.zellige.surfaceConstruction.element.os.OSE; +import fr.pasteur.ida.zellige.surfaceConstruction.element.os.OSEStartingStatus; import fr.pasteur.ida.zellige.surfaceConstruction.element.os.OSList; import java.util.ArrayList; import java.util.LinkedList; import java.util.Queue; +import java.util.TreeMap; /** @@ -21,22 +23,22 @@ public class OSConstruction * local maximums on a array of {@link }. * * @param rawCoordinates - the raw Coordinates from the projection. - * @return all the orthogonal surfaces for the projection as an {@link ArrayList<OS>}. + * @return all the orthogonal surfaces for the projection as an {@link ArrayList< OSE >}. */ - public static OSList findOS( Pixels[] rawCoordinates, int dimension ) + public static OSList findOS( Pixels[] rawCoordinates, int dimension , OSEStartingStatus startingStatus) { if ( dimension == 1 ) { reset( rawCoordinates );// the number of right and left coordinates are reset to 0. } ArrayList < Coordinate > startingCoordinates = checkForSideCoordinates( rawCoordinates ); - OSList paths = findSimplePaths( startingCoordinates, rawCoordinates, dimension ); + OSList paths = findSimplePaths( startingCoordinates, rawCoordinates, dimension, startingStatus ); OSList finalPaths = findComplexPaths( paths, dimension ); if ( dimension == 0 ) { finalPaths.removeIf( os -> os.size() < 3 );// shortest ones are removed } - for (OS os : finalPaths ) + for ( OSE os : finalPaths ) { os.set(dimension); } @@ -45,7 +47,7 @@ public class OSConstruction } private static OSList findSimplePaths (ArrayList< Coordinate> startingCoordinates, Pixels[] rawCoordinates, - int dimension) + int dimension, OSEStartingStatus occurrence) { Queue < Coordinate > firstQueue = new LinkedList <>( startingCoordinates );// Add the coordinates with no left coordinates in // the queue @@ -53,7 +55,7 @@ public class OSConstruction while ( !firstQueue.isEmpty() ) { Coordinate current = firstQueue.remove(); - OS os = new OS(); + OSE os = new OSE(occurrence); os.add( current ); findSimplePaths( rawCoordinates, smallPath, os, current, dimension, firstQueue ); } @@ -69,7 +71,7 @@ public class OSConstruction */ private static void findSimplePaths ( Pixels[] rawCoordinates, - ArrayList < OS > smallPath, OS os, Coordinate current, int dimension, Queue < Coordinate > queue ) + ArrayList < OSE > smallPath, OSE os, Coordinate current, int dimension, Queue < Coordinate > queue ) { int i; if ( dimension == 0 ) @@ -128,10 +130,10 @@ public class OSConstruction private static OSList findComplexPaths( OSList shortPaths, int dimension ) { OSList paths = new OSList(); - Queue < OS > queue = new LinkedList <>( shortPaths ); + Queue < OSE > queue = new LinkedList <>( shortPaths ); while ( !queue.isEmpty() ) { - OS first = queue.remove(); + OSE first = queue.remove(); shortPaths.remove( first ); findComplexPaths( first, shortPaths, queue, paths, dimension ); } @@ -145,11 +147,11 @@ public class OSConstruction * @param longPaths - the list of long path OS. * @param dimension - the dimension considered. */ - private static void findComplexPaths( OS first, - ArrayList < OS > smallPaths, - Queue < OS > queue, ArrayList < OS > longPaths, int dimension ) + private static void findComplexPaths( OSE first, + ArrayList < OSE > smallPaths, + Queue < OSE > queue, ArrayList < OSE > longPaths, int dimension ) { - for ( OS o : smallPaths ) + for ( OSE o : smallPaths ) { if ( first.isNextTo( o, dimension ) ) { @@ -158,7 +160,7 @@ public class OSConstruction queue.remove( o ); } } - smallPaths.removeIf( OS::isVisited ); + smallPaths.removeIf( OSE::isVisited ); longPaths.add( first ); } 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 3f00fd1fe183795a6ab207543bbe4286bc8027c7..c09640f62a86b4666ce579901a13292ed4bbb180 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 @@ -2,6 +2,8 @@ package fr.pasteur.ida.zellige.surfaceConstruction.construction; import java.util.ArrayList; +import fr.pasteur.ida.zellige.surfaceConstruction.element.os.OSE; +import fr.pasteur.ida.zellige.surfaceConstruction.element.os.OSEStartingStatus; import fr.pasteur.ida.zellige.utils.*; import org.jzy3d.analysis.AnalysisLauncher; @@ -12,7 +14,6 @@ import fr.pasteur.ida.zellige.jzy3D.OSDisplay; import fr.pasteur.ida.zellige.jzy3D.SurfaceDisplay; import fr.pasteur.ida.zellige.surfaceConstruction.element.Pixels; import fr.pasteur.ida.zellige.surfaceConstruction.element.Surface; -import fr.pasteur.ida.zellige.surfaceConstruction.element.os.OS; import fr.pasteur.ida.zellige.surfaceConstruction.element.os.OSList; import fr.pasteur.ida.zellige.surfaceConstruction.element.surfaceLine.SurfaceLine; import net.imglib2.img.Img; @@ -22,6 +23,7 @@ import net.imglib2.type.logic.BitType; import net.imglib2.type.numeric.RealType; import net.imglib2.type.numeric.integer.UnsignedShortType; +import java.util.TreeMap; import java.util.TreeSet; public class SurfacesExtraction @@ -127,23 +129,27 @@ public class SurfacesExtraction * @param maximums - the local maximums found with the {@link LocalMaximumDetection} class. * @param osListsArray - the OS corresponding to a 1D surface. */ - private static void set( Pixels[][] maximums, OSList[] osListsArray, int dimension ) + private static void set( Pixels[][] maximums, OSList[] osListsArray, int dimension, OSEStartingStatus startingStatus ) { + + for ( int i = 0; i <= maximums.length - 1; i++ ) { - osListsArray[ i ] = OSConstruction.findOS( maximums[ i ], dimension ); + osListsArray[ i ] = OSConstruction.findOS( maximums[ i ], dimension , startingStatus); } + startingStatus.setStartingStatus( ); } /* ----- First and second round construction methods. ----- */ private static ArrayList< Surface > firstRoundConstruction( Pixels[][] maximums ) throws NoSurfaceFoundException { + int dimension = 0; // Setting and storage of the OS build in the X dimension according to the user thresholds settings. + OSEStartingStatus startingStatus = new OSEStartingStatus( dimension ); OSList[] osListsArrayX = new OSList[ Y ]; - set( maximums, osListsArrayX, 0 ); - OS.setStartingStatus( 0 ); + set( maximums, osListsArrayX, dimension, startingStatus ); // displayOS(osListsArrayX); - System.out.println( "OS.count = " + OS.getCount() ); + System.out.println( "OS.count = " + OSE.getCount() ); /* Construction of the tempSurfaces*/ ArrayList< Surface > surfaces = SurfacesReconstruction.buildSurfaces( 0, osListsArrayX ); @@ -190,9 +196,11 @@ public class SurfacesExtraction */ private static void transposeSurfaceLines( Surface surface, OSList[] osListsArrayY ) { + int dimension = 1; Pixels[][] pixels = rebuildPixelsArray( surface ); /* OS construction in dimension Y.*/ - set( pixels, osListsArrayY, 1 ); + OSEStartingStatus startingStatus = new OSEStartingStatus( dimension ); + set( pixels, osListsArrayY, dimension, startingStatus ); } @@ -216,8 +224,8 @@ public class SurfacesExtraction OSList[] osListsArrayY = new OSList[ X ]; transposeSurfaceLines( surface, osListsArrayY ); - OS.setStartingStatus( 1 ); - System.out.println( "OS.count = " + OS.getCount() ); + OSE.setStartingStatus( 1 ); + System.out.println( "OS.count = " + OSE.getCount() ); // displayOS( osListsArrayY ); ArrayList< Surface > temps = SurfacesReconstruction.buildSurfaces( 1, osListsArrayY ); diff --git a/src/main/java/fr/pasteur/ida/zellige/surfaceConstruction/construction/SurfacesReconstruction.java b/src/main/java/fr/pasteur/ida/zellige/surfaceConstruction/construction/SurfacesReconstruction.java index 4d2b1dd0cc9d14af1477607b53c3fb248fa35726..a10484615519ee6bf01a7563f95e4eb454195fae 100644 --- a/src/main/java/fr/pasteur/ida/zellige/surfaceConstruction/construction/SurfacesReconstruction.java +++ b/src/main/java/fr/pasteur/ida/zellige/surfaceConstruction/construction/SurfacesReconstruction.java @@ -1,7 +1,7 @@ package fr.pasteur.ida.zellige.surfaceConstruction.construction; -import fr.pasteur.ida.zellige.surfaceConstruction.element.os.OS; +import fr.pasteur.ida.zellige.surfaceConstruction.element.os.OSE; import fr.pasteur.ida.zellige.surfaceConstruction.element.os.OSList; import fr.pasteur.ida.zellige.surfaceConstruction.element.Surface; import fr.pasteur.ida.zellige.surfaceConstruction.element.surfaceLine.SurfaceLine; @@ -36,11 +36,11 @@ public class SurfacesReconstruction // All the OSLists are set to "not visited". reset( osLists ); int startingIndex = finalIndex; - OS firstOS = getFirstOs( osLists, finalIndex ); + OSE firstOSE = getFirstOs( osLists, finalIndex ); // osLists[finalIndex].remove( firstOS );//TODO remove or not - if ( firstOS != null ) + if ( firstOSE != null ) { - Surface surface = createSurface( firstOS, dimension ); + Surface surface = createSurface( firstOSE, dimension ); buildSurface( osLists, surface, finalIndex ); //it is really a reference surface ? if ( surface.getSize() >= SurfacesExtraction.getX() * SurfacesExtraction.getY() * 0.01 ) @@ -59,7 +59,7 @@ public class SurfacesReconstruction && ( osLists[ finalIndex ] != null && ! osLists[ finalIndex ].isEmpty() && osLists[ finalIndex ].containsAStart() ) ); - System.out.println( "Starting size = " + OS.getStartingSize()); + System.out.println( "Starting size = " + OSE.getStartingSize()); System.out.println( "smallSurfaceCount = " + smallSurfaceCount ); return surfaces; } @@ -132,24 +132,24 @@ public class SurfacesReconstruction /** - * @param firstOS - the first surface element. + * @param firstOSE - the first surface element. * @param dimension - the construction dimension * @return a surface as a {@link Surface} */ - private static Surface createSurface( OS firstOS, int dimension ) + private static Surface createSurface( OSE firstOSE, int dimension ) { Surface surface = new Surface( dimension ); int i; if ( dimension == 0 ) { - i = firstOS.get( 0 ).getY(); - surface.set( i, new SurfaceLineX( firstOS ) ); + i = firstOSE.get( 0 ).getY(); + surface.set( i, new SurfaceLineX( firstOSE ) ); } else { - i = firstOS.get( 0 ).getX(); - surface.set( i, new SurfaceLineY( firstOS ) ); + i = firstOSE.get( 0 ).getX(); + surface.set( i, new SurfaceLineY( firstOSE ) ); } return surface; } @@ -195,9 +195,9 @@ public class SurfacesReconstruction * @param index - the previous index value * @return the first OS with a true Start status */ - private static OS getFirstOs( OSList[] osLists, int index ) + private static OSE getFirstOs( OSList[] osLists, int index ) { - for ( OS os : osLists[ index ] ) + for ( OSE os : osLists[ index ] ) { if ( os.isAStart() ) { @@ -231,7 +231,7 @@ public class SurfacesReconstruction k = 5; } ArrayList< SurfaceLine > list = new ArrayList<>(); - for ( OS os : next ) + for ( OSE os : next ) { if ( ! os.isVisited() ) // The OS is already added to the referenceSurface diff --git a/src/main/java/fr/pasteur/ida/zellige/surfaceConstruction/element/os/OSE.java b/src/main/java/fr/pasteur/ida/zellige/surfaceConstruction/element/os/OSE.java index bec418f7cfc06e231170ad1782bc6b49bd47e8c8..db4332f6ed6612c9fbe91d4b5c26185449fe66b8 100644 --- a/src/main/java/fr/pasteur/ida/zellige/surfaceConstruction/element/os/OSE.java +++ b/src/main/java/fr/pasteur/ida/zellige/surfaceConstruction/element/os/OSE.java @@ -13,7 +13,7 @@ public class OSE extends ArrayList< Coordinate > private static TreeSet <Integer> list = new TreeSet<>(); private static TreeMap<Integer, Integer> occ = new TreeMap<>(); private static int startingSize; - + private OSEStartingStatus startingStatus; /* Not necessary for the program.*/ private static int count = 0; @@ -30,6 +30,10 @@ public class OSE extends ArrayList< Coordinate > */ private boolean start = true; + public OSE(OSEStartingStatus startingStatus ) + { + this.startingStatus = startingStatus; + } /** * Sets the start status to false if the size is inferior to the OS start minimum size. @@ -51,7 +55,7 @@ public class OSE extends ArrayList< Coordinate > public void set( int dimension ) { list.add( this.size() ); - Integer j = occ.get(this.size() ); + Integer j = startingStatus.get(this.size() ); /* Not necessary for the program.*/ this.name = count; @@ -59,8 +63,8 @@ public class OSE extends ArrayList< Coordinate > sizeSum = sizeSum + this.size(); count++; - if(dimension == 0) - occ.put( this.size(), ( j == null ) ? 1 : j + 1 ); +// if(dimension == 0) + startingStatus.put( this.size(), ( j == null ) ? 1 : j + 1 ); @@ -149,10 +153,13 @@ public class OSE extends ArrayList< Coordinate > */ public boolean isAStart() { - return (this.size() >= startingSize && start); + return (this.size() >= this.startingStatus.getMinimumSize() && start); } - + public boolean isAStart(int minimumSize) + { + return (this.size() >= this.startingStatus.getMinimumSize() && start); + } /* Not necessary for the program.*/ public String toString() @@ -201,9 +208,9 @@ public static void setStartingStatus(int dimension) OSE.count = count; } - public static TreeMap< Integer, Integer > getOcc() + public TreeMap< Integer, Integer > getOcc() { - return occ; + return startingStatus; } public static int getStartingSize() diff --git a/src/main/java/fr/pasteur/ida/zellige/surfaceConstruction/element/os/OSEStartingStatus.java b/src/main/java/fr/pasteur/ida/zellige/surfaceConstruction/element/os/OSEStartingStatus.java new file mode 100644 index 0000000000000000000000000000000000000000..5db398b68a8e150d2b07010be1df6668c2811d17 --- /dev/null +++ b/src/main/java/fr/pasteur/ida/zellige/surfaceConstruction/element/os/OSEStartingStatus.java @@ -0,0 +1,46 @@ +package fr.pasteur.ida.zellige.surfaceConstruction.element.os; + +import java.util.Set; +import java.util.TreeMap; +import java.util.TreeSet; + +public class OSEStartingStatus extends TreeMap<Integer, Integer> +{ + private int dimension; + private int minimumSize; + + public OSEStartingStatus( int dimension ) + { + this.dimension = dimension; + } + + public void setStartingStatus() + { + //TODO user parameter ? + + if (this.size() != 0) + { + + if ( dimension == 0 ) + { + for ( int i = 0; this.size() > 20 && i <= this.size()* 0.75 ;i++ ) + { + this.remove( this.lastKey() ); + } + } + else + { + for ( int i = 0; this.size() > 2 && i <= this.size() / 10; i++ ) + { + this.remove( this.lastKey() ); + } + } + this.minimumSize = this.lastKey() ; + + }} + + public int getMinimumSize() + { + return minimumSize; + } +} diff --git a/src/main/java/fr/pasteur/ida/zellige/surfaceConstruction/element/os/OSList.java b/src/main/java/fr/pasteur/ida/zellige/surfaceConstruction/element/os/OSList.java index 074358f4c632fb0dd4a0ee15c8f46510b417815f..1bfe8bc40680120bf0ca0ecf84f478cf503d16f2 100644 --- a/src/main/java/fr/pasteur/ida/zellige/surfaceConstruction/element/os/OSList.java +++ b/src/main/java/fr/pasteur/ida/zellige/surfaceConstruction/element/os/OSList.java @@ -4,9 +4,9 @@ import java.util.ArrayList; import java.util.Collection; /** - * An OSList object is simply an ArrayList of {@link OS} + * An OSList object is simply an ArrayList of {@link OSE} */ -public class OSList extends ArrayList < OS > +public class OSList extends ArrayList < OSE > { @@ -15,7 +15,7 @@ public class OSList extends ArrayList < OS > } @Override - public boolean add( OS os ) + public boolean add( OSE os ) { if ( this.contains( os ) ) { @@ -28,10 +28,10 @@ public class OSList extends ArrayList < OS > } @Override - public boolean addAll( Collection < ? extends OS > c ) + public boolean addAll( Collection < ? extends OSE > c ) { boolean add = false; - for ( OS os : c ) + for ( OSE os : c ) { add = add( os ); } @@ -42,7 +42,7 @@ public class OSList extends ArrayList < OS > public int getSize( ) { int size = 0; - for ( OS os : this ) + for ( OSE os : this ) { size = size + os.size(); } @@ -65,7 +65,7 @@ public class OSList extends ArrayList < OS > public void reset( ) { - for ( OS os : this ) + for ( OSE os : this ) { os.setVisited( false ); } @@ -73,7 +73,7 @@ public class OSList extends ArrayList < OS > public boolean containsAStart( ) { - for ( OS os : this ) + for ( OSE os : this ) { if ( os.isAStart() ) { diff --git a/src/main/java/fr/pasteur/ida/zellige/surfaceConstruction/element/surfaceLine/SurfaceLine.java b/src/main/java/fr/pasteur/ida/zellige/surfaceConstruction/element/surfaceLine/SurfaceLine.java index 7342315ac08216c194163ec2473dd3242c136a43..8b09c05c6dcd7f7cb1fadae26a44ee5ab0e13d95 100644 --- a/src/main/java/fr/pasteur/ida/zellige/surfaceConstruction/element/surfaceLine/SurfaceLine.java +++ b/src/main/java/fr/pasteur/ida/zellige/surfaceConstruction/element/surfaceLine/SurfaceLine.java @@ -2,7 +2,7 @@ package fr.pasteur.ida.zellige.surfaceConstruction.element.surfaceLine; import fr.pasteur.ida.zellige.surfaceConstruction.element.Coordinate; import fr.pasteur.ida.zellige.surfaceConstruction.element.Pixels; -import fr.pasteur.ida.zellige.surfaceConstruction.element.os.OS; +import fr.pasteur.ida.zellige.surfaceConstruction.element.os.OSE; import fr.pasteur.ida.zellige.surfaceConstruction.construction.SurfacesExtraction; public abstract class SurfaceLine @@ -38,19 +38,19 @@ public abstract class SurfaceLine * * @param os - a list of Coordinates to fill the pixel array. */ - public SurfaceLine( OS os ) + public SurfaceLine( OSE os ) { this.dimension = new Pixels[ this.getLength()] ; set( os ); } - public SurfaceLine( OS os, int size ) + public SurfaceLine( OSE os, int size ) { this.dimension = new Pixels[ size] ; set( os ); } - public void set( OS os ) + public void set( OSE os ) { for ( Coordinate coordinate : os ) { @@ -76,7 +76,7 @@ public abstract class SurfaceLine * @param matched - the minimum number of matching coordinates. * @return - a new SurfaceLine if there is a match, null otherwise. */ - public abstract SurfaceLine match( OS os, int j, double percent, int matched ); + public abstract SurfaceLine match( OSE os, int j, double percent, int matched ); /** diff --git a/src/main/java/fr/pasteur/ida/zellige/surfaceConstruction/element/surfaceLine/SurfaceLineX.java b/src/main/java/fr/pasteur/ida/zellige/surfaceConstruction/element/surfaceLine/SurfaceLineX.java index bc1916266a0b30c0358881e9dfecde1a139da311..459ebb39043c8c88ba6bc7ffe159c414f531891f 100644 --- a/src/main/java/fr/pasteur/ida/zellige/surfaceConstruction/element/surfaceLine/SurfaceLineX.java +++ b/src/main/java/fr/pasteur/ida/zellige/surfaceConstruction/element/surfaceLine/SurfaceLineX.java @@ -1,7 +1,7 @@ package fr.pasteur.ida.zellige.surfaceConstruction.element.surfaceLine; import fr.pasteur.ida.zellige.surfaceConstruction.element.Coordinate; -import fr.pasteur.ida.zellige.surfaceConstruction.element.os.OS; +import fr.pasteur.ida.zellige.surfaceConstruction.element.os.OSE; public class SurfaceLineX extends SurfaceLine { @@ -12,7 +12,7 @@ public class SurfaceLineX extends SurfaceLine * * @param os - a list of Coordinates to fill the pixel array. */ - public SurfaceLineX( OS os ) + public SurfaceLineX( OSE os ) { super( os ); this.setLine( os.get( 0 ).getY() ); @@ -28,7 +28,7 @@ public class SurfaceLineX extends SurfaceLine super( line ); } - public SurfaceLineX( OS os, int size ) + public SurfaceLineX( OSE os, int size ) { super( os , size); this.setLine( os.get( 0 ).getY() ); @@ -42,7 +42,7 @@ public class SurfaceLineX extends SurfaceLine * @param matched - the minimum number of matching coordinates. * @return - a new SurfaceLine if there is a match, null otherwise. */ - public SurfaceLine match( OS os, int j, double percent, int matched ) + public SurfaceLine match( OSE os, int j, double percent, int matched ) { SurfaceLineX surfaceLine = new SurfaceLineX( this.getLine() + j ); int match = 0; diff --git a/src/main/java/fr/pasteur/ida/zellige/surfaceConstruction/element/surfaceLine/SurfaceLineY.java b/src/main/java/fr/pasteur/ida/zellige/surfaceConstruction/element/surfaceLine/SurfaceLineY.java index f2904b34d69b3837757ea754a08ec586c9759bed..25a5efea9bddd3d4362fda7bc2af81d8eda8bbaa 100644 --- a/src/main/java/fr/pasteur/ida/zellige/surfaceConstruction/element/surfaceLine/SurfaceLineY.java +++ b/src/main/java/fr/pasteur/ida/zellige/surfaceConstruction/element/surfaceLine/SurfaceLineY.java @@ -1,7 +1,7 @@ package fr.pasteur.ida.zellige.surfaceConstruction.element.surfaceLine; import fr.pasteur.ida.zellige.surfaceConstruction.element.Coordinate; -import fr.pasteur.ida.zellige.surfaceConstruction.element.os.OS; +import fr.pasteur.ida.zellige.surfaceConstruction.element.os.OSE; public class SurfaceLineY extends SurfaceLine { @@ -11,7 +11,7 @@ public class SurfaceLineY extends SurfaceLine * * @param os - a list of Coordinates to fill the pixel array. */ - public SurfaceLineY( OS os ) + public SurfaceLineY( OSE os ) { super( os ); this.setLine( os.get( 0 ).getX() ); @@ -37,7 +37,7 @@ public class SurfaceLineY extends SurfaceLine * @param matched - the minimum number of matching coordinates. * @return - a new SurfaceLine if there is a match, null otherwise. */ - public SurfaceLine match( OS os, int j, double percent, int matched ) + public SurfaceLine match( OSE os, int j, double percent, int matched ) { SurfaceLineY surfaceLine = new SurfaceLineY( this.getLine() + j ); int match = 0;