Search in sources :

Example 36 with ParameterList

use of qupath.lib.plugins.parameters.ParameterList in project qupath by qupath.

the class SvgExportCommand method run.

@Override
public void run() {
    var viewer = qupath.getViewer();
    var imageData = viewer.getImageData();
    if (imageData == null) {
        Dialogs.showNoImageError(title);
        return;
    }
    var builder = new SvgTools.SvgBuilder(viewer);
    var server = imageData.getServer();
    String description = "SVG image";
    String ext = ".svg";
    String name = null;
    // Prompt for more options if we are exporting a selected region
    if (type == SvgExportType.SELECTED_REGION) {
        var selected = viewer.getSelectedObject();
        var params = new ParameterList().addDoubleParameter("downsample", "Downsample factor", downsample, null, "Downsample factor for export resolution (default: current viewer downsample)").addChoiceParameter("includeImage", "Raster image", imageType, Arrays.asList(ImageIncludeType.values()), "Export associated raster image").addBooleanParameter("highlightSelected", "Highlight selected objects", highlightSelected, "Highlight selected objects to distinguish these from unselected objects, as they are shown in the viewer").addBooleanParameter("compress", "Compress SVGZ", compress, "Write compressed SVGZ file, rather than standard SVG (default: no compression, for improved compatibility with other software)");
        if (!Dialogs.showParameterDialog(title, params))
            return;
        downsample = params.getDoubleParameterValue("downsample");
        imageType = (ImageIncludeType) params.getChoiceParameterValue("includeImage");
        highlightSelected = params.getBooleanParameterValue("highlightSelected");
        compress = params.getBooleanParameterValue("compress");
        if (downsample <= 0) {
            Dialogs.showErrorMessage(title, "Downsample factor must be > 0!");
            return;
        }
        RegionRequest request;
        if (selected != null && selected.hasROI()) {
            request = RegionRequest.createInstance(server.getPath(), downsample, selected.getROI());
        } else {
            request = RegionRequest.createInstance(server, downsample);
        }
        int width = (int) (request.getWidth() / downsample);
        int height = (int) (request.getHeight() / downsample);
        if ((width > 8192 || height > 8192)) {
            if (!Dialogs.showYesNoDialog(title, String.format("The requested image size (approx. %d x %d pixels) is very big -\n" + "are you sure you want to try to export at this resolution?", width, height)))
                return;
        }
        builder.images(imageType).region(request).downsample(request.getDownsample()).showSelection(highlightSelected);
        if (compress) {
            description = "SVGZ image";
            ext = ".svgz";
        }
    }
    var file = Dialogs.promptToSaveFile(title, null, name, description, ext);
    if (file == null)
        return;
    try {
        builder.writeSVG(file);
    } catch (IOException e) {
        Dialogs.showErrorMessage(title, e);
    }
}
Also used : ParameterList(qupath.lib.plugins.parameters.ParameterList) IOException(java.io.IOException) RegionRequest(qupath.lib.regions.RegionRequest)

Example 37 with ParameterList

use of qupath.lib.plugins.parameters.ParameterList in project qupath by qupath.

the class ProjectBrowser method getPopup.

ContextMenu getPopup() {
    Action actionOpenImage = new Action("Open image", e -> qupath.openImageEntry(getSelectedEntry()));
    Action actionRemoveImage = new Action("Remove image(s)", e -> {
        Collection<ImageRow> imageRows = getSelectedImageRowsRecursive();
        Collection<ProjectImageEntry<BufferedImage>> entries = ProjectTreeRow.getEntries(imageRows);
        if (entries.isEmpty())
            return;
        // Don't allow us to remove any entries that are currently open (in any viewer)
        for (var viewer : qupath.getViewers()) {
            var imageData = viewer.getImageData();
            var entry = imageData == null ? null : getProject().getEntry(imageData);
            if (entry != null && entries.contains(entry)) {
                Dialogs.showErrorMessage("Remove project entries", "Please close all images you want to remove!");
                return;
            }
        }
        if (entries.size() == 1) {
            if (!Dialogs.showConfirmDialog("Remove project entry", "Remove " + entries.iterator().next().getImageName() + " from project?"))
                return;
        } else if (!Dialogs.showYesNoDialog("Remove project entries", String.format("Remove %d entries?", entries.size())))
            return;
        var result = Dialogs.showYesNoCancelDialog("Remove project entries", "Delete all associated data?");
        if (result == DialogButton.CANCEL)
            return;
        project.removeAllImages(entries, result == DialogButton.YES);
        refreshTree(null);
        syncProject(project);
        if (tree != null) {
            boolean isExpanded = tree.getRoot() != null && tree.getRoot().isExpanded();
            tree.setRoot(model.getRoot());
            tree.getRoot().setExpanded(isExpanded);
        }
    });
    Action actionDuplicateImages = new Action("Duplicate image(s)", e -> {
        Collection<ImageRow> imageRows = getSelectedImageRowsRecursive();
        if (imageRows.isEmpty()) {
            logger.debug("Nothing to duplicate - no entries selected");
            return;
        }
        boolean singleImage = false;
        String name = "";
        String title = "Duplicate images";
        String namePrompt = "Append to image name";
        String nameHelp = "Specify text to append to the image name to distinguish duplicated images";
        if (imageRows.size() == 1) {
            title = "Duplicate image";
            namePrompt = "Duplicate image name";
            nameHelp = "Specify name for the duplicated image";
            singleImage = true;
            name = imageRows.iterator().next().getDisplayableString();
            name = GeneralTools.generateDistinctName(name, project.getImageList().stream().map(p -> p.getImageName()).collect(Collectors.toSet()));
        }
        var params = new ParameterList().addStringParameter("name", namePrompt, name, nameHelp).addBooleanParameter("copyData", "Also duplicate data files", true, "Duplicate any associated data files along with the image");
        if (!Dialogs.showParameterDialog(title, params))
            return;
        boolean copyData = params.getBooleanParameterValue("copyData");
        name = params.getStringParameterValue("name");
        // Ensure we have a single space and then the text to append, with extra whitespace removed
        if (!singleImage && !name.isBlank())
            name = " " + name.strip();
        for (var imageRow : imageRows) {
            try {
                var newEntry = project.addDuplicate(ProjectTreeRow.getEntry(imageRow), copyData);
                if (newEntry != null && !name.isBlank()) {
                    if (singleImage)
                        newEntry.setImageName(name);
                    else
                        newEntry.setImageName(newEntry.getImageName() + name);
                }
            } catch (Exception ex) {
                Dialogs.showErrorNotification("Duplicating image", "Error duplicating " + ProjectTreeRow.getEntry(imageRow).getImageName());
                logger.error(ex.getLocalizedMessage(), ex);
            }
        }
        try {
            project.syncChanges();
        } catch (Exception ex) {
            logger.error("Error synchronizing project changes: " + ex.getLocalizedMessage(), ex);
        }
        refreshProject();
        if (imageRows.size() == 1)
            logger.debug("Duplicated 1 image entry");
        else
            logger.debug("Duplicated {} image entries");
    });
    Action actionSetImageName = new Action("Rename image", e -> {
        TreeItem<ProjectTreeRow> path = tree.getSelectionModel().getSelectedItem();
        if (path == null)
            return;
        if (path.getValue().getType() == ProjectTreeRow.Type.IMAGE) {
            if (setProjectEntryImageName(ProjectTreeRow.getEntry(path.getValue())) && project != null)
                syncProject(project);
        }
    });
    // Add a metadata value
    Action actionAddMetadataValue = new Action("Add metadata", e -> {
        Project<BufferedImage> project = getProject();
        Collection<ImageRow> imageRows = getSelectedImageRowsRecursive();
        if (project != null && !imageRows.isEmpty()) {
            TextField tfMetadataKey = new TextField();
            var suggestions = project.getImageList().stream().map(p -> p.getMetadataKeys()).flatMap(Collection::stream).distinct().sorted().collect(Collectors.toList());
            TextFields.bindAutoCompletion(tfMetadataKey, suggestions);
            TextField tfMetadataValue = new TextField();
            Label labKey = new Label("New key");
            Label labValue = new Label("New value");
            labKey.setLabelFor(tfMetadataKey);
            labValue.setLabelFor(tfMetadataValue);
            tfMetadataKey.setTooltip(new Tooltip("Enter the name for the metadata entry"));
            tfMetadataValue.setTooltip(new Tooltip("Enter the value for the metadata entry"));
            ProjectImageEntry<BufferedImage> entry = imageRows.size() == 1 ? ProjectTreeRow.getEntry(imageRows.iterator().next()) : null;
            int nMetadataValues = entry == null ? 0 : entry.getMetadataKeys().size();
            GridPane pane = new GridPane();
            pane.setVgap(5);
            pane.setHgap(5);
            pane.add(labKey, 0, 0);
            pane.add(tfMetadataKey, 1, 0);
            pane.add(labValue, 0, 1);
            pane.add(tfMetadataValue, 1, 1);
            String name = imageRows.size() + " images";
            if (entry != null) {
                name = entry.getImageName();
                if (nMetadataValues > 0) {
                    Label labelCurrent = new Label("Current metadata");
                    TextArea textAreaCurrent = new TextArea();
                    textAreaCurrent.setEditable(false);
                    String keyString = entry.getMetadataSummaryString();
                    if (keyString.isEmpty())
                        textAreaCurrent.setText("No metadata entries yet");
                    else
                        textAreaCurrent.setText(keyString);
                    textAreaCurrent.setPrefRowCount(3);
                    labelCurrent.setLabelFor(textAreaCurrent);
                    pane.add(labelCurrent, 0, 2);
                    pane.add(textAreaCurrent, 1, 2);
                }
            }
            Dialog<ButtonType> dialog = new Dialog<>();
            dialog.setTitle("Metadata");
            dialog.getDialogPane().getButtonTypes().setAll(ButtonType.OK, ButtonType.CANCEL);
            dialog.getDialogPane().setHeaderText("Set metadata for " + name);
            dialog.getDialogPane().setContent(pane);
            Optional<ButtonType> result = dialog.showAndWait();
            if (result.isPresent() && result.get() == ButtonType.OK) {
                String key = tfMetadataKey.getText().trim();
                String value = tfMetadataValue.getText();
                if (key.isEmpty()) {
                    logger.warn("Attempted to set metadata value for {}, but key was empty!", name);
                } else {
                    // Set metadata for all entries
                    for (var temp : imageRows) ProjectTreeRow.getEntry(temp).putMetadataValue(key, value);
                    syncProject(project);
                    tree.refresh();
                }
            }
        } else {
            Dialogs.showErrorMessage("Edit image description", "No entry is selected!");
        }
    });
    // Edit the description for the image
    Action actionEditDescription = new Action("Edit description", e -> {
        Project<?> project = getProject();
        ProjectImageEntry<?> entry = getSelectedEntry();
        if (project != null && entry != null) {
            if (showDescriptionEditor(entry)) {
                descriptionText.set(entry.getDescription());
                syncProject(project);
            }
        } else {
            Dialogs.showErrorMessage("Edit image description", "No entry is selected!");
        }
    });
    // Mask the name of the images and shuffle the entry
    Action actionMaskImageNames = ActionTools.createSelectableAction(PathPrefs.maskImageNamesProperty(), "Mask image names");
    // Refresh thumbnail according to current display settings
    Action actionRefreshThumbnail = new Action("Refresh thumbnail", e -> {
        TreeItem<ProjectTreeRow> path = tree.getSelectionModel().getSelectedItem();
        if (path == null)
            return;
        if (path.getValue().getType() == ProjectTreeRow.Type.IMAGE) {
            ProjectImageEntry<BufferedImage> entry = ProjectTreeRow.getEntry(path.getValue());
            if (!isCurrentImage(entry)) {
                logger.warn("Cannot refresh entry for image that is not open!");
                return;
            }
            BufferedImage imgThumbnail = qupath.getViewer().getRGBThumbnail();
            imgThumbnail = resizeForThumbnail(imgThumbnail);
            try {
                entry.setThumbnail(imgThumbnail);
            } catch (IOException e1) {
                logger.error("Error writing thumbnail", e1);
            }
            tree.refresh();
        }
    });
    // Open the project directory using Explorer/Finder etc.
    Action actionOpenProjectDirectory = createBrowsePathAction("Project...", () -> getProjectPath());
    Action actionOpenProjectEntryDirectory = createBrowsePathAction("Project entry...", () -> getProjectEntryPath());
    Action actionOpenImageServerDirectory = createBrowsePathAction("Image server...", () -> getImageServerPath());
    Menu menuSort = new Menu("Sort by...");
    ContextMenu menu = new ContextMenu();
    var hasProjectBinding = qupath.projectProperty().isNotNull();
    var menuOpenDirectories = MenuTools.createMenu("Open directory...", actionOpenProjectDirectory, actionOpenProjectEntryDirectory, actionOpenImageServerDirectory);
    menuOpenDirectories.visibleProperty().bind(hasProjectBinding);
    // MenuItem miOpenProjectDirectory = ActionUtils.createMenuItem(actionOpenProjectDirectory);
    MenuItem miOpenImage = ActionUtils.createMenuItem(actionOpenImage);
    MenuItem miRemoveImage = ActionUtils.createMenuItem(actionRemoveImage);
    MenuItem miDuplicateImage = ActionUtils.createMenuItem(actionDuplicateImages);
    MenuItem miSetImageName = ActionUtils.createMenuItem(actionSetImageName);
    MenuItem miRefreshThumbnail = ActionUtils.createMenuItem(actionRefreshThumbnail);
    MenuItem miEditDescription = ActionUtils.createMenuItem(actionEditDescription);
    MenuItem miAddMetadata = ActionUtils.createMenuItem(actionAddMetadataValue);
    MenuItem miMaskImages = ActionUtils.createCheckMenuItem(actionMaskImageNames);
    // Set visibility as menu being displayed
    menu.setOnShowing(e -> {
        TreeItem<ProjectTreeRow> selected = tree.getSelectionModel().getSelectedItem();
        ProjectImageEntry<BufferedImage> selectedEntry = selected == null ? null : ProjectTreeRow.getEntry(selected.getValue());
        var entries = getSelectedImageRowsRecursive();
        boolean isImageEntry = selectedEntry != null;
        // miOpenProjectDirectory.setVisible(project != null && project.getBaseDirectory().exists());
        miOpenImage.setVisible(isImageEntry);
        miDuplicateImage.setVisible(isImageEntry);
        miSetImageName.setVisible(isImageEntry);
        miAddMetadata.setVisible(!entries.isEmpty());
        miEditDescription.setVisible(isImageEntry);
        miRefreshThumbnail.setVisible(isImageEntry && isCurrentImage(selectedEntry));
        miRemoveImage.setVisible(selected != null && project != null && !project.getImageList().isEmpty());
        if (project == null) {
            menuSort.setVisible(false);
            return;
        }
        Map<String, MenuItem> newItems = new TreeMap<>();
        for (ProjectImageEntry<?> entry : project.getImageList()) {
            // Add all entry metadata keys
            for (String key : entry.getMetadataKeys()) {
                if (!newItems.containsKey(key))
                    newItems.put(key, ActionUtils.createMenuItem(createSortByKeyAction(key, key)));
            }
            // Add all additional keys
            for (String key : baseMetadataKeys) {
                if (!newItems.containsKey(key))
                    newItems.put(key, ActionUtils.createMenuItem(createSortByKeyAction(key, key)));
            }
        }
        menuSort.getItems().setAll(newItems.values());
        menuSort.getItems().add(0, ActionUtils.createMenuItem(createSortByKeyAction("None", null)));
        menuSort.getItems().add(1, new SeparatorMenuItem());
        menuSort.setVisible(true);
        if (menu.getItems().isEmpty())
            e.consume();
    });
    SeparatorMenuItem separator = new SeparatorMenuItem();
    separator.visibleProperty().bind(menuSort.visibleProperty());
    menu.getItems().addAll(miOpenImage, miRemoveImage, miDuplicateImage, new SeparatorMenuItem(), miSetImageName, miAddMetadata, miEditDescription, miMaskImages, miRefreshThumbnail, separator, menuSort);
    separator = new SeparatorMenuItem();
    separator.visibleProperty().bind(menuOpenDirectories.visibleProperty());
    if (Desktop.isDesktopSupported()) {
        menu.getItems().addAll(separator, menuOpenDirectories);
    }
    return menu;
}
Also used : Button(javafx.scene.control.Button) ImageServer(qupath.lib.images.servers.ImageServer) DoubleBinding(javafx.beans.binding.DoubleBinding) ActionUtils(org.controlsfx.control.action.ActionUtils) LoggerFactory(org.slf4j.LoggerFactory) RenderingHints(java.awt.RenderingHints) StackPane(javafx.scene.layout.StackPane) Side(javafx.geometry.Side) ParameterList(qupath.lib.plugins.parameters.ParameterList) MasterDetailPane(org.controlsfx.control.MasterDetailPane) ContextMenu(javafx.scene.control.ContextMenu) Map(java.util.Map) URI(java.net.URI) Path(java.nio.file.Path) QuPathGUI(qupath.lib.gui.QuPathGUI) Pane(javafx.scene.layout.Pane) TextField(javafx.scene.control.TextField) MenuItem(javafx.scene.control.MenuItem) BufferedImage(java.awt.image.BufferedImage) IconFactory(qupath.lib.gui.tools.IconFactory) Collection(java.util.Collection) Set(java.util.Set) Canvas(javafx.scene.canvas.Canvas) Collectors(java.util.stream.Collectors) Executors(java.util.concurrent.Executors) TreeView(javafx.scene.control.TreeView) Objects(java.util.Objects) Platform(javafx.application.Platform) SeparatorMenuItem(javafx.scene.control.SeparatorMenuItem) List(java.util.List) Project(qupath.lib.projects.Project) GuiTools(qupath.lib.gui.tools.GuiTools) Optional(java.util.Optional) ThreadTools(qupath.lib.common.ThreadTools) ObservableList(javafx.collections.ObservableList) BorderPane(javafx.scene.layout.BorderPane) StringProperty(javafx.beans.property.StringProperty) IntStream(java.util.stream.IntStream) TextArea(javafx.scene.control.TextArea) SimpleStringProperty(javafx.beans.property.SimpleStringProperty) ButtonType(javafx.scene.control.ButtonType) TreeItem(javafx.scene.control.TreeItem) Action(org.controlsfx.control.action.Action) ImageRow(qupath.lib.gui.panes.ProjectTreeRow.ImageRow) FXCollections(javafx.collections.FXCollections) PathIcons(qupath.lib.gui.tools.IconFactory.PathIcons) Supplier(java.util.function.Supplier) Bindings(javafx.beans.binding.Bindings) HashSet(java.util.HashSet) Dialogs(qupath.lib.gui.dialogs.Dialogs) TextFields(org.controlsfx.control.textfield.TextFields) Insets(javafx.geometry.Insets) Graphics2D(java.awt.Graphics2D) ActionTools(qupath.lib.gui.ActionTools) Tooltip(javafx.scene.control.Tooltip) ExecutorService(java.util.concurrent.ExecutorService) GridPane(javafx.scene.layout.GridPane) ImageData(qupath.lib.images.ImageData) Desktop(java.awt.Desktop) KeyCode(javafx.scene.input.KeyCode) ObjectProperty(javafx.beans.property.ObjectProperty) Logger(org.slf4j.Logger) Dialog(javafx.scene.control.Dialog) Label(javafx.scene.control.Label) TitledPane(javafx.scene.control.TitledPane) ProjectImageEntry(qupath.lib.projects.ProjectImageEntry) GeneralTools(qupath.lib.common.GeneralTools) IOException(java.io.IOException) MetadataRow(qupath.lib.gui.panes.ProjectTreeRow.MetadataRow) ProjectCommands(qupath.lib.gui.commands.ProjectCommands) MenuTools(qupath.lib.gui.tools.MenuTools) Menu(javafx.scene.control.Menu) SelectionMode(javafx.scene.control.SelectionMode) TreeMap(java.util.TreeMap) Type(qupath.lib.gui.panes.ProjectTreeRow.Type) ImageView(javafx.scene.image.ImageView) SwingFXUtils(javafx.embed.swing.SwingFXUtils) TreeCell(javafx.scene.control.TreeCell) ObservableValue(javafx.beans.value.ObservableValue) ChangeListener(javafx.beans.value.ChangeListener) Collections(java.util.Collections) Image(javafx.scene.image.Image) PathPrefs(qupath.lib.gui.prefs.PathPrefs) ImageServerMetadata(qupath.lib.images.servers.ImageServerMetadata) DialogButton(qupath.lib.gui.dialogs.Dialogs.DialogButton) PaneTools(qupath.lib.gui.tools.PaneTools) Action(org.controlsfx.control.action.Action) ImageRow(qupath.lib.gui.panes.ProjectTreeRow.ImageRow) TextArea(javafx.scene.control.TextArea) Label(javafx.scene.control.Label) ContextMenu(javafx.scene.control.ContextMenu) BufferedImage(java.awt.image.BufferedImage) Dialog(javafx.scene.control.Dialog) TextField(javafx.scene.control.TextField) ProjectImageEntry(qupath.lib.projects.ProjectImageEntry) ContextMenu(javafx.scene.control.ContextMenu) Menu(javafx.scene.control.Menu) ButtonType(javafx.scene.control.ButtonType) GridPane(javafx.scene.layout.GridPane) Tooltip(javafx.scene.control.Tooltip) MenuItem(javafx.scene.control.MenuItem) SeparatorMenuItem(javafx.scene.control.SeparatorMenuItem) IOException(java.io.IOException) TreeMap(java.util.TreeMap) SeparatorMenuItem(javafx.scene.control.SeparatorMenuItem) IOException(java.io.IOException) ParameterList(qupath.lib.plugins.parameters.ParameterList)

Example 38 with ParameterList

use of qupath.lib.plugins.parameters.ParameterList in project qupath by qupath.

the class RTreesClassifier method createParameterList.

@Override
protected ParameterList createParameterList() {
    ParameterList params = new ParameterList();
    params.addIntParameter("maxDepth", "Max tree depth", 0, null, 0, 20, "Maximum tree depth; if zero, then the depth is effectively unlimited (set to max int)");
    params.addIntParameter("minSamples", "Min samples per node", 10, null, "Minimum number of samples per node - the node will not be split if the number of samples is less than this (default = 10)");
    params.addBooleanParameter("use1SE", "Prune aggressively", true, "If true, more aggressive pruning is used - likely sacrificing some accuracy for more robustness");
    params.addIntParameter("termCritMaxTrees", "Termination criterion - max trees", 50, null, "Optional termination criterion based on maximum number of trees - set <= 0 to disable and use accuracy criterion only");
    params.addDoubleParameter("termCritEPS", "Termination criterion - accuracy", 0.0, null, "Optional termination criterion based on out-of-bag error - set <= 0 to disable and use max trees only.  Note: probabilities are only provided when this is zero.");
    return params;
}
Also used : ParameterList(qupath.lib.plugins.parameters.ParameterList)

Example 39 with ParameterList

use of qupath.lib.plugins.parameters.ParameterList in project qupath by qupath.

the class BoostClassifier method createClassifier.

@Override
protected Boost createClassifier() {
    Boost boost = Boost.create();
    // System.out.println("Type: " + boost.getBoostType());
    // System.out.println("CV folds: " + boost.getCVFolds());
    // System.out.println("Var count: " + boost.getVarCount());
    // System.out.println("Weak count: " + boost.getWeakCount());
    // System.out.println("Min sample count: " + boost.getMinSampleCount());
    // System.out.println("Max depth: " + boost.getMaxDepth());
    ParameterList params = getParameterList();
    if (params != null) {
        String type = (String) params.getChoiceParameterValue("boostType");
        type = type.toLowerCase();
        if (type.equals("discrete"))
            boost.setBoostType(Boost.DISCRETE);
        else if (type.equals("real"))
            boost.setBoostType(Boost.REAL);
        else if (type.equals("logit"))
            boost.setBoostType(Boost.LOGIT);
        else if (type.equals("gentle"))
            boost.setBoostType(Boost.GENTLE);
        boost.setWeakCount(params.getIntParameterValue("weakCount"));
        boost.setMaxDepth(params.getIntParameterValue("maxDepth"));
    }
    boost.setWeightTrimRate(0);
    return boost;
}
Also used : Boost(org.bytedeco.opencv.opencv_ml.Boost) ParameterList(qupath.lib.plugins.parameters.ParameterList)

Example 40 with ParameterList

use of qupath.lib.plugins.parameters.ParameterList in project qupath by qupath.

the class KNearestClassifier method createClassifier.

@Override
protected KNearest createClassifier() {
    KNearest classifier = KNearest.create();
    // System.out.println("Default K: " + classifier.getDefaultK());
    ParameterList params = getParameterList();
    if (params != null) {
        classifier.setIsClassifier(true);
        classifier.setDefaultK(params.getIntParameterValue("k"));
    }
    return classifier;
}
Also used : KNearest(org.bytedeco.opencv.opencv_ml.KNearest) ParameterList(qupath.lib.plugins.parameters.ParameterList)

Aggregations

ParameterList (qupath.lib.plugins.parameters.ParameterList)53 BufferedImage (java.awt.image.BufferedImage)15 ArrayList (java.util.ArrayList)13 IOException (java.io.IOException)11 List (java.util.List)9 Collectors (java.util.stream.Collectors)8 BorderPane (javafx.scene.layout.BorderPane)8 PathObject (qupath.lib.objects.PathObject)8 Logger (org.slf4j.Logger)7 LoggerFactory (org.slf4j.LoggerFactory)7 GeneralTools (qupath.lib.common.GeneralTools)7 Dialogs (qupath.lib.gui.dialogs.Dialogs)7 ImageServer (qupath.lib.images.servers.ImageServer)7 Insets (javafx.geometry.Insets)6 Tooltip (javafx.scene.control.Tooltip)6 Collection (java.util.Collection)5 Map (java.util.Map)5 SimpleStringProperty (javafx.beans.property.SimpleStringProperty)5 ContextMenu (javafx.scene.control.ContextMenu)5 Label (javafx.scene.control.Label)5