Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 10-multi-channel-image-handling
  • 25-multithreads-heavy-tasks
  • 9-gui-features
  • dev
  • dev-batch-mode
  • dev-display
  • master
  • median-3d
  • Cnam
  • zellige-core-1.0.0
  • zellige-core-1.1.0
  • zellige-core-1.1.1
  • zellige-core-1.1.3
13 results

Target

Select target project
  • ida-public/zellige-core
1 result
Select Git revision
  • 10-multi-channel-image-handling
  • 25-multithreads-heavy-tasks
  • 9-gui-features
  • dev
  • dev-batch-mode
  • dev-display
  • master
  • median-3d
  • Cnam
  • zellige-core-1.0.0
  • zellige-core-1.1.0
  • zellige-core-1.1.1
  • zellige-core-1.1.3
13 results
Show changes
Showing
with 482 additions and 508 deletions
...@@ -88,7 +88,7 @@ public class OSEListDisplay extends AbstractAnalysis ...@@ -88,7 +88,7 @@ public class OSEListDisplay extends AbstractAnalysis
} }
Coord3d[] points = new Coord3d[ count ]; Coord3d[] points = new Coord3d[ count ];
Color[] colors = new Color[ count ]; Color[] colors = new Color[ count ];
LOGGER.debug( "count : " + count ); LOGGER.debug( "count : {}", count );
Random r = new Random(); Random r = new Random();
r.setSeed( 50 ); r.setSeed( 50 );
float x; float x;
......
...@@ -121,7 +121,7 @@ public class SurfaceDisplay extends AbstractAnalysis ...@@ -121,7 +121,7 @@ public class SurfaceDisplay extends AbstractAnalysis
} }
} }
LOGGER.debug( System.lineSeparator() ); LOGGER.debug( System.lineSeparator() );
LOGGER.debug( "Number of duplicate = " + size ); LOGGER.debug( "Number of duplicate = {}", size );
Scatter scatter = new Scatter( points, colors ); Scatter scatter = new Scatter( points, colors );
scatter.setWidth( 1 ); scatter.setWidth( 1 );
chart = AWTChartComponentFactory.chart( Quality.Advanced, "newt" ); chart = AWTChartComponentFactory.chart( Quality.Advanced, "newt" );
......
...@@ -54,7 +54,7 @@ public class CSVWriter ...@@ -54,7 +54,7 @@ public class CSVWriter
try try
{ {
bw = new BufferedWriter( new FileWriter( csvOutputFile, true ) ); bw = new BufferedWriter( new FileWriter( csvOutputFile, true ) );
LOGGER.debug( "CSV location : " + "target/" + testedFileName + EXTENSION ); LOGGER.debug( "CSV location : target/{}" + EXTENSION, testedFileName );
} }
catch ( IOException ioException ) catch ( IOException ioException )
{ {
......
...@@ -217,8 +217,8 @@ public class RMSEAndCoverageComputation< T extends RealType< T > & NativeType< T ...@@ -217,8 +217,8 @@ public class RMSEAndCoverageComputation< T extends RealType< T > & NativeType< T
ImageJFunctions.show( HM ); ImageJFunctions.show( HM );
RMSEAndCoverageComputation< FloatType, FloatType > computation = new RMSEAndCoverageComputation<>( GT, 0, HM ); RMSEAndCoverageComputation< FloatType, FloatType > computation = new RMSEAndCoverageComputation<>( GT, 0, HM );
computation.compute(); computation.compute();
LOGGER.debug( "RMSE = " + computation.RMSE ); LOGGER.debug( "RMSE = {}", computation.RMSE );
LOGGER.debug( "Coverage = " + computation.coverage ); LOGGER.debug( "Coverage = {}", computation.coverage );
} }
} }
......
...@@ -31,6 +31,7 @@ package fr.pasteur.ida.zellige.utils.test; ...@@ -31,6 +31,7 @@ package fr.pasteur.ida.zellige.utils.test;
import fr.pasteur.ida.zellige.ReferenceSurfaceExtraction; import fr.pasteur.ida.zellige.ReferenceSurfaceExtraction;
import fr.pasteur.ida.zellige.steps.construction.rounds.ConstructionParameters; import fr.pasteur.ida.zellige.steps.construction.rounds.ConstructionParameters;
import fr.pasteur.ida.zellige.steps.projection.ProjectionParameters; import fr.pasteur.ida.zellige.steps.projection.ProjectionParameters;
import fr.pasteur.ida.zellige.steps.selection.SelectionParameters;
import fr.pasteur.ida.zellige.steps.selection.classification.ClassificationParameters; import fr.pasteur.ida.zellige.steps.selection.classification.ClassificationParameters;
import fr.pasteur.ida.zellige.steps.selection.exception.DataValidationException; import fr.pasteur.ida.zellige.steps.selection.exception.DataValidationException;
import fr.pasteur.ida.zellige.steps.selection.postTreatment.PostTreatmentParameters; import fr.pasteur.ida.zellige.steps.selection.postTreatment.PostTreatmentParameters;
...@@ -44,10 +45,9 @@ public class ZParameters ...@@ -44,10 +45,9 @@ public class ZParameters
private final static Logger LOGGER = LoggerFactory.getLogger( ZParameters.class ); private final static Logger LOGGER = LoggerFactory.getLogger( ZParameters.class );
private final PretreatmentParameters pretreatmentParameters; private final PretreatmentParameters pretreatmentParameters;
private final ClassificationParameters classificationParameters; private final SelectionParameters selectionParameters;
private final PostTreatmentParameters postTreatmentParameters;
private final ConstructionParameters[] constructionParameters; private final ConstructionParameters[] constructionParameters;
private final ProjectionParameters projectionParameters;
public ZParameters( String filter, int filterParameter, public ZParameters( String filter, int filterParameter,
...@@ -58,14 +58,13 @@ public class ZParameters ...@@ -58,14 +58,13 @@ public class ZParameters
double startingThreshold2, int overlap2, double connexityRate2, double startingThreshold2, int overlap2, double connexityRate2,
double surfaceMinSizeFactor, int delta ) throws DataValidationException double surfaceMinSizeFactor, int delta ) throws DataValidationException
{ {
pretreatmentParameters = new PretreatmentParameters( filter, filterParameter ); pretreatmentParameters = new PretreatmentParameters( 1, 3);
classificationParameters = new ClassificationParameters( amplitudeThreshold, otsuThreshold ); selectionParameters = new SelectionParameters( amplitudeThreshold, otsuThreshold, XYSmoothing, ZSmoothing, ISSize );
postTreatmentParameters = new PostTreatmentParameters( XYSmoothing, ZSmoothing, ISSize, ISConnexity );
constructionParameters = new ConstructionParameters[]{ constructionParameters = new ConstructionParameters[]{
new ConstructionParameters( startingThreshold1, overlap1, connexityRate1, surfaceMinSizeFactor ), new ConstructionParameters( startingThreshold1, overlap1, connexityRate1, surfaceMinSizeFactor ),
new ConstructionParameters( startingThreshold2, overlap2, connexityRate2, surfaceMinSizeFactor ) }; new ConstructionParameters( startingThreshold2, overlap2, connexityRate2, surfaceMinSizeFactor ) };
projectionParameters = new ProjectionParameters( delta, "MIP" ); //projectionParameters = new ProjectionParameters( delta, 0, "MIP" );
} }
...@@ -74,14 +73,9 @@ public class ZParameters ...@@ -74,14 +73,9 @@ public class ZParameters
return pretreatmentParameters; return pretreatmentParameters;
} }
public ClassificationParameters getClassificationParameters() public SelectionParameters getSelectionParameters()
{
return classificationParameters;
}
public PostTreatmentParameters getPostTreatmentParameters()
{ {
return postTreatmentParameters; return selectionParameters;
} }
public ConstructionParameters[] getConstructionParameters() public ConstructionParameters[] getConstructionParameters()
...@@ -89,28 +83,27 @@ public class ZParameters ...@@ -89,28 +83,27 @@ public class ZParameters
return constructionParameters; return constructionParameters;
} }
public ProjectionParameters getProjectionParameters() // public ProjectionParameters getProjectionParameters()
{ // {
return projectionParameters; // return projectionParameters;
} // }
public void print() public void print()
{ {
LOGGER.debug( "method : " + pretreatmentParameters.getMethod() );
LOGGER.debug( "parameter : " + pretreatmentParameters.getParameter() ); LOGGER.debug( "parameter : {}", pretreatmentParameters.getRadius() );
LOGGER.debug( "amplitude : " + classificationParameters.getAmplitudeThreshold() ); LOGGER.debug( "amplitude : {}", selectionParameters.getAmplitude());
LOGGER.debug( "threshold : " + classificationParameters.getOtsuThreshold() ); LOGGER.debug( "otsu : {}", selectionParameters.getOtsu() );
LOGGER.debug( "connexity : " + postTreatmentParameters.getConnexity() ); LOGGER.debug( "island size : {}", selectionParameters.getIsland() );
LOGGER.debug( "island size : " + postTreatmentParameters.getIslandSize() ); LOGGER.debug( "sigmaXY : {}", selectionParameters.getXyBlur());
LOGGER.debug( "sigmaXY : " + postTreatmentParameters.getSigmaXY() ); LOGGER.debug( "sigmaZ : {}", selectionParameters.getzBlur() );
LOGGER.debug( "sigmaZ : " + postTreatmentParameters.getSigmaZ() ); LOGGER.debug( "starting os size1 : {}", constructionParameters[ 0 ].getStartingSizeThreshold() );
LOGGER.debug( "starting os size1 : " + constructionParameters[ 0 ].getStartingSizeThreshold() ); LOGGER.debug( "overlap1 :{}", constructionParameters[ 0 ].getOverlap() );
LOGGER.debug( "overlap1 :" + constructionParameters[ 0 ].getOverlap() ); LOGGER.debug( "percent1 :{}", constructionParameters[ 0 ].getConnexityRate() );
LOGGER.debug( "percent1 :" + constructionParameters[ 0 ].getConnexityRate() ); LOGGER.debug( "starting os size2 : {}", constructionParameters[ 1 ].getStartingSizeThreshold() );
LOGGER.debug( "starting os size2 : " + constructionParameters[ 1 ].getStartingSizeThreshold() ); LOGGER.debug( "overlap2 :{}", constructionParameters[ 1 ].getOverlap() );
LOGGER.debug( "overlap2 :" + constructionParameters[ 1 ].getOverlap() ); LOGGER.debug( "percent2 :{}", constructionParameters[ 1 ].getConnexityRate() );
LOGGER.debug( "percent2 :" + constructionParameters[ 1 ].getConnexityRate() ); LOGGER.debug( "adequacy : {}", ReferenceSurfaceExtraction.getAdequacy() );
LOGGER.debug( "adequacy : " + ReferenceSurfaceExtraction.getAdequacy() ); // LOGGER.debug( " Delta : {}", projectionParameters.getDelta() );
LOGGER.debug( " Delta : " + projectionParameters.getDelta() );
} }
} }
...@@ -29,16 +29,17 @@ ...@@ -29,16 +29,17 @@
package fr.pasteur.ida.zellige.utils.test; package fr.pasteur.ida.zellige.utils.test;
import fr.pasteur.ida.zellige.ReferenceSurfaceExtraction; import fr.pasteur.ida.zellige.ReferenceSurfaceExtraction;
import fr.pasteur.ida.zellige.element.Pixels;
import fr.pasteur.ida.zellige.element.ReferenceSurface; import fr.pasteur.ida.zellige.element.ReferenceSurface;
import fr.pasteur.ida.zellige.steps.construction.exception.NoSurfaceFoundException; import fr.pasteur.ida.zellige.steps.construction.exception.NoSurfaceFoundException;
import fr.pasteur.ida.zellige.steps.selection.Selection; import fr.pasteur.ida.zellige.steps.selection.Selection;
import fr.pasteur.ida.zellige.utils.test.exception.NotAnHeightMapException; import fr.pasteur.ida.zellige.utils.test.exception.NotAnHeightMapException;
import net.imglib2.Cursor;
import net.imglib2.img.Img; import net.imglib2.img.Img;
import net.imglib2.img.ImgFactory; import net.imglib2.img.ImgFactory;
import net.imglib2.type.NativeType; import net.imglib2.type.NativeType;
import net.imglib2.type.numeric.RealType; import net.imglib2.type.numeric.RealType;
import net.imglib2.type.numeric.integer.UnsignedShortType; import net.imglib2.type.numeric.integer.UnsignedShortType;
import net.imglib2.type.numeric.real.FloatType;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -65,10 +66,9 @@ public class ZelligePipelineAnalyse< T extends RealType< T > & NativeType< T >, ...@@ -65,10 +66,9 @@ public class ZelligePipelineAnalyse< T extends RealType< T > & NativeType< T >,
long startTime = System.currentTimeMillis(); long startTime = System.currentTimeMillis();
ImgFactory< R > factory = tested.factory(); ImgFactory< R > factory = tested.factory();
extraction = new ReferenceSurfaceExtraction<>( tested, factory extraction = new ReferenceSurfaceExtraction<>();
);
long extractionStartTime = System.currentTimeMillis(); long extractionStartTime = System.currentTimeMillis();
extraction.select( parameters.getPretreatmentParameters(), parameters.getClassificationParameters(), parameters.getPostTreatmentParameters() ); extraction.select(tested, parameters.getPretreatmentParameters(),parameters.getSelectionParameters() );
long extractionStopTime = System.currentTimeMillis(); long extractionStopTime = System.currentTimeMillis();
selectionProcessingTime = extractionStopTime - extractionStartTime; selectionProcessingTime = extractionStopTime - extractionStartTime;
LOGGER.debug( "Extraction processing time : {} ms", selectionProcessingTime ); LOGGER.debug( "Extraction processing time : {} ms", selectionProcessingTime );
...@@ -78,7 +78,7 @@ public class ZelligePipelineAnalyse< T extends RealType< T > & NativeType< T >, ...@@ -78,7 +78,7 @@ public class ZelligePipelineAnalyse< T extends RealType< T > & NativeType< T >,
try try
{ {
extractionStartTime = System.currentTimeMillis(); extractionStartTime = System.currentTimeMillis();
extraction.construct( parameters.getConstructionParameters() ); extraction.construct(tested, factory, parameters.getConstructionParameters() );
stopTime = System.currentTimeMillis(); stopTime = System.currentTimeMillis();
constructionProcessingTime = stopTime - extractionStartTime; constructionProcessingTime = stopTime - extractionStartTime;
LOGGER.debug( "Construction processing time : {} ms", constructionProcessingTime ); LOGGER.debug( "Construction processing time : {} ms", constructionProcessingTime );
...@@ -101,7 +101,7 @@ public class ZelligePipelineAnalyse< T extends RealType< T > & NativeType< T >, ...@@ -101,7 +101,7 @@ public class ZelligePipelineAnalyse< T extends RealType< T > & NativeType< T >,
} }
catch ( NotAnHeightMapException h ) catch ( NotAnHeightMapException h )
{ {
LOGGER.debug( " Exception raised for ref n° " + index ); LOGGER.debug( " Exception raised for ref n°{} " , index );
} }
catch ( NoSurfaceFoundException s ) catch ( NoSurfaceFoundException s )
...@@ -123,20 +123,17 @@ public class ZelligePipelineAnalyse< T extends RealType< T > & NativeType< T >, ...@@ -123,20 +123,17 @@ public class ZelligePipelineAnalyse< T extends RealType< T > & NativeType< T >,
LOGGER.debug( "An {} was raised", n.getClass() ); LOGGER.debug( "An {} was raised", n.getClass() );
} }
this.processingTime = ( stopTime - startTime ); this.processingTime = ( stopTime - startTime );
// extraction.project();
} }
private int getPixelNumber( Pixels[][] maximumCoordinates ) private int getPixelNumber( Img<FloatType> maximumCoordinates )
{ {
Cursor< FloatType> cursor = maximumCoordinates.cursor();
int n = 0; int n = 0;
for ( int i = 0; i <= maximumCoordinates[ 0 ].length - 1; i++ ) while (cursor.hasNext())
{ {
for ( int j = 0; j <= maximumCoordinates.length - 1; j++ ) if (cursor.next().get() > 0)
{ {
if ( maximumCoordinates[ j ][ i ] != null ) n ++;
{
n += maximumCoordinates[ j ][ i ].size();
}
} }
} }
return n; return n;
......
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<fx:root alignment="CENTER" prefHeight="151.0" prefWidth="439.0" spacing="10" type="VBox" xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1">
<Label text="Select a File" />
<HBox prefHeight="26.0" prefWidth="399.0" spacing="10">
<TextField fx:id="filePathField" editable="false" prefWidth="300" />
<Button fx:id="browse" text="Browse" />
<padding>
<Insets left="10.0" right="10.0" />
</padding>
</HBox>
<Button fx:id="run" text="Run" />
</fx:root>
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ChoiceBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.Spinner?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.RowConstraints?>
<fx:root maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="156.0" prefWidth="312.0" type="Pane" xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1">
<children>
<GridPane alignment="CENTER" layoutX="10.0" layoutY="10.0" prefHeight="123.0" prefWidth="283.0">
<columnConstraints>
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" maxWidth="200.0" minWidth="10.0" prefWidth="106.20001220703125" />
<ColumnConstraints halignment="LEFT" hgrow="SOMETIMES" maxWidth="226.39999999999998" minWidth="0.0" prefWidth="176.79998779296878" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label text="Method" />
<Label text="Delta Z" GridPane.rowIndex="1" />
<Label text="Offset" GridPane.rowIndex="2" />
<ChoiceBox fx:id="method" prefHeight="26.0" prefWidth="91.0" GridPane.columnIndex="1" />
<Spinner fx:id="deltaZ" prefHeight="25.0" prefWidth="57.0" GridPane.columnIndex="1" GridPane.rowIndex="1" />
<Spinner fx:id="offset" prefHeight="25.0" prefWidth="58.0" GridPane.columnIndex="1" GridPane.rowIndex="2" />
</children>
</GridPane>
<Button fx:id="view" layoutX="246.0" layoutY="97.0" mnemonicParsing="false" text="View" />
</children>
</fx:root>
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!--suppress JavaFxDefaultTag --> <!--suppress JavaFxDefaultTag -->
<?import fr.pasteur.ida.zellige.gui.*?>
<?import fr.pasteur.ida.zellige.gui.ConstructionDisplay?>
<?import fr.pasteur.ida.zellige.gui.ParameterSliderDouble?>
<?import fr.pasteur.ida.zellige.gui.ParameterSliderInteger?>
<?import javafx.geometry.Insets?> <?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?> <?import javafx.scene.control.Label?>
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.ColumnConstraints?>
<StepPanel xmlns:fx="http://javafx.com/fxml" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" <?import javafx.scene.layout.GridPane?>
minHeight="-Infinity" minWidth="-Infinity" name="Construction" prefHeight="369.0" prefWidth="405.0" <?import javafx.scene.layout.HBox?>
stylesheets="@theme2.css" xmlns="http://javafx.com/javafx" <?import javafx.scene.layout.Pane?>
fx:controller="fr.pasteur.ida.zellige.gui.controller.ConstructionController"> <?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.VBox?>
<HBox xmlns="http://javafx.com/javafx/18.0.2" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fr.pasteur.ida.zellige.gui.controller.ConstructionController">
<children>
<VBox>
<children>
<HBox prefHeight="366.0" prefWidth="852.0">
<children> <children>
<GridPane alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" <GridPane alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minWidth="-Infinity" prefHeight="334.0" prefWidth="442.0" vgap="15.0">
minWidth="-Infinity" prefHeight="333.0" prefWidth="405.0" vgap="15.0">
<columnConstraints> <columnConstraints>
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" maxWidth="-Infinity" minWidth="10.0" <ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" maxWidth="-Infinity" minWidth="10.0" prefWidth="20.0" />
prefWidth="20.0"/> <ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="10.0" prefWidth="375.79997749328606" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="10.0"
prefWidth="375.79997749328606"/>
</columnConstraints> </columnConstraints>
<rowConstraints> <rowConstraints>
<RowConstraints maxHeight="170.9999984741211" minHeight="10.0" prefHeight="123.4" valignment="CENTER" <RowConstraints maxHeight="170.9999984741211" minHeight="10.0" prefHeight="123.4" valignment="CENTER" vgrow="SOMETIMES" />
vgrow="SOMETIMES"/> <RowConstraints maxHeight="218.9999755859375" minHeight="10.0" prefHeight="123.19999694824222" vgrow="SOMETIMES" />
<RowConstraints maxHeight="218.9999755859375" minHeight="10.0" prefHeight="123.19999694824222" <RowConstraints maxHeight="110.00003662109378" minHeight="10.0" prefHeight="45.20000305175779" vgrow="SOMETIMES" />
vgrow="SOMETIMES"/>
<RowConstraints maxHeight="110.00003662109378" minHeight="10.0" prefHeight="45.20000305175779"
vgrow="SOMETIMES"/>
</rowConstraints> </rowConstraints>
<VBox alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" <VBox alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="137.0" prefWidth="379.0" GridPane.columnIndex="1">
prefHeight="137.0" prefWidth="379.0" GridPane.columnIndex="1">
<children> <children>
<ParameterSliderDouble fx:id="st1" alignment="CENTER" default="0.7" increment="0.1" <ParameterSliderDouble fx:id="st1" alignment="CENTER" default="0.7" increment="0.1" interval="%INTERVAL3" major="0.2" max="1" min="0" minor="1" name="Starting threshold" />
interval="%INTERVAL3" major="0.2" max="1" min="0" minor="1" <ParameterSliderDouble fx:id="c1" alignment="CENTER" default="0.8" increment="0.1" interval="%INTERVAL3" major="0.2" max="1" min="0" minor="1" name="Connexity" />
name="Starting threshold"/> <ParameterSliderInteger fx:id="r1" default="5" increment="0.1" interval="%INTERVAL1" major="10" max="50" min="0" minHeight="-Infinity" minWidth="-Infinity" minor="8" name="Overlap" prefHeight="27.0" prefWidth="382.0" VBox.vgrow="ALWAYS" />
<ParameterSliderDouble fx:id="c1" alignment="CENTER" default="0.8" increment="0.1"
interval="%INTERVAL3" major="0.2" max="1" min="0" minor="1"
name="Connexity"/>
<ParameterSliderInteger fx:id="r1" default="5" increment="0.1" interval="%INTERVAL1" major="10"
max="50" min="0" minHeight="-Infinity" minWidth="-Infinity" minor="8"
name="Overlap" prefHeight="27.0" prefWidth="382.0" VBox.vgrow="ALWAYS"/>
</children> </children>
</VBox> </VBox>
<VBox alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" <VBox alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="1" GridPane.rowIndex="1">
prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="1" GridPane.rowIndex="1">
<children> <children>
<GridPane prefHeight="147.0" prefWidth="599.0"> <GridPane prefHeight="147.0" prefWidth="599.0">
<columnConstraints> <columnConstraints>
...@@ -54,34 +52,34 @@ ...@@ -54,34 +52,34 @@
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints> </rowConstraints>
<children> <children>
<ParameterSliderDouble fx:id="st2" default="0.1" increment="0.1" interval="%INTERVAL3" <ParameterSliderDouble fx:id="st2" default="0.1" increment="0.1" interval="%INTERVAL3" major="0.2" max="1" min="0" minor="1" name="Starting threshold" />
major="0.2" max="1" min="0" minor="1" name="Starting threshold"/> <ParameterSliderDouble fx:id="c2" default="0.8" increment="0.1" interval="%INTERVAL3" major="0.2" max="1" min="0" minor="1" name="Connexity" GridPane.rowIndex="1" />
<ParameterSliderDouble fx:id="c2" default="0.8" increment="0.1" interval="%INTERVAL3" <ParameterSliderInteger fx:id="r2" default="5" increment="0.1" interval="%INTERVAL1" major="10" max="50" min="0" minor="8" name="Overlap" GridPane.rowIndex="2" />
major="0.2" max="1" min="0" minor="1" name="Connexity"
GridPane.rowIndex="1"/>
<ParameterSliderInteger fx:id="r2" default="5" increment="0.1" interval="%INTERVAL1"
major="10" max="50" min="0" minor="8" name="Overlap"
GridPane.rowIndex="2"/>
</children> </children>
</GridPane> </GridPane>
</children> </children>
</VBox> </VBox>
<VBox alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" <VBox alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="36.0" prefWidth="340.0" GridPane.columnIndex="1" GridPane.hgrow="ALWAYS" GridPane.rowIndex="2" GridPane.vgrow="ALWAYS">
prefHeight="36.0" prefWidth="340.0" GridPane.columnIndex="1" GridPane.hgrow="ALWAYS"
GridPane.rowIndex="2" GridPane.vgrow="ALWAYS">
<ParameterSliderInteger fx:id="surfaceSize" default="50" increment="1" interval="%INTERVAL4" <ParameterSliderInteger fx:id="surfaceSize" default="50" increment="1" interval="%INTERVAL4" major="20" max="100" min="0" minor="3" name="Surface min size" />
major="20" max="100" min="0" minor="3" name="Surface min size"/>
</VBox> </VBox>
<Label alignment="CENTER" minWidth="-Infinity" prefHeight="14.0" prefWidth="100.0" rotate="-90.0" <Label alignment="CENTER" minWidth="-Infinity" prefHeight="14.0" prefWidth="100.0" rotate="-90.0" text="FIRST ROUND" />
text="FIRST ROUND"/> <Label alignment="CENTER" minWidth="-Infinity" prefWidth="100.0" rotate="-90.0" text="SECOND ROUND" GridPane.rowIndex="1" />
<Label alignment="CENTER" minWidth="-Infinity" prefWidth="100.0" rotate="-90.0" text="SECOND ROUND"
GridPane.rowIndex="1"/>
<padding> <padding>
<Insets left="5.0" top="10.0" /> <Insets left="5.0" top="10.0" />
</padding> </padding>
</GridPane> </GridPane>
<ConstructionDisplay fx:id="constructionDisplay" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefWidth="408.0" />
</children>
</HBox>
<Pane prefHeight="38.0" prefWidth="852.0">
<children>
<Button fx:id="run" layoutX="315.0" layoutY="7.0" mnemonicParsing="false" text="Run Construction" />
</children>
</Pane>
</children>
</VBox>
</children> </children>
</StepPanel> </HBox>
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.FlowPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<!--No controller specified : need of fx:root-->
<fx:root alignment="CENTER" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="355.0" prefWidth="351.0" type="VBox" xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1">
<children>
<Label fx:id="surfaceNb" />
<FlowPane fx:id="display" alignment="CENTER" columnHalignment="CENTER" prefHeight="303.0" prefWidth="341.0" style="-fx-border-color: grey;" />
<VBox alignment="CENTER" prefHeight="63.0" prefWidth="351.0">
<children>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0" spacing="20.0">
<children>
<Button fx:id="plus" mnemonicParsing="false" text="+" />
<Button fx:id="minus" mnemonicParsing="false" prefHeight="26.0" prefWidth="26.0" text="-" />
</children>
</HBox>
<Label fx:id="log" />
</children>
</VBox>
</children>
<padding>
<Insets left="10.0" />
</padding>
</fx:root>
<?xml version="1.0" encoding="UTF-8"?>
<!--suppress JavaFxDefaultTag -->
<?import fr.pasteur.ida.zellige.gui.*?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.*?>
<?import java.lang.String?>
<BorderPane xmlns:fx="http://javafx.com/fxml" xmlns="http://javafx.com/javafx">
<center>
<VBox alignment="CENTER_LEFT" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity"
minWidth="-Infinity" prefHeight="186.0" prefWidth="286.0" spacing="10.0"
BorderPane.alignment="CENTER_RIGHT">
<children>
<CheckBoxDisplay fx:id="projection" mnemonicParsing="false" text="2D selectedPixels projection"/>
<CheckBoxDisplay fx:id="heightmap" mnemonicParsing="false" text="Height map"/>
<CheckBoxDisplay fx:id="extractedSurface" mnemonicParsing="false" text="3D extracted selectedPixels"/>
<CheckBoxDisplay fx:id="heightMapStack" mnemonicParsing="false" text="Height map stack(± delta)"/>
<CheckBoxDisplay fx:id="heightMapStackMask" mnemonicParsing="false"
text="Height map sub-volume mask (± delta)"/>
</children>
<padding>
<Insets left="40.0" top="5.0"/>
</padding>
<opaqueInsets>
<Insets/>
</opaqueInsets>
</VBox>
</center>
<top>
<Label alignment="TOP_LEFT" styleClass="step-title" text="Output display" BorderPane.alignment="TOP_LEFT">
<BorderPane.margin>
<Insets/>
</BorderPane.margin>
<padding>
<Insets left="20.0"/>
</padding>
</Label>
</top>
<styleClass>
<String fx:value="step-title"/>
</styleClass>
</BorderPane>
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!--suppress JavaFxDefaultTag, JavaFxUnresolvedFxIdReference --> <!--suppress JavaFxDefaultTag, JavaFxUnresolvedFxIdReference -->
<?import javafx.geometry.Insets?> <?import javafx.geometry.Insets?>
<?import javafx.scene.control.*?> <?import javafx.scene.control.Label?>
<?import javafx.scene.image.Image?> <?import javafx.scene.control.Menu?>
<?import javafx.scene.image.ImageView?> <?import javafx.scene.control.MenuBar?>
<?import javafx.scene.layout.*?> <?import javafx.scene.control.MenuItem?>
<?import javafx.scene.text.Font?> <?import javafx.scene.control.Tab?>
<VBox xmlns:fx="http://javafx.com/fxml" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" <?import javafx.scene.control.TabPane?>
minHeight="-Infinity" minWidth="-Infinity" prefHeight="786.0" prefWidth="866.0" spacing="5.0" <?import javafx.scene.layout.AnchorPane?>
stylesheets="@theme2.css" xmlns="http://javafx.com/javafx" <?import javafx.scene.layout.BorderPane?>
fx:controller="fr.pasteur.ida.zellige.gui.controller.MainController"> <?import javafx.scene.layout.HBox?>
<padding> <?import javafx.scene.layout.StackPane?>
<Insets left="10.0" right="10.0" top="5.0"/> <?import javafx.scene.layout.VBox?>
</padding>
<HBox alignment="CENTER_LEFT" prefHeight="26.0" prefWidth="774.0" spacing="5.0" VBox.vgrow="ALWAYS"> <VBox maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" prefHeight="558.0" prefWidth="866.0" spacing="5.0" stylesheets="@theme2.css" xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fr.pasteur.ida.zellige.gui.controller.MainController">
<MenuBar fx:id="menuBar" prefHeight="26.0" prefWidth="854.0">
<menus>
<Menu mnemonicParsing="false" text="File">
<items>
<MenuItem mnemonicParsing="false" onAction="#openFileDialog" text="Batch Mode" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Parameters">
<items>
<MenuItem mnemonicParsing="false" onAction="#saveParameters" text="Save..." />
<MenuItem mnemonicParsing="false" onAction="#loadParameters" text="Load..." />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Help">
<items>
<MenuItem mnemonicParsing="false" text="Zellige Wiki" />
<MenuItem mnemonicParsing="false" onAction="#saveCSVExample" text="Batch Mode CSV file example" />
</items>
</Menu>
</menus>
</MenuBar>
<HBox alignment="CENTER_LEFT" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="88.0" prefWidth="846.0" spacing="5.0" VBox.vgrow="ALWAYS">
<padding> <padding>
<Insets left="10.0" /> <Insets left="10.0" />
</padding> </padding>
<HBox alignment="CENTER_LEFT" prefHeight="45.0" prefWidth="494.0"> <fx:include fx:id="preprocessing" prefHeight="30.0" prefWidth="200.0" source="Preprocessing.fxml" />
<HBox alignment="CENTER_RIGHT" prefHeight="26.0" prefWidth="383.0" spacing="10.0" />
</HBox>
<TabPane fx:id="tabPane" prefHeight="572570.0" prefWidth="846.0" tabClosingPolicy="UNAVAILABLE" tabMaxWidth="400.0" tabMinWidth="260.0">
<tabs>
<Tab text="Pixel selection">
<content>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
<children> <children>
<Label prefHeight="12.0" prefWidth="71.0" text="File : "> <fx:include fx:id="selection" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" source="Selection.fxml" VBox.vgrow="ALWAYS" />
<font>
<Font size="14.0"/>
</font>
</Label>
<ComboBox fx:id="activeDatasets" minHeight="-Infinity" minWidth="-Infinity" prefHeight="26.0"
prefWidth="262.0"/>
</children> </children>
</HBox> </AnchorPane>
<HBox alignment="CENTER_RIGHT" prefHeight="45.0" prefWidth="333.0" spacing="10.0"> </content>
</Tab>
<Tab text="Height map construction">
<content>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
<children> <children>
<Button mnemonicParsing="false" onAction="#loadParameters" text="Load parameters"> <fx:include fx:id="construction" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" source="Construction.fxml" HBox.hgrow="ALWAYS" />
<graphic>
<ImageView fitHeight="15.0" fitWidth="22.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@/icons/script_add.png"/>
</image>
</ImageView>
</graphic>
</Button>
<Button mnemonicParsing="false" onAction="#saveParameters" text="Save Parameters">
<graphic>
<ImageView fitHeight="15.0" fitWidth="26.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../icons/script_save.png"/>
</image>
</ImageView>
</graphic>
</Button>
</children> </children>
</HBox> </AnchorPane>
</HBox> </content>
<fx:include fx:id="selection" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" </Tab>
minHeight="-Infinity" minWidth="-Infinity" source="Selection.fxml" VBox.vgrow="ALWAYS"/> <Tab text="Surface projection">
<HBox alignment="CENTER_LEFT" prefHeight="319.0" prefWidth="700.0" spacing="5.0"> <content>
<fx:include fx:id="construction" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="448.0" prefWidth="846.0">
minHeight="-Infinity" minWidth="-Infinity" source="Construction.fxml" HBox.hgrow="ALWAYS"/> <children>
<fx:include fx:id="projection" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" <fx:include fx:id="projection" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" source="Projection.fxml" HBox.hgrow="ALWAYS" />
minHeight="-Infinity" minWidth="-Infinity" source="Projection.fxml" HBox.hgrow="ALWAYS"/> </children>
</HBox> </AnchorPane>
</content>
</Tab>
</tabs>
</TabPane>
<StackPane prefHeight="51.0" prefWidth="747.0" VBox.vgrow="ALWAYS"> <StackPane prefHeight="51.0" prefWidth="747.0" VBox.vgrow="ALWAYS">
<BorderPane prefHeight="27.0" prefWidth="846.0"> <BorderPane prefHeight="27.0" prefWidth="846.0">
<left> <left>
<Label fx:id="logInfo" alignment="CENTER" prefHeight="32.0" prefWidth="418.0" <Label fx:id="logInfo" alignment="CENTER" prefHeight="32.0" prefWidth="418.0" BorderPane.alignment="CENTER" />
BorderPane.alignment="CENTER"/>
</left> </left>
<center>
<Button fx:id="runButton" disable="true" mnemonicParsing="false" text="Run Zellige !"
BorderPane.alignment="TOP_CENTER"/>
</center>
</BorderPane> </BorderPane>
</StackPane> </StackPane>
</VBox> </VBox>
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.ComboBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.Spinner?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.VBox?>
<VBox prefHeight="112.0" prefWidth="551.0" xmlns="http://javafx.com/javafx/18.0.2" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fr.pasteur.ida.zellige.gui.controller.PreprocessingController">
<children>
<HBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="53.0" prefWidth="538.0">
<children>
<GridPane prefHeight="53.0" prefWidth="511.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="301.0" minWidth="10.0" prefWidth="299.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="200.0" minWidth="10.0" prefWidth="113.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="99.0" minWidth="0.0" prefWidth="99.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="53.0" minHeight="10.0" prefHeight="25.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="93.0" minHeight="10.0" prefHeight="93.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<ComboBox fx:id="activeDatasets" prefHeight="25.0" prefWidth="273.0" GridPane.rowIndex="1" />
<Label text="Input File:" />
<Spinner fx:id="binValue" prefHeight="25.0" prefWidth="59.0" GridPane.columnIndex="1" GridPane.rowIndex="1" />
<Spinner fx:id="channelValue" prefHeight="25.0" prefWidth="53.0" GridPane.columnIndex="2" GridPane.rowIndex="1" />
<Label text="Binning : " GridPane.columnIndex="1" />
<Label text="Channel:" GridPane.columnIndex="2" />
</children>
</GridPane>
</children>
<VBox.margin>
<Insets left="10.0" right="10.0" top="5.0" />
</VBox.margin>
</HBox>
<VBox prefHeight="200.0" prefWidth="100.0">
<children>
<Label fx:id="fileInfo" prefHeight="26.0" prefWidth="524.0" />
<Label fx:id="userAdvice" prefHeight="31.0" prefWidth="560.0" textFill="#df2020" />
</children>
</VBox>
</children>
</VBox>
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!--suppress JavaFxDefaultTag --> <!--suppress JavaFxDefaultTag -->
<?import fr.pasteur.ida.zellige.gui.*?>
<?import javafx.geometry.*?> <?import javafx.geometry.Insets?>
<?import javafx.scene.control.*?> <?import javafx.scene.control.Button?>
<?import javafx.scene.layout.*?> <?import javafx.scene.control.ChoiceBox?>
<StepPanel xmlns:fx="http://javafx.com/fxml" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" <?import javafx.scene.control.Label?>
minHeight="-Infinity" minWidth="-Infinity" name="Projection" prefHeight="342.0" prefWidth="400.0" <?import javafx.scene.layout.FlowPane?>
stylesheets="@theme2.css" xmlns="http://javafx.com/javafx" <?import javafx.scene.layout.HBox?>
fx:controller="fr.pasteur.ida.zellige.gui.controller.ProjectionController"> <?import javafx.scene.layout.StackPane?>
<?import javafx.scene.layout.VBox?>
<HBox prefHeight="388.0" prefWidth="748.0" xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fr.pasteur.ida.zellige.gui.controller.ProjectionController">
<children> <children>
<VBox alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" <VBox alignment="CENTER" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="387.0" prefWidth="381.0">
minHeight="-Infinity" prefHeight="312.0" prefWidth="389.0">
<children> <children>
<StackPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" prefHeight="313.0" <FlowPane fx:id="display" alignment="CENTER" columnHalignment="CENTER" prefHeight="348.0" prefWidth="371.0" style="-fx-border-color: grey;" />
prefWidth="362.0"> <VBox alignment="CENTER" prefHeight="63.0" prefWidth="351.0">
<children> <children>
<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" <HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0" spacing="20.0">
minWidth="-Infinity" prefHeight="316.0" prefWidth="362.0">
<opaqueInsets>
<Insets/>
</opaqueInsets>
<center>
<BorderPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308"
minHeight="-Infinity" minWidth="-Infinity" prefHeight="94.0"
prefWidth="365.0" BorderPane.alignment="CENTER">
<left>
<VBox alignment="CENTER" maxHeight="1.7976931348623157E308"
maxWidth="1.7976931348623157E308" minHeight="-Infinity"
minWidth="-Infinity" prefHeight="108.0" prefWidth="202.0" spacing="5.0"
BorderPane.alignment="CENTER">
<children> <children>
<Label contentDisplay="CENTER" text="Method"/> <ChoiceBox fx:id="referenceSurfacesList" prefHeight="26.0" prefWidth="228.0" />
<ComboBox fx:id="methodComboBox" maxHeight="-Infinity" <Button fx:id="displayRS" mnemonicParsing="false" text="Display" />
maxWidth="-Infinity" prefHeight="26.0" prefWidth="150.0"/>
</children> </children>
</VBox> </HBox>
</left> <Label fx:id="log" />
<right>
<VBox alignment="CENTER" prefHeight="94.0" prefWidth="167.0" spacing="5.0"
BorderPane.alignment="CENTER">
<children>
<Label text="Delta Z"/>
<Spinner fx:id="delta1" maxHeight="-Infinity" maxWidth="-Infinity"
prefHeight="27.0" prefWidth="119.0"/>
</children> </children>
</VBox> </VBox>
</right>
</BorderPane>
</center>
<bottom>
<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity"
minWidth="-Infinity" prefHeight="222.0" prefWidth="298.0"
BorderPane.alignment="CENTER">
<top>
<Label alignment="TOP_LEFT" styleClass="step-title" text="Output display"
BorderPane.alignment="TOP_LEFT">
<BorderPane.margin>
<Insets/>
</BorderPane.margin>
<padding>
<Insets left="20.0"/>
</padding>
</Label>
</top>
<bottom>
<VBox alignment="CENTER_LEFT" maxHeight="-Infinity" maxWidth="-Infinity"
minHeight="-Infinity" minWidth="-Infinity" prefHeight="201.0"
prefWidth="286.0" spacing="10.0" BorderPane.alignment="CENTER">
<children>
<CheckBoxDisplay fx:id="projection" mnemonicParsing="false"
selected="true" text="2D selectedPixels projection"/>
<CheckBoxDisplay fx:id="rawHeightMap" mnemonicParsing="false"
selected="true" text="Raw height map"/>
<CheckBoxDisplay fx:id="extractedHeightMap" mnemonicParsing="false"
text="Extracted height map"/>
<CheckBoxDisplay fx:id="segmentedSurface" mnemonicParsing="false"
text="3D extracted selectedPixels"/>
<CheckBoxDisplay fx:id="reduced3DSpace" mnemonicParsing="false"
text="Height map stack(± delta)"/>
<HBox prefHeight="26.0" prefWidth="194.0" spacing="30.0">
<children>
<CheckBoxDisplay fx:id="segmentedSurfaceMask"
mnemonicParsing="false" text="Surface mask"/>
<Spinner fx:id="delta2" prefHeight="26.0" prefWidth="65.0"/>
</children>
</HBox>
</children> </children>
<padding> <padding>
<Insets left="40.0"/> <Insets left="10.0" />
</padding> </padding>
<opaqueInsets>
<Insets/>
</opaqueInsets>
</VBox> </VBox>
</bottom> <StackPane fx:id="stackPane" />
</BorderPane>
</bottom>
</BorderPane>
</children>
</StackPane>
</children> </children>
</VBox> </HBox>
</children>
</StepPanel>
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.TabPane?>
<?import javafx.scene.layout.Pane?>
<fx:root maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="355.0" prefWidth="350.0" style="-fx-border-color: grey;" type="Pane" xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1">
<children>
<TabPane fx:id="channelTools" prefHeight="207.0" prefWidth="350.0" tabClosingPolicy="UNAVAILABLE" />
<Button fx:id="run" layoutX="259.0" layoutY="307.0" mnemonicParsing="false" text="Run!" />
</children>
</fx:root>
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!--suppress JavaFxDefaultTag --> <?import fr.pasteur.ida.zellige.gui.ParameterSliderInteger?>
<?import fr.pasteur.ida.zellige.gui.*?> <?import fr.pasteur.ida.zellige.gui.ZSlicesSlider?>
<?import javafx.geometry.Insets?> <?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?> <?import javafx.scene.control.Label?>
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.ColumnConstraints?>
<StepPanel xmlns:fx="http://javafx.com/fxml" maxHeight="-Infinity" maxWidth="-Infinity" <?import javafx.scene.layout.FlowPane?>
minHeight="-Infinity" minWidth="-Infinity" name="Selection" prefHeight="336.0" prefWidth="815.0" <?import javafx.scene.layout.GridPane?>
spacing="5.0" stylesheets="@theme2.css" xmlns="http://javafx.com/javafx" <?import javafx.scene.layout.HBox?>
fx:controller="fr.pasteur.ida.zellige.gui.controller.SelectionController"> <?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.VBox?>
<VBox prefHeight="358.0" prefWidth="840.0" xmlns="http://javafx.com/javafx/18.0.2" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fr.pasteur.ida.zellige.gui.controller.SelectionController">
<children> <children>
<HBox alignment="CENTER" minHeight="-Infinity" minWidth="-Infinity" prefHeight="293.0" prefWidth="815.0"> <HBox prefHeight="312.0" prefWidth="840.0">
<children> <children>
<GridPane alignment="CENTER" maxHeight="1.7976931348623157E308" <FlowPane alignment="CENTER" prefHeight="200.0" prefWidth="200.0">
maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" <children>
prefHeight="265.0" prefWidth="414.0" vgap="5.0" HBox.hgrow="ALWAYS"> <GridPane alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" prefHeight="265.0" prefWidth="428.0" vgap="5.0">
<columnConstraints> <columnConstraints>
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" maxWidth="130.0" minWidth="10.0" <ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" maxWidth="130.0" minWidth="10.0" percentWidth="5.0" prefWidth="20.0" />
percentWidth="5.0" prefWidth="20.0"/> <ColumnConstraints hgrow="SOMETIMES" maxWidth="235.0" minWidth="10.0" percentWidth="95.0" prefWidth="214.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="235.0" minWidth="10.0" percentWidth="95.0"
prefWidth="214.0"/>
</columnConstraints> </columnConstraints>
<rowConstraints> <rowConstraints>
<RowConstraints maxHeight="338.0" minHeight="10.0" prefHeight="205.0" vgrow="SOMETIMES" /> <RowConstraints maxHeight="338.0" minHeight="10.0" prefHeight="205.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="446.0" minHeight="10.0" prefHeight="121.0" valignment="CENTER" <RowConstraints maxHeight="446.0" minHeight="10.0" prefHeight="121.0" valignment="CENTER" vgrow="SOMETIMES" />
vgrow="SOMETIMES"/>
</rowConstraints> </rowConstraints>
<Label alignment="CENTER" minHeight="-Infinity" minWidth="-Infinity" prefHeight="16.0"
prefWidth="100.0" rotate="-90.0" text="CLASSIFICATION" GridPane.halignment="CENTER"
GridPane.valignment="CENTER"/>
<Label alignment="CENTER" minHeight="-Infinity" minWidth="-Infinity" prefHeight="16.0"
prefWidth="100.0" rotate="-90.0" text="SMOOTHING" GridPane.halignment="CENTER"
GridPane.rowIndex="1" GridPane.valignment="CENTER"/>
<VBox alignment="CENTER" prefHeight="168.0" prefWidth="400.0" GridPane.columnIndex="1"
GridPane.halignment="CENTER" GridPane.valignment="CENTER">
<ParameterSliderInteger fx:id="amplitude" default="10" increment="1" interval="%INTERVAL1"
major="10" max="50" min="0" minor="9" name="Amplitude"/>
<ParameterSliderInteger fx:id="otsu" default="10" increment="1" interval="%INTERVAL1" major="10"
max="50" min="0" minor="9" name="Otsu" GridPane.rowIndex="1"/>
<ParameterSliderInteger fx:id="island" default="5" increment="1" interval="%INTERVAL1"
major="10" max="50" min="0" minor="9" name="Island Search"
GridPane.rowIndex="2"/>
</VBox>
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="1"
GridPane.rowIndex="1">
<ParameterSliderInteger default="1" increment="1" interval="%INTERVAL2" major="2" max="10"
min="0" minor="1" name="XY Blur " GridPane.rowIndex="1" fx:id="xyBlur"/>
<ParameterSliderInteger fx:id="zBlur" default="1" increment="1" interval="%INTERVAL2" major="2"
max="10" min="0" minor="1" name="Z Blur " GridPane.rowIndex="1"/>
</VBox>
<padding> <padding>
<Insets left="5.0" right="5.0" top="5.0"/> <Insets left="5.0" right="5.0" />
</padding> </padding>
<children>
<Label alignment="CENTER" minHeight="-Infinity" minWidth="-Infinity" prefHeight="16.0" prefWidth="100.0" rotate="-90.0" text="CLASSIFICATION" GridPane.halignment="CENTER" GridPane.valignment="CENTER" />
<Label alignment="CENTER" minHeight="-Infinity" minWidth="-Infinity" prefHeight="16.0" prefWidth="100.0" rotate="-90.0" text="SMOOTHING" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="CENTER" />
<VBox alignment="CENTER" prefHeight="168.0" prefWidth="400.0" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.valignment="CENTER">
<children>
<ParameterSliderInteger fx:id="amplitude" default="10" increment="1" interval="%INTERVAL1" major="10" max="50" min="0" minor="9" name="Amplitude">
<padding>
<Insets bottom="20.0" />
</padding>
</ParameterSliderInteger>
<ParameterSliderInteger fx:id="otsu" default="10" increment="1" interval="%INTERVAL1" major="10" max="50" min="0" minHeight="-Infinity" minWidth="-Infinity" minor="9" name="Otsu" prefHeight="57.0" prefWidth="398.0" GridPane.rowIndex="1" />
<ParameterSliderInteger fx:id="island" default="5" increment="1" interval="%INTERVAL1" major="10" max="50" min="0" minor="9" name="Island Search" GridPane.rowIndex="2" />
</children>
</VBox>
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="1" GridPane.rowIndex="1">
<children>
<ParameterSliderInteger default="1" increment="1" interval="%INTERVAL2" major="2" max="10" min="0" minHeight="-Infinity" minWidth="-Infinity" minor="1" name="XY Blur " prefHeight="87.0" prefWidth="398.0" GridPane.rowIndex="1" fx:id="xyBlur" />
<ParameterSliderInteger fx:id="zBlur" default="1" increment="1" interval="%INTERVAL2" major="2" max="10" min="0" minor="1" name="Z Blur " GridPane.rowIndex="1" />
</children>
</VBox>
</children>
</GridPane> </GridPane>
<VBox maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" </children>
minWidth="-Infinity" prefHeight="293.0" prefWidth="386.0" HBox.hgrow="ALWAYS"> </FlowPane>
<FlowPane fx:id="stack" alignment="CENTER" columnHalignment="CENTER" prefHeight="254.0" <VBox maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" prefHeight="293.0" prefWidth="386.0">
prefWidth="401.0" VBox.vgrow="NEVER"/> <children>
<ZSlicesSlider fx:id="zSlices" alignment="CENTER" columnHalignment="CENTER" <FlowPane fx:id="stack" alignment="CENTER" columnHalignment="CENTER" prefHeight="304.0" prefWidth="386.0" VBox.vgrow="NEVER" />
maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" <HBox VBox.vgrow="ALWAYS">
minHeight="-Infinity" minWidth="-Infinity" prefHeight="30.0" prefWidth="401.0" <children>
VBox.vgrow="ALWAYS"/> <ZSlicesSlider fx:id="zSlices" alignment="CENTER" columnHalignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" prefHeight="42.0" prefWidth="338.0" prefWrapLength="300.0" />
</children>
</HBox>
</children>
</VBox> </VBox>
</children> </children>
</HBox> </HBox>
<FlowPane alignment="CENTER" prefHeight="38.0" prefWidth="700.0">
<children>
<Button fx:id="run" alignment="CENTER" mnemonicParsing="false" text="Run" />
</children>
</FlowPane>
</children> </children>
</StepPanel> </VBox>
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!--suppress JavaFxDefaultTag --> <!--suppress JavaFxDefaultTag -->
<?import javafx.geometry.Insets?> <?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?> <?import javafx.scene.control.Label?>
<?import javafx.scene.control.Separator?> <?import javafx.scene.layout.FlowPane?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.VBox?> <?import javafx.scene.layout.VBox?>
<?import java.lang.String?>
<fx:root xmlns:fx="http://javafx.com/fxml" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" <VBox maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="300.0" minWidth="300.0" prefHeight="319.0" prefWidth="621.0" xmlns="http://javafx.com/javafx/18.0.2" xmlns:fx="http://javafx.com/fxml/1">
minHeight="-Infinity" minWidth="-Infinity" prefHeight="303.0" prefWidth="322.0" stylesheets="@theme2.css"
type="VBox" xmlns="http://javafx.com/javafx">
<children> <children>
<Label fx:id="Label2" alignment="CENTER_RIGHT" contentDisplay="RIGHT" maxHeight="-Infinity" maxWidth="-Infinity" <Pane prefHeight="297.0" prefWidth="622.0" />
minHeight="-Infinity" minWidth="-Infinity" prefHeight="24.0" prefWidth="131.0" stylesheets="@theme2.css"> <FlowPane>
<styleClass> <children>
<String fx:value="step"/> <Label fx:id="log" prefHeight="18.0" prefWidth="492.0" text="log" />
<String fx:value="label"/> <Button fx:id="run" mnemonicParsing="false" text="Run">
</styleClass> <FlowPane.margin>
</Label> <Insets left="5.0" />
<Separator maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefWidth="200.0"> </FlowPane.margin>
</Button>
</children>
<VBox.margin> <VBox.margin>
<Insets left="5.0" right="10.0"/> <Insets left="5.0" />
</VBox.margin> </VBox.margin>
</Separator> </FlowPane>
</children> </children>
<styleClass> </VBox>
<String fx:value="step"/>
<String fx:value="vbox"/>
</styleClass>
</fx:root>
...@@ -34,11 +34,14 @@ import fr.pasteur.ida.zellige.element.ose.AbstractOSE; ...@@ -34,11 +34,14 @@ import fr.pasteur.ida.zellige.element.ose.AbstractOSE;
import fr.pasteur.ida.zellige.element.ose.OSEList; import fr.pasteur.ida.zellige.element.ose.OSEList;
import fr.pasteur.ida.zellige.element.ose.OSEListArray; import fr.pasteur.ida.zellige.element.ose.OSEListArray;
import fr.pasteur.ida.zellige.element.surfaceLine.SurfaceLine; import fr.pasteur.ida.zellige.element.surfaceLine.SurfaceLine;
import fr.pasteur.ida.zellige.steps.construction.rounds.FirstRoundConstruction;
import fr.pasteur.ida.zellige.steps.construction.rounds.ose.OseConstructionXZ; import fr.pasteur.ida.zellige.steps.construction.rounds.ose.OseConstructionXZ;
import fr.pasteur.ida.zellige.steps.construction.rounds.surface.SurfaceConstruction; import fr.pasteur.ida.zellige.steps.construction.rounds.surface.SurfaceConstruction;
import fr.pasteur.ida.zellige.steps.selection.Selection; import fr.pasteur.ida.zellige.steps.selection.Selection;
import fr.pasteur.ida.zellige.steps.selection.SelectionParameters;
import fr.pasteur.ida.zellige.steps.selection.classification.ClassificationParameters; import fr.pasteur.ida.zellige.steps.selection.classification.ClassificationParameters;
import fr.pasteur.ida.zellige.steps.selection.exception.DataValidationException; import fr.pasteur.ida.zellige.steps.selection.exception.DataValidationException;
import fr.pasteur.ida.zellige.steps.selection.exception.ImageTooLargeException;
import fr.pasteur.ida.zellige.steps.selection.exception.NoClassificationException; import fr.pasteur.ida.zellige.steps.selection.exception.NoClassificationException;
import fr.pasteur.ida.zellige.steps.selection.postTreatment.PostTreatmentParameters; import fr.pasteur.ida.zellige.steps.selection.postTreatment.PostTreatmentParameters;
import fr.pasteur.ida.zellige.steps.selection.pretreatment.PretreatmentParameters; import fr.pasteur.ida.zellige.steps.selection.pretreatment.PretreatmentParameters;
...@@ -47,6 +50,7 @@ import io.scif.img.SCIFIOImgPlus; ...@@ -47,6 +50,7 @@ import io.scif.img.SCIFIOImgPlus;
import net.imglib2.img.Img; import net.imglib2.img.Img;
import net.imglib2.type.NativeType; import net.imglib2.type.NativeType;
import net.imglib2.type.numeric.RealType; import net.imglib2.type.numeric.RealType;
import net.imglib2.type.numeric.real.FloatType;
import org.junit.Ignore; import org.junit.Ignore;
import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.DisplayName;
...@@ -64,7 +68,7 @@ public class StartingOSESameSurfaceTest ...@@ -64,7 +68,7 @@ public class StartingOSESameSurfaceTest
@Ignore @Ignore
@DisplayName( "Two starting OSE from the same surface don't necessarily produce the exact same surface" ) @DisplayName( "Two starting OSE from the same surface don't necessarily produce the exact same surface" )
@Test @Test
< T extends RealType< T > & NativeType< T > > void TwoStartingOSEFromTheSameSurface_whenUseForStartASurface_DonTProduceTheExactSameSurface() throws DataValidationException, NoClassificationException < T extends RealType< T > & NativeType< T > > void TwoStartingOSEFromTheSameSurface_whenUseForStartASurface_DonTProduceTheExactSameSurface() throws DataValidationException, NoClassificationException, ImageTooLargeException
{ {
/* Parameters*/ /* Parameters*/
int amplitude = 5; int amplitude = 5;
...@@ -74,18 +78,19 @@ public class StartingOSESameSurfaceTest ...@@ -74,18 +78,19 @@ public class StartingOSESameSurfaceTest
double startingSizeThreshold = 0.9; double startingSizeThreshold = 0.9;
int overlap = 10; int overlap = 10;
double connexity = 0.5; double connexity = 0.5;
PretreatmentParameters pretreatmentParameters = new PretreatmentParameters( "GaussianBlur", 2 ); PretreatmentParameters pretreatmentParameters = new PretreatmentParameters( 1, 2 );
ClassificationParameters classificationParameters = new ClassificationParameters( amplitude, otsu ); SelectionParameters selectionParameters = new SelectionParameters( amplitude, otsu, sigmaXY, sigmaZ, 5 );
PostTreatmentParameters postTreatmentParameters = new PostTreatmentParameters( sigmaXY, sigmaZ, 5, 8 );
final String imagePath = "doc/Phantom.tif"; final String imagePath = "doc/Phantom.tif";
final SCIFIOImgPlus< ? > imgPlus = IO.openAll( imagePath ).get( 0 ); final SCIFIOImgPlus< ? > imgPlus = IO.openAll( imagePath ).get( 0 );
@SuppressWarnings( "unchecked" ) @SuppressWarnings( "unchecked" )
final Img< T > source = ( Img< T > ) imgPlus.getImg(); final Img< T > source = ( Img< T > ) imgPlus.getImg();
Pixels[][] maximums = Selection.run( source, pretreatmentParameters, classificationParameters, postTreatmentParameters ); Img< FloatType > maximums = Selection.run( source, pretreatmentParameters, selectionParameters );
OSEListArray oseLists = OseConstructionXZ.run( maximums, startingSizeThreshold );
int width = maximums[ 0 ].length; Pixels [][] max = FirstRoundConstruction.buildPixelArray( maximums );
OSEListArray oseLists = OseConstructionXZ.run( max, startingSizeThreshold );
int width = max[ 0 ].length;
ArrayList< AbstractOSE > osePartOfSurface = findAllStartingOSE( oseLists ); ArrayList< AbstractOSE > osePartOfSurface = findAllStartingOSE( oseLists );
AbstractOSE ose1 = oseLists.getAStartingOse(); AbstractOSE ose1 = oseLists.getAStartingOse();
...@@ -93,14 +98,14 @@ public class StartingOSESameSurfaceTest ...@@ -93,14 +98,14 @@ public class StartingOSESameSurfaceTest
ArrayList< AbstractOSE > list2 = findAllStartingOSE( oseLists ); ArrayList< AbstractOSE > list2 = findAllStartingOSE( oseLists );
osePartOfSurface.removeAll( list2 ); osePartOfSurface.removeAll( list2 );
LOGGER.debug( "surface starting ose : " + osePartOfSurface.size() ); LOGGER.debug( "surface starting ose : {}", osePartOfSurface.size() );
TreeMap< Double, Integer > uniqueSurface = new TreeMap<>(); TreeMap< Double, Integer > uniqueSurface = new TreeMap<>();
for ( AbstractOSE ose : osePartOfSurface ) for ( AbstractOSE ose : osePartOfSurface )
{ {
oseLists.reset(); oseLists.reset();
Surface s = SurfaceConstruction.run( oseLists, ose, width, overlap, connexity ); Surface s = SurfaceConstruction.run( oseLists, ose, width, overlap, connexity );
double overlappingRate = overlappingRate( reference, s ); double overlappingRate = overlappingRate( reference, s );
LOGGER.debug( " This surface has an overlap rate of " + overlappingRate + " with the reference surface" ); LOGGER.debug( " This surface has an overlap rate of {} with the reference surface", overlappingRate );
Integer j = uniqueSurface.get(overlappingRate); Integer j = uniqueSurface.get(overlappingRate);
uniqueSurface.put( overlappingRate, ( j == null ) ? 1 : j + 1 ); uniqueSurface.put( overlappingRate, ( j == null ) ? 1 : j + 1 );
} }
......
...@@ -28,57 +28,10 @@ ...@@ -28,57 +28,10 @@
*/ */
package fr.pasteur.ida.zellige.parameters; package fr.pasteur.ida.zellige.parameters;
import fr.pasteur.ida.zellige.steps.selection.exception.DataValidationException;
import fr.pasteur.ida.zellige.steps.selection.pretreatment.PretreatmentParameters;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.CsvSource;
import org.junit.jupiter.params.provider.ValueSource;
import static fr.pasteur.ida.zellige.steps.selection.pretreatment.PretreatmentParameters.GAUSSIAN_BLUR;
import static fr.pasteur.ida.zellige.steps.selection.pretreatment.PretreatmentParameters.NOT_IMPLEMENTED;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static org.junit.jupiter.api.Assertions.assertThrows;
public class PretreatmentParametersTest public class PretreatmentParametersTest
{ {
@DisplayName( "Any method associated with the right number of parameters should not raise any exception" )
@ParameterizedTest
@CsvSource( { GAUSSIAN_BLUR + ", 1" } )
void rightMethodWithRightParameterValue_whenChecked_doesntRaiseAnyException( String method, double value )
{
assertDoesNotThrow( () -> new PretreatmentParameters( method, value ) );
}
@DisplayName( "A wrong method should raise DataValidationException for any method" )
@Test
void wrongDenoisingMethod_whenChecked_RaisesADataValidationException()
{
DataValidationException exception = assertThrows( DataValidationException.class, () ->
new PretreatmentParameters( "Wrong method", 15 ) );
assertThat( exception ).hasMessageContaining( NOT_IMPLEMENTED );
}
@DisplayName( "A parameter value inferior to zero should raise a DataValidationException for any method" )
@ParameterizedTest
@ValueSource( strings = { GAUSSIAN_BLUR } )
void gaussianBlurMethodWithLessThanThreeParameter_whenChecked_RaisesAnException( String method )
{
double value = - 1;
DataValidationException exception = assertThrows( DataValidationException.class, () -> new PretreatmentParameters( method, value ) );
assertThat( exception ).hasMessageContaining( "parameter value" );
}
@DisplayName( "A parameter value superior to 10 should raise a DataValidationException for any method" )
@Test
void parameterValueSuperiorTo10_whenChecked_RaisesADataValidationException()
{
DataValidationException exception = assertThrows( DataValidationException.class, () ->
new PretreatmentParameters( GAUSSIAN_BLUR, 15 ) );
assertThat( exception ).hasMessageContaining( "parameter value" );
}
} }
...@@ -39,33 +39,8 @@ import static org.junit.jupiter.api.Assertions.assertThrows; ...@@ -39,33 +39,8 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
public class ProjectionParametersTest public class ProjectionParametersTest
{ {
@Test
void rightProjectionParameters_WhenCreatingANewInstance_raisesAValidationDataException()
{
int delta = 1;
String projectionType = "MIP";
assertDoesNotThrow( () -> new ProjectionParameters(delta, projectionType) );
}
@Test
void deltaUnderZero_WhenCreatingANewInstance_raisesAValidationDataException()
{
int delta = -1;
String projectionMethod = "MPI";
DataValidationException exception = assertThrows(DataValidationException.class, () ->
new ProjectionParameters( delta, projectionMethod) );
assertThat(exception).hasMessageContaining( "Delta" );
}
@Test
void unImplementedProjectionMethod_WhenCreatingANewInstance_raisesAValidationDataException()
{
int delta = 1;
String projectionMethod = "unknown method";
DataValidationException exception = assertThrows(DataValidationException.class, () ->
new ProjectionParameters( delta, projectionMethod) );
assertThat(exception).hasMessageContaining( projectionMethod );
}
} }