Search in sources :

Example 6 with ParameterPanelFX

use of qupath.lib.gui.dialogs.ParameterPanelFX in project qupath by qupath.

the class ClassifierBuilderPane method initializeBuildPanel.

private void initializeBuildPanel() {
    Button btnUpdateClassifier = new Button("Build & Apply");
    btnUpdateClassifier.setTooltip(new Tooltip("Build classifier & apply to objects in the current image"));
    tbAutoUpdate.setTooltip(new Tooltip("Automatically update the classification when changes are made to the data - only recommended if the classifier is fast & the amount of training data is small"));
    tbAutoUpdate.setOnAction(e -> {
        if (!tbAutoUpdate.isDisabled() && tbAutoUpdate.isSelected())
            updateClassification(true);
    });
    panelUpdate = new ParameterPanelFX(paramsUpdate);
    // panelUpdate.getPane().setPadding(new Insets(0, 10, 0, 10));
    comboClassifiers.setOnAction(e -> {
        maybeUpdate();
        // WekaClassifierBuilder builder = (WekaClassifierBuilder)comboClassifiers.getSelectedItem();
        // We can't auto-update if we don't have a valid (non-advanced) classifier builder
        // cbAutoUpdate.setEnabled(builder != null && builder.getClassifierClass() != null);
        classifier = (T) comboClassifiers.getSelectionModel().getSelectedItem();
        // Enable/disable edit button
        if (btnEdit != null)
            btnEdit.setDisable(!(classifier instanceof Parameterizable));
        tbAutoUpdate.setDisable(classifier == null || !classifier.supportsAutoUpdate());
    });
    // Make panel to create a classifier
    GridPane panelClassifierType = new GridPane();
    panelClassifierType.add(new Label("Classifier type: "), 0, 0);
    panelClassifierType.add(comboClassifiers, 1, 0);
    comboClassifiers.setMaxWidth(Double.MAX_VALUE);
    comboClassifiers.setTooltip(new Tooltip("Choose classifier type"));
    GridPane.setHgrow(comboClassifiers, Priority.ALWAYS);
    panelClassifierType.setHgap(5);
    panelClassifierType.setVgap(5);
    // Add in options button
    btnEdit = new Button("Edit");
    btnEdit.setTooltip(new Tooltip("Edit advanced classifier options"));
    btnEdit.setDisable(!(classifier instanceof Parameterizable));
    btnEdit.setOnAction(e -> {
        if (!(classifier instanceof Parameterizable)) {
            Dialogs.showErrorMessage("Classifier settings", "No options available for selected classifier!");
            return;
        }
        Parameterizable parameterizable = (Parameterizable) classifier;
        ParameterPanelFX panel = new ParameterPanelFX(parameterizable.getParameterList());
        // JDialog dialog = new JDialog(qupath.getFrame(), "Classifier settings", ModalityType.APPLICATION_MODAL);
        BorderPane pane = new BorderPane();
        pane.setCenter(panel.getPane());
        Button btnRun = new Button("Rebuild classifier");
        btnRun.setOnAction(e2 -> updateClassification(true));
        pane.setBottom(btnRun);
        Dialogs.showMessageDialog("Classifier settings", pane);
    });
    panelClassifierType.add(btnEdit, 2, 0);
    panelClassifierType.add(tbAutoUpdate, 3, 0);
    panelClassifierType.add(btnUpdateClassifier, 4, 0);
    panelClassifierType.setPadding(new Insets(10, 10, 10, 10));
    // Make feature panel
    GridPane panelFeatures = new GridPane();
    Button btnFeatures = new Button("Select...");
    btnFeatures.setTooltip(new Tooltip("Select features to use for classification - this is required before any classifier can be made"));
    btnFeatures.setOnAction(e -> {
        qupath.submitShortTask(() -> featurePanel.ensureMeasurementsUpdated());
        Dialogs.showMessageDialog("Select Features", featurePanel.getPanel());
        updateSelectedFeaturesLabel();
    });
    Button btnUseAllFeatures = new Button("Use all");
    btnUseAllFeatures.setTooltip(new Tooltip("Update feature list to use all available features"));
    btnUseAllFeatures.setOnAction(e -> selectAllFeatures());
    panelFeatures.add(labelSelectedFeatures, 0, 0);
    GridPane.setHgrow(labelSelectedFeatures, Priority.ALWAYS);
    labelSelectedFeatures.setMaxWidth(Double.MAX_VALUE);
    // labelSelectedFeatures.setTextAlignment(TextAlignment.CENTER);
    // labelSelectedFeatures.setAlignment(Pos.CENTER);
    panelFeatures.add(btnFeatures, 1, 0);
    panelFeatures.add(btnUseAllFeatures, 2, 0);
    panelFeatures.setHgap(5);
    // Multi-image stuff
    GridPane panelSouth = new GridPane();
    // Tooltip.install(btnResetTrainingObjects, new Tooltip("Reset all the retained objects, so that the classifier only uses the training objects from the current image"));
    miResetTrainingObjects.setOnAction(e -> {
        if (retainedObjectsMap == null || retainedObjectsMap.isEmpty())
            return;
        int nObjects = retainedObjectsMap.countRetainedObjects();
        String message = nObjects == 1 ? "Remove one retained object from classifier training?" : "Remove " + nObjects + " retained objects from classifier training?";
        if (Dialogs.showYesNoDialog("Remove retained objects", message)) {
            retainedObjectsMap.clear();
            updateRetainedObjectsLabel();
        }
    });
    final String trainingExtension = "qptrain";
    miLoadTrainingObjects.setOnAction(e -> {
        File fileTraining = Dialogs.promptForFile("Load objects", null, trainingExtension, new String[] { trainingExtension });
        if (fileTraining == null)
            return;
        if (!loadRetainedObjects(fileTraining)) {
            Dialogs.showErrorMessage("Load training objects", "There was an error loading training objects from \n" + fileTraining);
        }
    });
    // btnSaveTrainingObjects.setTooltip(new Tooltip("Load training objects saved in a previous session"));
    miSaveTrainingObjects.setOnAction(e -> {
        File fileTraining = Dialogs.promptToSaveFile("Save objects", null, null, trainingExtension, trainingExtension);
        if (fileTraining == null)
            return;
        if (!saveRetainedObjects(fileTraining)) {
            Dialogs.showErrorMessage("Save training objects", "There was an error saving training objects to \n" + fileTraining);
        }
    });
    // btnSaveTrainingObjects.setTooltip(new Tooltip("Save training objects for reloading in another session"));
    miExportTrainingFeatures.setOnAction(e -> {
        File fileTraining = Dialogs.promptToSaveFile("Export features", null, null, "Text file", "txt");
        if (fileTraining == null)
            return;
        if (!exportTrainingFeatures(fileTraining)) {
            Dialogs.showErrorMessage("Export features", "There was an exporting the training features to \n" + fileTraining);
        }
    });
    // btnExportTrainingFeatures.setTooltip(new Tooltip("Export training features to a text file (e.g. for analysis elsewhere"));
    // btnRebuildTrainingFromProject.setTooltip(new Tooltip("Load training objects from all images in the project to use these to create a single classifier"));
    miRebuildTrainingFromProject.setOnAction(e -> {
        loadAllTrainingSamplesForProject();
    });
    miClassifyAllImagesInProject.setOnAction(e -> {
        classifyAllImagesInProject();
    });
    miCrossValidateAcrossImages.setOnAction(e -> {
        crossValidateAcrossImages();
    });
    labelRetainedObjects.setTooltip(new Tooltip("The total number of objects last used for training - including from other images not currently open"));
    // labelRetainedObjects.setAlignment(Pos.CENTER);
    labelRetainedObjects.setMaxWidth(Double.MAX_VALUE);
    // labelRetainedObjects.setPadding(new Insets(5, 5, 5, 5));
    panelSouth.add(labelRetainedObjects, 0, 0);
    GridPane.setHgrow(labelRetainedObjects, Priority.ALWAYS);
    // panelSouth.setStyle("-fx-background-color: red;");
    MenuItem miShowTrainingObjectMatrix = new MenuItem("Show training object counts");
    miShowTrainingObjectMatrix.setOnAction(e -> {
        updateRetainedObjectsMap();
        showRetainedTrainingMap(retainedObjectsMap);
    });
    ContextMenu context = new ContextMenu();
    context.getItems().addAll(miLoadTrainingObjects, miSaveTrainingObjects, miRebuildTrainingFromProject, new SeparatorMenuItem(), miShowTrainingObjectMatrix, miResetTrainingObjects, new SeparatorMenuItem(), miExportTrainingFeatures, miCrossValidateAcrossImages, miClassifyAllImagesInProject);
    context.setOnShowing(e -> {
        boolean hasRetainedObjects = !retainedObjectsMap.isEmpty();
        boolean hasAnyObjects = hasRetainedObjects || (getHierarchy() != null && !getHierarchy().isEmpty());
        miResetTrainingObjects.setDisable(!hasRetainedObjects);
        miCrossValidateAcrossImages.setDisable(!hasRetainedObjects);
        miSaveTrainingObjects.setDisable(!hasAnyObjects);
        miExportTrainingFeatures.setDisable(!hasAnyObjects);
        miRebuildTrainingFromProject.setVisible(qupath.getProject() != null);
        miClassifyAllImagesInProject.setVisible(qupath.getProject() != null);
    });
    Button buttonMore = new Button("More...");
    buttonMore.setOnMouseClicked(e -> {
        context.show(buttonMore, e.getScreenX(), e.getScreenY());
    });
    panelSouth.add(buttonMore, 1, 0);
    // panelSouth.setBottom(panelRetainingButtons);
    updateRetainedObjectsLabel();
    // TitledPane multiImage = new TitledPane("Multi-image training", panelSouth);
    // labelRetainedObjects.prefWidthProperty().bind(multiImage.widthProperty());
    // panelClassifier.getChildren().add(multiImage);
    // panelSouth.add(panelRetaining, BorderLayout.NORTH);
    // panelSouth.add(btnSaveClassifier, BorderLayout.SOUTH);
    // panelFeatures.setStyle("-fx-background-color: blue;");
    GridPane paneAdvancedMain = new GridPane();
    paneAdvancedMain.add(panelFeatures, 0, 0);
    paneAdvancedMain.add(panelSouth, 0, 1);
    paneAdvancedMain.add(panelUpdate.getPane(), 0, 2);
    paneAdvancedMain.setVgap(5);
    panelUpdate.getPane().setMaxWidth(Double.MAX_VALUE);
    GridPane.setHgrow(panelFeatures, Priority.ALWAYS);
    GridPane.setHgrow(panelSouth, Priority.ALWAYS);
    GridPane.setHgrow(panelUpdate.getPane(), Priority.ALWAYS);
    // panelUpdate.getPane().setStyle("-fx-background-color: green;");
    TitledPane paneAdvanced = new TitledPane("Advanced options", paneAdvancedMain);
    paneAdvanced.setMaxWidth(Double.MAX_VALUE);
    paneAdvanced.setExpanded(false);
    // Really, I should probably just use a CSS stylesheet somewhere... here is an inelegant way to change things...
    Platform.runLater(() -> {
        try {
            paneAdvanced.lookup(".title").setStyle("-fx-background-color: transparent");
            paneAdvanced.lookup(".title").setEffect(null);
            paneAdvanced.lookup(".content").setStyle("-fx-border-color: null");
        } catch (Exception e) {
            logger.error("Error setting Advanced options pane style", e);
        }
    });
    panelClassifierType.add(paneAdvanced, 0, 1, 6, 1);
    progressIndicator.setVisible(false);
    progressIndicator.setPrefSize(30, 30);
    panelClassifierType.add(progressIndicator, 5, 0, 1, 1);
    // panelClassifierType.add(panelUpdate.getPane(), 0, 1, 4, 1);
    GridPane.setHgrow(panelUpdate.getPane(), Priority.ALWAYS);
    GridPane.setHgrow(paneAdvanced, Priority.ALWAYS);
    // btnUpdateClassifier.setMaxWidth(Double.MAX_VALUE);
    // panelClassifierType.add(btnUpdateClassifier, 0, 2, 3, 1);
    panelClassifier.getChildren().add(new TitledPane("Classifier", panelClassifierType));
    panelIntensities.intensityFeatureProperty().addListener((v, o, n) -> updateIntensityPanelCallback());
    panelIntensities.addThresholdParameterChangeListener((p, k, a) -> updateIntensityPanelCallback());
    panelClassifier.getChildren().add(new TitledPane("Intensity", panelIntensities.getPane()));
    btnUpdateClassifier.setOnAction(e -> updateClassification(true));
}
Also used : TitledPane(javafx.scene.control.TitledPane) BorderPane(javafx.scene.layout.BorderPane) GridPane(javafx.scene.layout.GridPane) Insets(javafx.geometry.Insets) Tooltip(javafx.scene.control.Tooltip) Label(javafx.scene.control.Label) MenuItem(javafx.scene.control.MenuItem) SeparatorMenuItem(javafx.scene.control.SeparatorMenuItem) ContextMenu(javafx.scene.control.ContextMenu) SeparatorMenuItem(javafx.scene.control.SeparatorMenuItem) ParameterPanelFX(qupath.lib.gui.dialogs.ParameterPanelFX) FileNotFoundException(java.io.FileNotFoundException) IOException(java.io.IOException) Button(javafx.scene.control.Button) ToggleButton(javafx.scene.control.ToggleButton) Parameterizable(qupath.lib.plugins.parameters.Parameterizable) File(java.io.File)

Example 7 with ParameterPanelFX

use of qupath.lib.gui.dialogs.ParameterPanelFX in project qupath by qupath.

the class PathIntensityClassifierPane method initialize.

private void initialize() {
    panelHistogram = new HistogramPanelFX();
    panelHistogram.setShowTickLabels(false);
    panelHistogram.getChart().getXAxis().setVisible(false);
    panelHistogram.getChart().getXAxis().setTickMarkVisible(false);
    panelHistogram.getChart().getYAxis().setVisible(false);
    panelHistogram.getChart().getYAxis().setTickMarkVisible(false);
    panelHistogram.getChart().setMinHeight(10);
    panelHistogram.getChart().setMinWidth(10);
    panelHistogram.getChart().setVisible(false);
    panelHistogram.getChart().setAnimated(false);
    thresholdWrapper = new ThresholdedChartWrapper(panelHistogram.getChart());
    comboIntensities = new ComboBox<>();
    comboIntensities.setOnAction(e -> {
        String selected = comboIntensities.getSelectionModel().getSelectedItem();
        logger.trace("Intensities selected: {}", selected);
        updateIntensityHistogram();
    });
    comboIntensities.setTooltip(new Tooltip("Select an intensity feature for thresholding, e.g. to sub-classify objects according to levels of positive staining"));
    double threshold_1 = 0.2;
    double threshold_2 = 0.4;
    double threshold_3 = 0.6;
    paramsIntensity = new ParameterList().addDoubleParameter("threshold_1", "Threshold 1+", threshold_1, null, 0, 1.5, "Set first intensity threshold, if required (lowest)").addDoubleParameter("threshold_2", "Threshold 2+", threshold_2, null, 0, 1.5, "Set second intensity threshold, if required (intermediate)").addDoubleParameter("threshold_3", "Threshold 3+", threshold_3, null, 0, 1.5, "Set third intensity threshold, if required (highest)").addBooleanParameter("single_threshold", "Use single threshold", false, "Use only the first intensity threshold to separate positive & negative objects");
    pane.add(new Label("Intensity feature: "), 0, 0);
    pane.add(comboIntensities, 1, 0);
    comboIntensities.setMaxWidth(Double.MAX_VALUE);
    GridPane.setHgrow(comboIntensities, Priority.ALWAYS);
    this.panelParameters = new ParameterPanelFX(paramsIntensity);
    this.panelParameters.addParameterChangeListener(new ParameterChangeListener() {

        @Override
        public void parameterChanged(ParameterList parameterList, String key, boolean isAdjusting) {
            if ("single_threshold".equals(key)) {
                boolean single = paramsIntensity.getBooleanParameterValue("single_threshold");
                panelParameters.setParameterEnabled("threshold_2", !single);
                panelParameters.setParameterEnabled("threshold_3", !single);
            }
            updateHistogramThresholdLines();
        }
    });
    // pane.add(panelParameters.getPane(), 0, 1, 2, 1);
    // GridPane.setFillWidth(panelParameters.getPane(), Boolean.FALSE);
    // 
    // pane.add(thresholdWrapper.getPane(), 2, 1, 1, 1);
    // //		thresholdWrapper.getPane().setMinSize(10, 10);
    // //		GridPane.setHgrow(thresholdWrapper.getPane(), Priority.ALWAYS);
    // GridPane.setFillHeight(thresholdWrapper.getPane(), Boolean.TRUE);
    BorderPane paneBorder = new BorderPane();
    paneBorder.setLeft(panelParameters.getPane());
    paneBorder.setCenter(thresholdWrapper.getPane());
    pane.add(paneBorder, 0, 1, 2, 1);
    pane.setVgap(5);
    pane.setHgap(5);
// if (addTitle)
// setBorder(BorderFactory.createTitledBorder("Intensity feature"));
}
Also used : ParameterChangeListener(qupath.lib.plugins.parameters.ParameterChangeListener) BorderPane(javafx.scene.layout.BorderPane) Tooltip(javafx.scene.control.Tooltip) Label(javafx.scene.control.Label) ParameterPanelFX(qupath.lib.gui.dialogs.ParameterPanelFX) ParameterList(qupath.lib.plugins.parameters.ParameterList) HistogramPanelFX(qupath.lib.gui.charts.HistogramPanelFX) ThresholdedChartWrapper(qupath.lib.gui.charts.HistogramPanelFX.ThresholdedChartWrapper)

Example 8 with ParameterPanelFX

use of qupath.lib.gui.dialogs.ParameterPanelFX in project qupath by qupath.

the class QuPathGUI method showSetupDialog.

/**
 * Show a dialog requesting setup parameters
 *
 * @return
 */
public boolean showSetupDialog() {
    // Show a setup message
    Dialog<ButtonType> dialog = new Dialog<>();
    dialog.setTitle("QuPath setup");
    dialog.initOwner(getStage());
    // Try to get an image to display
    Image img = loadIcon(128);
    BorderPane pane = new BorderPane();
    if (img != null) {
        StackPane imagePane = new StackPane(new ImageView(img));
        imagePane.setPadding(new Insets(10, 10, 10, 10));
        pane.setLeft(imagePane);
    }
    Map<String, Locale> localeMap = Arrays.stream(Locale.getAvailableLocales()).collect(Collectors.toMap(l -> l.getDisplayName(Locale.US), l -> l));
    localeMap.remove("");
    List<String> localeList = new ArrayList<>(localeMap.keySet());
    Collections.sort(localeList);
    long maxMemoryMB = Runtime.getRuntime().maxMemory() / 1024 / 1024;
    String maxMemoryString = String.format("Current maximum memory is %.2f GB.", maxMemoryMB / 1024.0);
    boolean canSetMemory = PathPrefs.hasJavaPreferences();
    ParameterList paramsSetup = new ParameterList().addTitleParameter("Memory");
    double originalMaxMemory = Math.ceil(maxMemoryMB / 1024.0);
    if (canSetMemory) {
        paramsSetup.addEmptyParameter("Set the maximum memory used by QuPath.");
        // .addEmptyParameter(maxMemoryString);
        boolean lowMemory = maxMemoryMB < 1024 * 6;
        if (lowMemory) {
            paramsSetup.addEmptyParameter("It is suggested to increase the memory limit to approximately\nhalf of the RAM available on your computer.");
        }
        paramsSetup.addDoubleParameter("maxMemoryGB", "Maximum memory", originalMaxMemory, "GB", "Set the maximum memory for Java.\n" + "Note that some commands (e.g. pixel classification) may still use more memory when needed,\n" + "so this value should generally not exceed half the total memory available on the system.");
    } else {
        paramsSetup.addEmptyParameter(maxMemoryString).addEmptyParameter("Sorry, I can't access the config file needed to change the max memory.\n" + "See the QuPath installation instructions for more details.");
    }
    paramsSetup.addTitleParameter("Region").addEmptyParameter("Set the region for QuPath to use for displaying numbers and messages.\n" + "Note: It is *highly recommended* to keep the default (English, US) region settings.\n" + "Support for regions that use different number formatting (e.g. commas as decimal marks)\n" + "is still experimental, and may give unexpected results.").addChoiceParameter("localeFormatting", "Numbers & dates", Locale.getDefault(Category.FORMAT).getDisplayName(), localeList, "Choose region settings used to format numbers and dates").addTitleParameter("Updates").addBooleanParameter("checkForUpdates", "Check for updates on startup (recommended)", PathPrefs.doAutoUpdateCheckProperty().get(), "Specify whether to automatically prompt to download the latest QuPath on startup (required internet connection)");
    ParameterPanelFX parameterPanel = new ParameterPanelFX(paramsSetup);
    pane.setCenter(parameterPanel.getPane());
    Label labelMemory;
    if (canSetMemory) {
        labelMemory = new Label("You will need to restart QuPath for memory changes to take effect");
        labelMemory.setStyle("-fx-font-weight: bold;");
        labelMemory.setMaxWidth(Double.MAX_VALUE);
        labelMemory.setAlignment(Pos.CENTER);
        labelMemory.setFont(Font.font("Arial"));
        labelMemory.setPadding(new Insets(10, 10, 10, 10));
        pane.setBottom(labelMemory);
    }
    // dialog.initStyle(StageStyle.UNDECORATED);
    dialog.getDialogPane().setContent(pane);
    dialog.getDialogPane().getButtonTypes().setAll(ButtonType.APPLY, ButtonType.CANCEL);
    Optional<ButtonType> result = dialog.showAndWait();
    if (!result.isPresent() || !ButtonType.APPLY.equals(result.get()))
        return false;
    Locale localeFormatting = localeMap.get(paramsSetup.getChoiceParameterValue("localeFormatting"));
    // Locale localeDisplay = localeMap.get(paramsSetup.getChoiceParameterValue("localeDisplay"));
    PathPrefs.defaultLocaleFormatProperty().set(localeFormatting);
    // PathPrefs.defaultLocaleDisplayProperty().set(localeDisplay);
    PathPrefs.doAutoUpdateCheckProperty().set(paramsSetup.getBooleanParameterValue("checkForUpdates"));
    if (canSetMemory && paramsSetup.containsKey("maxMemoryGB")) {
        int maxMemorySpecifiedMB = (int) (Math.round(paramsSetup.getDoubleParameterValue("maxMemoryGB") * 1024));
        if (maxMemorySpecifiedMB >= 1024) {
            PathPrefs.maxMemoryMBProperty().set(maxMemorySpecifiedMB);
        } else {
            if (maxMemorySpecifiedMB >= 0)
                Dialogs.showErrorNotification("Max memory setting", "Specified maximum memory setting too low - it must be at least 1 GB");
            else
                logger.warn("Requested max memory must be at least 1 GB - specified value {} will be ignored", paramsSetup.getDoubleParameterValue("maxMemoryGB"));
        // PathPrefs.maxMemoryMBProperty().set(-1);
        }
    }
    // Try to update display
    if (getStage() != null && getStage().isShowing())
        updateListsAndTables(getStage().getScene().getRoot());
    return true;
}
Also used : Locale(java.util.Locale) Change(javafx.collections.ListChangeListener.Change) PathObjectHierarchyView(qupath.lib.gui.panes.PathObjectHierarchyView) SelectedMeasurementTableView(qupath.lib.gui.panes.SelectedMeasurementTableView) Version(qupath.lib.common.Version) ProjectBrowser(qupath.lib.gui.panes.ProjectBrowser) ListChangeListener(javafx.collections.ListChangeListener) Map(java.util.Map) Path(java.nio.file.Path) ReleaseVersion(qupath.lib.gui.extensions.UpdateChecker.ReleaseVersion) Rectangle2D(javafx.geometry.Rectangle2D) PathObjects(qupath.lib.objects.PathObjects) Rectangle(javafx.scene.shape.Rectangle) BooleanProperty(javafx.beans.property.BooleanProperty) Project(qupath.lib.projects.Project) ObservableList(javafx.collections.ObservableList) Divider(javafx.scene.control.SplitPane.Divider) QuPathExtension(qupath.lib.gui.extensions.QuPathExtension) ByteArrayOutputStream(java.io.ByteArrayOutputStream) FXCollections(javafx.collections.FXCollections) PathIcons(qupath.lib.gui.tools.IconFactory.PathIcons) PathObjectHierarchy(qupath.lib.objects.hierarchy.PathObjectHierarchy) Bindings(javafx.beans.binding.Bindings) LinkedHashMap(java.util.LinkedHashMap) TreeTableView(javafx.scene.control.TreeTableView) PreferencePane(qupath.lib.gui.panes.PreferencePane) Commands(qupath.lib.gui.commands.Commands) QuPathStyleManager(qupath.lib.gui.prefs.QuPathStyleManager) IOException(java.io.IOException) OverlayOptions(qupath.lib.gui.viewer.OverlayOptions) Preferences(java.util.prefs.Preferences) ROI(qupath.lib.roi.interfaces.ROI) PathTools(qupath.lib.gui.viewer.tools.PathTools) ParameterPanelFX(qupath.lib.gui.dialogs.ParameterPanelFX) DragDropImportListener(qupath.lib.gui.viewer.DragDropImportListener) ImageView(javafx.scene.image.ImageView) TMAGrid(qupath.lib.objects.hierarchy.TMAGrid) Image(javafx.scene.image.Image) PathIO(qupath.lib.io.PathIO) EventHandler(javafx.event.EventHandler) ImageServer(qupath.lib.images.servers.ImageServer) BooleanBinding(javafx.beans.binding.BooleanBinding) TextInputControl(javafx.scene.control.TextInputControl) URLDecoder(java.net.URLDecoder) UncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler) Date(java.util.Date) URISyntaxException(java.net.URISyntaxException) ObjectInputStream(java.io.ObjectInputStream) KeyCombination(javafx.scene.input.KeyCombination) DefaultImageRegionStore(qupath.lib.gui.images.stores.DefaultImageRegionStore) ByteArrayInputStream(java.io.ByteArrayInputStream) Locale(java.util.Locale) GitHubProject(qupath.lib.gui.extensions.GitHubProject) ImageIO(javax.imageio.ImageIO) RotateEvent(javafx.scene.input.RotateEvent) WindowEvent(javafx.stage.WindowEvent) PathInteractivePlugin(qupath.lib.plugins.PathInteractivePlugin) Orientation(javafx.geometry.Orientation) MenuItem(javafx.scene.control.MenuItem) Ellipse(javafx.scene.shape.Ellipse) ImageServerProvider(qupath.lib.images.servers.ImageServerProvider) Collection(java.util.Collection) Font(javafx.scene.text.Font) ServiceLoader(java.util.ServiceLoader) Collectors(java.util.stream.Collectors) BorderStroke(javafx.scene.layout.BorderStroke) PathObject(qupath.lib.objects.PathObject) Objects(java.util.Objects) ImageTypeSetting(qupath.lib.gui.prefs.PathPrefs.ImageTypeSetting) ProjectIO(qupath.lib.projects.ProjectIO) GuiTools(qupath.lib.gui.tools.GuiTools) ExecutorCompletionService(java.util.concurrent.ExecutorCompletionService) Scene(javafx.scene.Scene) ListView(javafx.scene.control.ListView) ReadOnlyObjectProperty(javafx.beans.property.ReadOnlyObjectProperty) SimpleStringProperty(javafx.beans.property.SimpleStringProperty) Action(org.controlsfx.control.action.Action) PathClassFactory(qupath.lib.objects.classes.PathClassFactory) ScriptEditor(qupath.lib.gui.scripting.ScriptEditor) TableColumn(javafx.scene.control.TableColumn) HashSet(java.util.HashSet) Insets(javafx.geometry.Insets) DetectionDisplayMode(qupath.lib.gui.viewer.OverlayOptions.DetectionDisplayMode) ExecutorService(java.util.concurrent.ExecutorService) KeyCode(javafx.scene.input.KeyCode) ActionAccelerator(qupath.lib.gui.ActionTools.ActionAccelerator) Logger(org.slf4j.Logger) Dialog(javafx.scene.control.Dialog) Label(javafx.scene.control.Label) MenuBar(javafx.scene.control.MenuBar) ActionIcon(qupath.lib.gui.ActionTools.ActionIcon) ServerBuilder(qupath.lib.images.servers.ImageServerBuilder.ServerBuilder) ScrollEvent(javafx.scene.input.ScrollEvent) Consumer(java.util.function.Consumer) SimpleBooleanProperty(javafx.beans.property.SimpleBooleanProperty) Stage(javafx.stage.Stage) ViewerPlusDisplayOptions(qupath.lib.gui.viewer.ViewerPlusDisplayOptions) Comparator(java.util.Comparator) PathTool(qupath.lib.gui.viewer.tools.PathTool) Arrays(java.util.Arrays) ServerTools(qupath.lib.images.servers.ServerTools) ActionUtils(org.controlsfx.control.action.ActionUtils) ActionDescription(qupath.lib.gui.ActionTools.ActionDescription) ReadOnlyBooleanProperty(javafx.beans.property.ReadOnlyBooleanProperty) StackPane(javafx.scene.layout.StackPane) AnnotationPane(qupath.lib.gui.panes.AnnotationPane) JFXPanel(javafx.embed.swing.JFXPanel) Category(java.util.Locale.Category) ParameterList(qupath.lib.plugins.parameters.ParameterList) TabPane(javafx.scene.control.TabPane) ScriptException(javax.script.ScriptException) CountingPanelCommand(qupath.lib.gui.commands.CountingPanelCommand) SplitPane(javafx.scene.control.SplitPane) Border(javafx.scene.layout.Border) Event(javafx.event.Event) Set(java.util.Set) KeyEvent(javafx.scene.input.KeyEvent) Screen(javafx.stage.Screen) AffineTransform(java.awt.geom.AffineTransform) QuPathViewerListener(qupath.lib.gui.viewer.QuPathViewerListener) StandardCharsets(java.nio.charset.StandardCharsets) Executors(java.util.concurrent.Executors) PathAnnotationObject(qupath.lib.objects.PathAnnotationObject) Platform(javafx.application.Platform) Region(javafx.scene.layout.Region) CommandFinderTools(qupath.lib.gui.tools.CommandFinderTools) InputDisplayCommand(qupath.lib.gui.commands.InputDisplayCommand) ImageRegionStoreFactory(qupath.lib.gui.images.stores.ImageRegionStoreFactory) ThreadTools(qupath.lib.common.ThreadTools) DefaultScriptEditor(qupath.lib.gui.scripting.DefaultScriptEditor) GitHubRepo(qupath.lib.gui.extensions.GitHubProject.GitHubRepo) BorderPane(javafx.scene.layout.BorderPane) ButtonData(javafx.scene.control.ButtonBar.ButtonData) SimpleDateFormat(java.text.SimpleDateFormat) PathPlugin(qupath.lib.plugins.PathPlugin) Projects(qupath.lib.projects.Projects) StandardCopyOption(java.nio.file.StandardCopyOption) ArrayList(java.util.ArrayList) TabClosingPolicy(javafx.scene.control.TabPane.TabClosingPolicy) QuPathViewerPlus(qupath.lib.gui.viewer.QuPathViewerPlus) ObjectOutputStream(java.io.ObjectOutputStream) LinkedHashSet(java.util.LinkedHashSet) Color(javafx.scene.paint.Color) CirclePopupMenu(jfxtras.scene.menu.CirclePopupMenu) TitledPane(javafx.scene.control.TitledPane) Files(java.nio.file.Files) ToolBar(javafx.scene.control.ToolBar) GeneralTools(qupath.lib.common.GeneralTools) Node(javafx.scene.Node) CheckBox(javafx.scene.control.CheckBox) ProjectCommands(qupath.lib.gui.commands.ProjectCommands) File(java.io.File) PathObjectTools(qupath.lib.objects.PathObjectTools) Menu(javafx.scene.control.Menu) Cursor(javafx.scene.Cursor) KeyCodeCombination(javafx.scene.input.KeyCodeCombination) Paths(java.nio.file.Paths) SimpleObjectProperty(javafx.beans.property.SimpleObjectProperty) Tab(javafx.scene.control.Tab) PathPrefs(qupath.lib.gui.prefs.PathPrefs) StringBinding(javafx.beans.binding.StringBinding) Pos(javafx.geometry.Pos) Area(java.awt.geom.Area) CheckMenuItem(javafx.scene.control.CheckMenuItem) LoggerFactory(org.slf4j.LoggerFactory) UpdateChecker(qupath.lib.gui.extensions.UpdateChecker) Parent(javafx.scene.Parent) ContextMenu(javafx.scene.control.ContextMenu) URI(java.net.URI) ImageServers(qupath.lib.images.servers.ImageServers) TableView(javafx.scene.control.TableView) ImageType(qupath.lib.images.ImageData.ImageType) Shape(java.awt.Shape) BufferedImage(java.awt.image.BufferedImage) GroovyLanguage(qupath.lib.gui.scripting.languages.GroovyLanguage) ImageServerBuilder(qupath.lib.images.servers.ImageServerBuilder) FileNotFoundException(java.io.FileNotFoundException) TreeView(javafx.scene.control.TreeView) SeparatorMenuItem(javafx.scene.control.SeparatorMenuItem) QuPathViewer(qupath.lib.gui.viewer.QuPathViewer) List(java.util.List) Duration(javafx.util.Duration) ColorToolsFX(qupath.lib.gui.tools.ColorToolsFX) Optional(java.util.Optional) LogManager(qupath.lib.gui.logging.LogManager) RadioMenuItem(javafx.scene.control.RadioMenuItem) WorkflowCommandLogView(qupath.lib.gui.panes.WorkflowCommandLogView) TextArea(javafx.scene.control.TextArea) ButtonType(javafx.scene.control.ButtonType) MouseEvent(javafx.scene.input.MouseEvent) HashMap(java.util.HashMap) BrightnessContrastCommand(qupath.lib.gui.commands.BrightnessContrastCommand) UriImageSupport(qupath.lib.images.servers.ImageServerBuilder.UriImageSupport) Dialogs(qupath.lib.gui.dialogs.Dialogs) SwingUtilities(javax.swing.SwingUtilities) HostServices(javafx.application.HostServices) ZoomEvent(javafx.scene.input.ZoomEvent) TMACommands(qupath.lib.gui.commands.TMACommands) Tooltip(javafx.scene.control.Tooltip) ImageDetailsPane(qupath.lib.gui.panes.ImageDetailsPane) ImageData(qupath.lib.images.ImageData) Desktop(java.awt.Desktop) RoiTools(qupath.lib.roi.RoiTools) ObjectProperty(javafx.beans.property.ObjectProperty) Iterator(java.util.Iterator) ProjectImageEntry(qupath.lib.projects.ProjectImageEntry) TableRow(javafx.scene.control.TableRow) PathClass(qupath.lib.objects.classes.PathClass) TMACoreObject(qupath.lib.objects.TMACoreObject) DropShadow(javafx.scene.effect.DropShadow) MenuTools(qupath.lib.gui.tools.MenuTools) BorderStrokeStyle(javafx.scene.layout.BorderStrokeStyle) ActionEvent(javafx.event.ActionEvent) ToggleGroup(javafx.scene.control.ToggleGroup) LogViewerCommand(qupath.lib.gui.commands.LogViewerCommand) SwingFXUtils(javafx.embed.swing.SwingFXUtils) Collections(java.util.Collections) InputStream(java.io.InputStream) DialogButton(qupath.lib.gui.dialogs.Dialogs.DialogButton) BorderPane(javafx.scene.layout.BorderPane) Insets(javafx.geometry.Insets) ArrayList(java.util.ArrayList) Label(javafx.scene.control.Label) Image(javafx.scene.image.Image) BufferedImage(java.awt.image.BufferedImage) ParameterPanelFX(qupath.lib.gui.dialogs.ParameterPanelFX) Dialog(javafx.scene.control.Dialog) ParameterList(qupath.lib.plugins.parameters.ParameterList) ImageView(javafx.scene.image.ImageView) ButtonType(javafx.scene.control.ButtonType) StackPane(javafx.scene.layout.StackPane)

Aggregations

ParameterPanelFX (qupath.lib.gui.dialogs.ParameterPanelFX)8 BorderPane (javafx.scene.layout.BorderPane)7 Insets (javafx.geometry.Insets)6 ParameterList (qupath.lib.plugins.parameters.ParameterList)5 IOException (java.io.IOException)4 Label (javafx.scene.control.Label)4 TitledPane (javafx.scene.control.TitledPane)4 Tooltip (javafx.scene.control.Tooltip)4 Button (javafx.scene.control.Button)3 ContextMenu (javafx.scene.control.ContextMenu)3 MenuItem (javafx.scene.control.MenuItem)3 GridPane (javafx.scene.layout.GridPane)3 BufferedImage (java.awt.image.BufferedImage)2 File (java.io.File)2 FileNotFoundException (java.io.FileNotFoundException)2 ArrayList (java.util.ArrayList)2 SimpleStringProperty (javafx.beans.property.SimpleStringProperty)2 Scene (javafx.scene.Scene)2 SeparatorMenuItem (javafx.scene.control.SeparatorMenuItem)2 TableColumn (javafx.scene.control.TableColumn)2