Package qupath.process.gui.commands.ml
Class PixelClassifierUI
java.lang.Object
qupath.process.gui.commands.ml.PixelClassifierUI
Helper class for generating standardized UI components for pixel classification.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic PanecreatePixelClassifierButtons(ObjectExpression<ImageData<BufferedImage>> imageData, ObjectExpression<PixelClassifier> classifier, StringExpression classifierName) Create a standard button pane for pixel classifiers, to create, measure and classify objects.static ComboBox<RegionFilter> createRegionFilterCombo(OverlayOptions options) Create aComboBoxthat can be used to select the pixel classification region filter.static PanecreateSavePixelClassifierPane(ObjectExpression<Project<BufferedImage>> project, ObjectExpression<PixelClassifier> classifier, StringProperty savedName) Create a pane that contains a text field and save button to allow a pixel classifier to be saved in a project.static booleanpromptToCreateObjects(ImageData<BufferedImage> imageData, PixelClassifier classifier, String classifierName) Prompt the user to create objects directly from the pixels of anImageServer.
- 
Constructor Details- 
PixelClassifierUIpublic PixelClassifierUI()
 
- 
- 
Method Details- 
createRegionFilterComboCreate aComboBoxthat can be used to select the pixel classification region filter.- Parameters:
- options-
- Returns:
 
- 
createPixelClassifierButtonspublic static Pane createPixelClassifierButtons(ObjectExpression<ImageData<BufferedImage>> imageData, ObjectExpression<PixelClassifier> classifier, StringExpression classifierName) Create a standard button pane for pixel classifiers, to create, measure and classify objects.- Parameters:
- imageData- expression that provides the- ImageDatato which the operation should be applied
- classifier- expression that provides the- PixelClassifierthat will be used
- classifierName- expression that provides the saved name of the classifier. If available, running a command will result in it being logged to the history workflow for later scripting.
- Returns:
- a Panethat may be added to a scene
 
- 
createSavePixelClassifierPanepublic static Pane createSavePixelClassifierPane(ObjectExpression<Project<BufferedImage>> project, ObjectExpression<PixelClassifier> classifier, StringProperty savedName) Create a pane that contains a text field and save button to allow a pixel classifier to be saved in a project.- Parameters:
- project- the current project, within which the classifier can be saved
- classifier- the classifier to save
- savedName- property to store the classifier name. If the user saves the classifier, this will be set to the saved name. Otherwise, if classifier is changed, this will be set to null. Therefore it provides a way to determine if the current classifier has been saved and, if so, what is its name.
- Returns:
- a pane that may be added to a scene
 
- 
promptToCreateObjectspublic static boolean promptToCreateObjects(ImageData<BufferedImage> imageData, PixelClassifier classifier, String classifierName) Prompt the user to create objects directly from the pixels of anImageServer. Often, theImageServerhas been created by applying aPixelClassifier.- Parameters:
- imageData- the- ImageDatato which objects should be added
- classifier- the- ImageServerused to generate objects
- classifierName- the name of the classifier; if not null and the command runs to completion, it will be logged in the history workflow of the- ImageDatafor later scripting.
- Returns:
- true if changes were made, false otherwise
 
 
-