diff --git a/src/main/java/fr/pasteur/ida/zellige/utils/test/ZelligePipelineAnalyse.java b/src/main/java/fr/pasteur/ida/zellige/utils/test/ZelligePipelineAnalyse.java index f2a3b9b22b737383f9567da6c845ee1d1208e3ac..520a4fff5748cab04e8b22ec49fcafeb9a847066 100644 --- a/src/main/java/fr/pasteur/ida/zellige/utils/test/ZelligePipelineAnalyse.java +++ b/src/main/java/fr/pasteur/ida/zellige/utils/test/ZelligePipelineAnalyse.java @@ -61,69 +61,69 @@ public class ZelligePipelineAnalyse< T extends RealType< T > & NativeType< T >, } @SuppressWarnings( { "unchecked", "rawtypes" } ) - public void run( final ZParameters parameters, final Img< R > tested, final ArrayList< Img > GT ) throws Exception - { - long startTime = System.currentTimeMillis(); - ImgFactory< R > factory = tested.factory(); - - extraction = new ReferenceSurfaceExtraction<>(); - long extractionStartTime = System.currentTimeMillis(); - extraction.select(tested, parameters.getPretreatmentParameters(), parameters.getClassificationParameters(), parameters.getPostTreatmentParameters() ); - long extractionStopTime = System.currentTimeMillis(); - selectionProcessingTime = extractionStopTime - extractionStartTime; - LOGGER.debug( "Extraction processing time : {} ms", selectionProcessingTime ); - selectedPixelNumber = getPixelNumber( extraction.getMaximums() ); - int index = 0; - long stopTime = 0; - try - { - extractionStartTime = System.currentTimeMillis(); - extraction.construct(tested, factory, parameters.getConstructionParameters() ); - stopTime = System.currentTimeMillis(); - constructionProcessingTime = stopTime - extractionStartTime; - LOGGER.debug( "Construction processing time : {} ms", constructionProcessingTime ); - ArrayList< ReferenceSurface< R > > surfaces = extraction.getReferenceSurfaces(); - - for ( Img refImage : GT )// Parsing of GT list. - { - index++; - ArrayList< RMSEAndCoverageComputation< T, UnsignedShortType > > tempList = new ArrayList<>(); - for ( ReferenceSurface< R > rf : surfaces )// Test of each reconstructed surface - { - RMSEAndCoverageComputation< T, UnsignedShortType > errors = - new RMSEAndCoverageComputation<>( refImage, index, rf.getzMap() ); - errors.compute(); - tempList.add( errors ); - } - RMSEAndCoverageComputation< T, UnsignedShortType > finalError = findRightSurface( tempList ); - this.errorList.add( finalError ); - } - } - catch ( NotAnHeightMapException h ) - { - LOGGER.debug( " Exception raised for ref n°{} " , index ); - } - - catch ( NoSurfaceFoundException s ) - { - stopTime = System.currentTimeMillis(); - LOGGER.debug( "An NoSurfaceFoundException was raised" ); - constructionProcessingTime = stopTime - extractionStartTime; - for ( int i = 0; i < GT.size(); i++ ) - { - index++; - RMSEAndCoverageComputation< T, UnsignedShortType > errors = - new RMSEAndCoverageComputation<>( index ); - this.errorList.add( errors ); - } - LOGGER.debug( "Construction processing time : {} ms", constructionProcessingTime ); - } - catch ( Exception n ) - { - LOGGER.debug( "An {} was raised", n.getClass() ); - } - this.processingTime = ( stopTime - startTime ); - } +// public void run( final ZParameters parameters, final Img< R > tested, final ArrayList< Img > GT ) throws Exception +// { +// long startTime = System.currentTimeMillis(); +// ImgFactory< R > factory = tested.factory(); +// +// extraction = new ReferenceSurfaceExtraction<>(); +// long extractionStartTime = System.currentTimeMillis(); +// extraction.select(tested, parameters.getPretreatmentParameters(), parameters.getClassificationParameters(), parameters.getPostTreatmentParameters() ); +// long extractionStopTime = System.currentTimeMillis(); +// selectionProcessingTime = extractionStopTime - extractionStartTime; +// LOGGER.debug( "Extraction processing time : {} ms", selectionProcessingTime ); +// selectedPixelNumber = getPixelNumber( extraction.getMaximums() ); +// int index = 0; +// long stopTime = 0; +// try +// { +// extractionStartTime = System.currentTimeMillis(); +// extraction.construct(tested, factory, parameters.getConstructionParameters() ); +// stopTime = System.currentTimeMillis(); +// constructionProcessingTime = stopTime - extractionStartTime; +// LOGGER.debug( "Construction processing time : {} ms", constructionProcessingTime ); +// ArrayList< ReferenceSurface< R > > surfaces = extraction.getReferenceSurfaces(); +// +// for ( Img refImage : GT )// Parsing of GT list. +// { +// index++; +// ArrayList< RMSEAndCoverageComputation< T, UnsignedShortType > > tempList = new ArrayList<>(); +// for ( ReferenceSurface< R > rf : surfaces )// Test of each reconstructed surface +// { +// RMSEAndCoverageComputation< T, UnsignedShortType > errors = +// new RMSEAndCoverageComputation<>( refImage, index, rf.getzMap() ); +// errors.compute(); +// tempList.add( errors ); +// } +// RMSEAndCoverageComputation< T, UnsignedShortType > finalError = findRightSurface( tempList ); +// this.errorList.add( finalError ); +// } +// } +// catch ( NotAnHeightMapException h ) +// { +// LOGGER.debug( " Exception raised for ref n°{} " , index ); +// } +// +// catch ( NoSurfaceFoundException s ) +// { +// stopTime = System.currentTimeMillis(); +// LOGGER.debug( "An NoSurfaceFoundException was raised" ); +// constructionProcessingTime = stopTime - extractionStartTime; +// for ( int i = 0; i < GT.size(); i++ ) +// { +// index++; +// RMSEAndCoverageComputation< T, UnsignedShortType > errors = +// new RMSEAndCoverageComputation<>( index ); +// this.errorList.add( errors ); +// } +// LOGGER.debug( "Construction processing time : {} ms", constructionProcessingTime ); +// } +// catch ( Exception n ) +// { +// LOGGER.debug( "An {} was raised", n.getClass() ); +// } +// this.processingTime = ( stopTime - startTime ); +// } private int getPixelNumber( Img<FloatType> maximumCoordinates ) { diff --git a/src/main/resources/fr.pasteur.ida.zellige.gui.view/BatchModeDialog.fxml b/src/main/resources/fr.pasteur.ida.zellige.gui.view/BatchModeDialog.fxml index 31743e9ebb7cda9acdc78173b29930a51df3c241..a6bec8b8928751acc06513662bbd0c59c722bc7b 100644 --- a/src/main/resources/fr.pasteur.ida.zellige.gui.view/BatchModeDialog.fxml +++ b/src/main/resources/fr.pasteur.ida.zellige.gui.view/BatchModeDialog.fxml @@ -13,12 +13,16 @@ <HBox prefHeight="26.0" prefWidth="399.0" spacing="10"> <TextField fx:id="filePathField" editable="false" prefWidth="300" /> - <Button onAction="#handleBrowse" text="Browse" /> + <Button text="Browse" > + <onAction>#handleBrowse</onAction> + </Button> <padding> <Insets left="10.0" right="10.0" /> </padding> </HBox> - <Button onAction="#handleRun" text="Run" /> + <Button text="Run" > + <onAction>#handleRun</onAction> + </Button> </fx:root>