diff --git a/pom.xml b/pom.xml index c777eaa51f89e1e70287de876dc3965ad40dfbe5..9626ecdf16f32406e5fb1326c5845b7c88120c4c 100644 --- a/pom.xml +++ b/pom.xml @@ -234,6 +234,11 @@ <artifactId>javafx-swing</artifactId> <version>18-ea+4</version> </dependency> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.9.0</version> + </dependency> <!-- <dependency>--> <!-- <groupId>org.jacoco</groupId>--> diff --git a/src/main/java/fr/pasteur/ida/zellige/command/Zellige.java b/src/main/java/fr/pasteur/ida/zellige/command/Zellige.java index 2d4471f7b6a7e8bd73c16c5a268d4f37e7a29546..d4c9034be7525bf16353a0418fc6bbe37bfe0dc3 100644 --- a/src/main/java/fr/pasteur/ida/zellige/command/Zellige.java +++ b/src/main/java/fr/pasteur/ida/zellige/command/Zellige.java @@ -33,8 +33,6 @@ import fr.pasteur.ida.zellige.gui.MainAppFrame; import net.imagej.DatasetService; import net.imagej.ImageJ; import net.imagej.display.ImageDisplayService; -import net.imglib2.type.NativeType; -import net.imglib2.type.numeric.RealType; import org.scijava.command.Command; import org.scijava.log.LogService; import org.scijava.plugin.Parameter; @@ -45,7 +43,7 @@ import java.io.IOException; import java.nio.file.FileSystems; @Plugin( type = Command.class, menuPath = "Plugins>Zellige>" ) -public class Zellige< T extends RealType< T > & NativeType< T > > implements Command +public class Zellige implements Command { @Parameter @@ -90,13 +88,14 @@ public class Zellige< T extends RealType< T > & NativeType< T > > implements Com ij.command().run( Zellige.class, true ); } + @Override public void run() { // Launch JavaFX interface MainAppFrame app = new MainAppFrame( ij, image, logService ); - app.setTitle( "Zellige" ); + app.setTitle( "Zellige V1.0.1" ); app.init(); } diff --git a/src/main/java/fr/pasteur/ida/zellige/gui/ConstructionController.java b/src/main/java/fr/pasteur/ida/zellige/gui/ConstructionController.java index 8f9905bc2dc12339c6c6b625504359c2358102d5..4421c5e8c76a17f59a8c67b18675aba60d3b75ee 100644 --- a/src/main/java/fr/pasteur/ida/zellige/gui/ConstructionController.java +++ b/src/main/java/fr/pasteur/ida/zellige/gui/ConstructionController.java @@ -153,4 +153,14 @@ public class ConstructionController< T extends RealType< T > & NativeType< T > > { return changedParameters; } + + public void setParameters( ZelligeParameters parameters ) + { + st1.setValue( parameters.getSt1() ); + r1.setValue( parameters.getC1() ); + c1.setValue( parameters.getR1() ); + st2.setValue( parameters.getSt2() ); + r2.setValue( parameters.getC2() ); + c2.setValue( parameters.getR2() ); + } } diff --git a/src/main/java/fr/pasteur/ida/zellige/gui/MainAppFrame.java b/src/main/java/fr/pasteur/ida/zellige/gui/MainAppFrame.java index f7896034e8a1202d13089347dc323487f57de1bc..ad564e5568a4e46c44dd87df7908192436d2cf2b 100644 --- a/src/main/java/fr/pasteur/ida/zellige/gui/MainAppFrame.java +++ b/src/main/java/fr/pasteur/ida/zellige/gui/MainAppFrame.java @@ -46,7 +46,11 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.swing.*; +import java.awt.*; import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; import java.util.ResourceBundle; public class MainAppFrame extends JFrame @@ -60,26 +64,19 @@ public class MainAppFrame extends JFrame private JFXPanel fxPanel; private Scene scene; - public MainAppFrame( ImageJ ij, ImageDisplayService image, LogService logService ) - { - this.ij = ij; - this.image = image; - this.logService = logService; - } + private static final List< Image > ICONS; - /** - * Create the JFXPanel that make the link between Swing (IJ) and JavaFX - * plugin. - */ - public void init() + static { - this.fxPanel = new JFXPanel(); - this.add( this.fxPanel ); - this.setVisible( true ); - setLogStatus(); - // The call to runLater() avoid a mix between JavaFX thread and Swing - // thread. - Platform.runLater( this::initFX ); + ICONS = new ArrayList<>(); + final int[] sizes = new int[]{ 16, 32, 64, 128, 256 }; + final ImageIcon imageIcon = new ImageIcon( Objects.requireNonNull( MainAppFrame.class.getClassLoader().getResource( "icons/Zellige_logo.png" ) ) ); +// final ImageIcon imageIcon = new ImageIcon( "src/main/resources/icons/Zellige_logo.png" ); + ICONS.add( imageIcon.getImage() ); + for ( final int size : sizes ) + { + ICONS.add( scaleImage( imageIcon, size, size ).getImage() ); + } } @@ -102,6 +99,68 @@ public class MainAppFrame extends JFrame logbackLogger.addAppender( appender ); } + public MainAppFrame( ImageJ ij, ImageDisplayService image, LogService logService ) + { + this.ij = ij; + this.image = image; + this.logService = logService; + this.setIconImages( ICONS ); + } + + public static final ImageIcon scaleImage( final ImageIcon icon, final int w, final int h ) + { + int nw = icon.getIconWidth(); + int nh = icon.getIconHeight(); + + if ( icon.getIconWidth() > w ) + { + nw = w; + nh = ( nw * icon.getIconHeight() ) / icon.getIconWidth(); + } + + if ( nh > h ) + { + nh = h; + nw = ( icon.getIconWidth() * nh ) / icon.getIconHeight(); + } + return new ImageIcon( icon.getImage().getScaledInstance( nw, nh, Image.SCALE_SMOOTH ) ); + } + + public LogService getLogService() + { + return logService; + } + + public ImageJ getIj() + { + return ij; + } + + public ImageDisplayService getImage() + { + return image; + } + + public Scene getScene() + { + return scene; + } + + /** + * Create the JFXPanel that make the link between Swing (IJ) and JavaFX + * plugin. + */ + public void init() + { + + this.fxPanel = new JFXPanel(); + this.add( this.fxPanel ); + this.setVisible( true ); + setLogStatus(); + // The call to runLater() avoid a mix between JavaFX thread and Swing thread. + Platform.runLater( this::initFX ); + } + public < T extends RealType< T > & NativeType< T > > void initFX() { // Init the root layout @@ -122,7 +181,7 @@ public class MainAppFrame extends JFrame this.fxPanel.setScene( scene ); // Resize the JFrame to the JavaFX scene - this.setSize( ( int ) scene.getWidth() + 20, ( int ) scene.getHeight() + 30 ); + this.setSize( ( int ) scene.getWidth() + 20, ( int ) scene.getHeight() + 50 ); controller.initExtraction(); } catch ( IOException | DataValidationException e ) @@ -131,23 +190,5 @@ public class MainAppFrame extends JFrame } } - public LogService getLogService() - { - return logService; - } - public ImageJ getIj() - { - return ij; - } - - public ImageDisplayService getImage() - { - return image; - } - - public Scene getScene() - { - return scene; - } } diff --git a/src/main/java/fr/pasteur/ida/zellige/gui/MainController.java b/src/main/java/fr/pasteur/ida/zellige/gui/MainController.java index 0e5d11eb1428b29081bbb346bcd244f6d45443e6..57367c7cb6e9c232f05caafd6a6a941e5eb19df9 100644 --- a/src/main/java/fr/pasteur/ida/zellige/gui/MainController.java +++ b/src/main/java/fr/pasteur/ida/zellige/gui/MainController.java @@ -50,6 +50,7 @@ import javafx.scene.control.Alert; import javafx.scene.control.Button; import javafx.scene.control.ComboBox; import javafx.scene.control.Label; +import javafx.stage.FileChooser; import net.imagej.Dataset; import net.imagej.ImgPlus; import net.imglib2.img.Img; @@ -59,7 +60,11 @@ import net.imglib2.type.numeric.real.FloatType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.io.File; +import java.io.IOException; import java.net.URL; +import java.text.SimpleDateFormat; +import java.util.Date; import java.util.ResourceBundle; public class MainController< T extends RealType< T > & NativeType< T > > implements Initializable @@ -86,6 +91,9 @@ public class MainController< T extends RealType< T > & NativeType< T > > impleme @FXML private SelectionController selectionController; + + MainModel< T > model; + public static void showError( Exception exception ) { Alert alert = new Alert( Alert.AlertType.ERROR ); @@ -97,6 +105,7 @@ public class MainController< T extends RealType< T > & NativeType< T > > impleme @Override public void initialize( URL url, ResourceBundle resourceBundle ) { + model = new MainModel<>( selectionController.getSelectionModel(), constructionController.getConstructionModel(), projectionController.getModel() ); /* Control of the files comboBox*/ activeDatasets.setOnMousePressed( event -> setAndDisplayDatasetChoices() );// Update of the list of opened Fiji images @@ -360,6 +369,7 @@ public class MainController< T extends RealType< T > & NativeType< T > > impleme selectionController.getSelectionModel().runPixelSelection(); } LOGGER.debug( "###########################################---NEW RUN---###########################################" ); +// ZelligeParameters.serialize( new ZelligeParameters( model ) ); } private void runPretreatment( Dataset dataset ) @@ -445,6 +455,53 @@ public class MainController< T extends RealType< T > & NativeType< T > > impleme return ( int ) selectionController.getzBlur().getSlider().getValue(); } + @FXML + public void saveParameters() throws IOException + { + SimpleDateFormat dtf = new SimpleDateFormat( "yyyyMMdd_HHmmss" ); + FileChooser fileChooser = chooseAFile( dtf.format( new Date() ), "Sava Parameters...", "ZelligeParameters", "*.zellige.param.json" ); + File file = fileChooser.showSaveDialog( null ); + if ( file != null ) + { + ZelligeParameters.serialize( new ZelligeParameters( model ), file ); + } + } + + @FXML + public void loadParameters() throws IOException, ClassNotFoundException + { + File f = chooseFile(); + LOGGER.debug( "The file has been choose" ); + if ( f != null ) + { + ZelligeParameters parameters = ZelligeParameters.deserialize( f ); + setParameters( parameters ); + } + } + + private File chooseFile() + { + FileChooser fileChooser = chooseAFile( null, "Select a Zellige parameter file", + "ZelligeParameters", "*.json" ); + return fileChooser.showOpenDialog( null ); + } + + private FileChooser chooseAFile( String initialFileNme, String title, String description, String extension ) + { + FileChooser fileChooser = new FileChooser(); + fileChooser.setTitle( title ); + fileChooser.setInitialFileName( initialFileNme ); + FileChooser.ExtensionFilter extFilter = new FileChooser.ExtensionFilter( description, extension ); + fileChooser.getExtensionFilters().add( extFilter ); + return fileChooser; + } + + private void setParameters( ZelligeParameters parameters ) + { + selectionController.setParameters( parameters ); + constructionController.setParameters( parameters ); + } + } diff --git a/src/main/java/fr/pasteur/ida/zellige/gui/MainModel.java b/src/main/java/fr/pasteur/ida/zellige/gui/MainModel.java new file mode 100644 index 0000000000000000000000000000000000000000..b5db1dff52af86f1668fb43129c6e090264d2d22 --- /dev/null +++ b/src/main/java/fr/pasteur/ida/zellige/gui/MainModel.java @@ -0,0 +1,38 @@ +package fr.pasteur.ida.zellige.gui; + +import net.imglib2.type.NativeType; +import net.imglib2.type.numeric.RealType; + +public class MainModel< T extends RealType< T > & NativeType< T > > +{ + + private final SelectionModel selectionModel; + private final ConstructionModel< T > constructionModel; + private final ProjectionModel< T > projectionModel; + + public MainModel( SelectionModel selectionModel, ConstructionModel< T > constructionModel, ProjectionModel< T > projectionModel ) + { + this.selectionModel = selectionModel; + this.constructionModel = constructionModel; + this.projectionModel = projectionModel; + } + + public SelectionModel getSelectionModel() + { + return selectionModel; + } + + + public ConstructionModel< T > getConstructionModel() + { + return constructionModel; + } + + + public ProjectionModel< T > getProjectionModel() + { + return projectionModel; + } + + +} diff --git a/src/main/java/fr/pasteur/ida/zellige/gui/ParameterSlider.java b/src/main/java/fr/pasteur/ida/zellige/gui/ParameterSlider.java index 63cba688cb12509ca161b2817ee99bd6c6b7622b..3b59faad38020e3c758e1730deeddd50b864bea5 100644 --- a/src/main/java/fr/pasteur/ida/zellige/gui/ParameterSlider.java +++ b/src/main/java/fr/pasteur/ida/zellige/gui/ParameterSlider.java @@ -216,6 +216,11 @@ public abstract class ParameterSlider extends GridPane { return interval; } + + public void setValue( double value ) + { + this.sliderProperty().set( value ); + } } diff --git a/src/main/java/fr/pasteur/ida/zellige/gui/SelectionController.java b/src/main/java/fr/pasteur/ida/zellige/gui/SelectionController.java index 59ad457bac062cdcb29b8a70b8cbfa654cb1bd26..d06203683cfd578e29e307159924a957704d5363 100644 --- a/src/main/java/fr/pasteur/ida/zellige/gui/SelectionController.java +++ b/src/main/java/fr/pasteur/ida/zellige/gui/SelectionController.java @@ -322,4 +322,13 @@ public class SelectionController implements Initializable { return selectionModel; } + + public void setParameters( ZelligeParameters parameters ) + { + amplitude.setValue( parameters.getAmplitude() ); + otsu.setValue( parameters.getOtsu() ); + island.setValue( parameters.getIsland() ); + xyBlur.setValue( parameters.getXyBlur() ); + zBlur.setValue( parameters.getzBlur() ); + } } diff --git a/src/main/java/fr/pasteur/ida/zellige/gui/ZelligeParameters.java b/src/main/java/fr/pasteur/ida/zellige/gui/ZelligeParameters.java new file mode 100644 index 0000000000000000000000000000000000000000..700881c04cfebd95b6d9d2ace1e41cd5df819ee4 --- /dev/null +++ b/src/main/java/fr/pasteur/ida/zellige/gui/ZelligeParameters.java @@ -0,0 +1,162 @@ +package fr.pasteur.ida.zellige.gui; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; + +import java.io.*; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.stream.Collectors; + +public class ZelligeParameters +{ + + //selection + private final int amplitude; + private final int otsu; + private final int island; + private final int xyBlur; + private final int zBlur; + //construction + private final double c1; + private final int r1; + private final double st11; + private final double c2; + private final int r2; + private final double st2; + private final double surfaceSize; + //projection + private final int delta1; + private final int delta2; + private final String method; + + + public ZelligeParameters( MainModel model ) + { + + SelectionModel selectionModel = model.getSelectionModel(); + ConstructionModel constructionModel = model.getConstructionModel(); + ProjectionModel projectionModel = model.getProjectionModel(); + // selection + amplitude = selectionModel.amplitudeProperty().intValue(); + otsu = selectionModel.otsuProperty().intValue(); + island = selectionModel.islandProperty().intValue(); + xyBlur = selectionModel.xyBlurProperty().intValue(); + zBlur = selectionModel.zBlurProperty().intValue(); + // construction + c1 = constructionModel.c1Property().doubleValue(); + r1 = constructionModel.r1Property().intValue(); + st11 = constructionModel.st1Property().doubleValue(); + c2 = constructionModel.c2Property().doubleValue(); + r2 = constructionModel.r2Property().intValue(); + st2 = constructionModel.st2Property().doubleValue(); + surfaceSize = constructionModel.surfaceSizeProperty().doubleValue(); + // projection + delta1 = projectionModel.delta1Property().intValue(); + delta2 = projectionModel.delta2Property().intValue(); + method = projectionModel.methodProperty().get(); + } + + public static void serialize( final ZelligeParameters parameters, final File file ) throws IOException + { + final Gson gson = new GsonBuilder().setPrettyPrinting().create(); + final String str = gson.toJson( parameters ); + System.out.println( str ); + try ( FileWriter writer = new FileWriter( file ) ) + { + writer.append( str ); + } + + } + + + public static ZelligeParameters deserialize( final File file ) throws FileNotFoundException, IOException, ClassNotFoundException + { + try ( FileReader ignored = new FileReader( file ) ) + { + final String str = Files.lines( Paths.get( file.getAbsolutePath() ) ) + .collect( Collectors.joining( System.lineSeparator() ) ); + + final Gson gson = new GsonBuilder().setPrettyPrinting().create(); + + return ( str == null || str.isEmpty() ) + ? null + : gson.fromJson( str, ZelligeParameters.class ); + } + } + + public int getAmplitude() + { + return amplitude; + } + + public int getOtsu() + { + return otsu; + } + + public int getIsland() + { + return island; + } + + public int getXyBlur() + { + return xyBlur; + } + + public int getzBlur() + { + return zBlur; + } + + public double getC1() + { + return c1; + } + + public int getR1() + { + return r1; + } + + public double getSt1() + { + return st11; + } + + public double getC2() + { + return c2; + } + + public int getR2() + { + return r2; + } + + public double getSt2() + { + return st2; + } + + public double getSurfaceSize() + { + return surfaceSize; + } + + public int getDelta1() + { + return delta1; + } + + public int getDelta2() + { + return delta2; + } + + public String getMethod() + { + return method; + } +} diff --git a/src/main/resources/fr.pasteur.ida.zellige.gui.view/Construction.fxml b/src/main/resources/fr.pasteur.ida.zellige.gui.view/Construction.fxml index 5e765d980b8addcb269ced33599d87cde9c0fa7c..ff3bc956e27ae72ef9e9d5373352dede0bf8fa57 100644 --- a/src/main/resources/fr.pasteur.ida.zellige.gui.view/Construction.fxml +++ b/src/main/resources/fr.pasteur.ida.zellige.gui.view/Construction.fxml @@ -29,14 +29,14 @@ <VBox alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="137.0" prefWidth="379.0" GridPane.columnIndex="1"> <children> - <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"/> <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"/> + <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="4" + max="50" min="0" minHeight="-Infinity" minWidth="-Infinity" minor="8" name="Overlap" prefHeight="27.0" prefWidth="382.0" VBox.vgrow="ALWAYS"/> </children> </VBox> @@ -59,7 +59,7 @@ 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="1" name="Overlap" + major="10" max="50" min="0" minor="8" name="Overlap" GridPane.rowIndex="2"/> </children> </GridPane> @@ -70,7 +70,7 @@ GridPane.rowIndex="2" GridPane.vgrow="ALWAYS"> <ParameterSliderDouble fx:id="surfaceSize" default="0.7" increment="0.05" interval="%INTERVAL3" - major="0.2" max="1" min="0" minor="4" name="Surface min size"/> + major="0.2" max="1" min="0" minor="1" name="Surface min size"/> </VBox> <Label alignment="CENTER" minWidth="-Infinity" prefHeight="14.0" prefWidth="100.0" rotate="-90.0" diff --git a/src/main/resources/fr.pasteur.ida.zellige.gui.view/Main.fxml b/src/main/resources/fr.pasteur.ida.zellige.gui.view/Main.fxml index f2457067348ca416d1248e2c7a63f8b210c96fc7..901d9de2731a4063bcc0ae22bb6ee525330e111c 100644 --- a/src/main/resources/fr.pasteur.ida.zellige.gui.view/Main.fxml +++ b/src/main/resources/fr.pasteur.ida.zellige.gui.view/Main.fxml @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> <?import javafx.geometry.Insets?> -<?import javafx.scene.control.Button?> -<?import javafx.scene.control.ComboBox?> -<?import javafx.scene.control.Label?> +<?import javafx.scene.control.*?> +<?import javafx.scene.image.Image?> +<?import javafx.scene.image.ImageView?> <?import javafx.scene.layout.*?> +<?import javafx.scene.text.Font?> <VBox xmlns:fx="http://javafx.com/fxml" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" prefHeight="786.0" prefWidth="866.0" spacing="5.0" stylesheets="@theme2.css" xmlns="http://javafx.com/javafx" @@ -12,13 +13,43 @@ <padding> <Insets left="10.0" right="10.0" top="5.0"/> </padding> - <HBox prefHeight="26.0" prefWidth="774.0" spacing="5.0" VBox.vgrow="ALWAYS"> + <HBox alignment="CENTER_LEFT" prefHeight="26.0" prefWidth="774.0" spacing="5.0" VBox.vgrow="ALWAYS"> <padding> <Insets left="10.0"/> </padding> - <Label text="File : "/> - <ComboBox fx:id="activeDatasets" minHeight="-Infinity" minWidth="-Infinity" prefHeight="26.0" - prefWidth="262.0"/> + <HBox alignment="CENTER_LEFT" prefHeight="45.0" prefWidth="494.0"> + <children> + <Label prefHeight="12.0" prefWidth="71.0" text="File : "> + <font> + <Font size="14.0"/> + </font> + </Label> + <ComboBox fx:id="activeDatasets" minHeight="-Infinity" minWidth="-Infinity" prefHeight="26.0" + prefWidth="262.0"/> + </children> + </HBox> + <HBox alignment="CENTER_RIGHT" prefHeight="45.0" prefWidth="333.0" spacing="10.0"> + <children> + <Button fx:id="load" mnemonicParsing="false" onAction="#loadParameters" text="Load parameters"> + <graphic> + <ImageView fitHeight="15.0" fitWidth="22.0" pickOnBounds="true" preserveRatio="true"> + <image> + <Image url="@/icons/script_add.png"/> + </image> + </ImageView> + </graphic> + </Button> + <Button fx:id="save" 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> + </HBox> </HBox> <fx:include fx:id="selection" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" source="Selection.fxml" VBox.vgrow="ALWAYS"/> diff --git a/src/main/resources/fr.pasteur.ida.zellige.gui.view/Selection.fxml b/src/main/resources/fr.pasteur.ida.zellige.gui.view/Selection.fxml index 1eb973844eb09ebb30dafacf13abb296aed0ef0a..bb144c828af0b922118e9ead95ebe87cbdec8fe7 100644 --- a/src/main/resources/fr.pasteur.ida.zellige.gui.view/Selection.fxml +++ b/src/main/resources/fr.pasteur.ida.zellige.gui.view/Selection.fxml @@ -11,7 +11,7 @@ <children> <HBox alignment="CENTER" minHeight="-Infinity" minWidth="-Infinity" prefHeight="293.0" prefWidth="815.0"> <children> - <GridPane alignment="CENTER" gridLinesVisible="false" maxHeight="1.7976931348623157E308" + <GridPane alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" prefHeight="265.0" prefWidth="414.0" vgap="5.0" HBox.hgrow="ALWAYS"> <columnConstraints> @@ -37,17 +37,17 @@ <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="1" name="Otsu" GridPane.rowIndex="1"/> + 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="1" name="Island Search" + 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="5" max="10" - min="0" minor="4" name="XY Blur " GridPane.rowIndex="1" fx:id="xyBlur"/> - <ParameterSliderInteger fx:id="zBlur" default="2" increment="1" interval="%INTERVAL2" major="5" - max="10" min="0" minor="4" name="Z Blur " 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="2" increment="1" interval="%INTERVAL2" major="2" + max="10" min="0" minor="1" name="Z Blur " GridPane.rowIndex="1"/> </VBox> <padding> diff --git a/src/main/resources/fr.pasteur.ida.zellige.gui.view/theme2.css b/src/main/resources/fr.pasteur.ida.zellige.gui.view/theme2.css index 039321b6db31eb0c605b437f3cd5cd2d367d69e2..d1808955d3b4492bdefe1779ae476b5a84223b54 100644 --- a/src/main/resources/fr.pasteur.ida.zellige.gui.view/theme2.css +++ b/src/main/resources/fr.pasteur.ida.zellige.gui.view/theme2.css @@ -30,7 +30,7 @@ .root { -fx-base: #ececec; -fx-color: -fx-base; - -fx-focus-color: #039E22; + /*-fx-focus-color: #039E22;*/ -fx-inner-border: linear-gradient(to bottom, ladder( -fx-color, diff --git a/src/main/resources/icons/Zellige_logo.png b/src/main/resources/icons/Zellige_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..39fd95297c7505ebf88a97cad98f6a97cb5fd01d Binary files /dev/null and b/src/main/resources/icons/Zellige_logo.png differ diff --git a/src/main/resources/icons/script_add.png b/src/main/resources/icons/script_add.png new file mode 100644 index 0000000000000000000000000000000000000000..d650552d967042327d9b2b49577582cc95253613 Binary files /dev/null and b/src/main/resources/icons/script_add.png differ diff --git a/src/main/resources/icons/script_save.png b/src/main/resources/icons/script_save.png new file mode 100644 index 0000000000000000000000000000000000000000..36216d8276dd679934346c30ace3006e1d76bbd1 Binary files /dev/null and b/src/main/resources/icons/script_save.png differ