Package qupath.process.gui.commands.ml
Class PixelClassifierTraining
java.lang.Object
qupath.process.gui.commands.ml.PixelClassifierTraining
Helper class for training a pixel classifier.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classWrapper for training data.
- 
Constructor SummaryConstructorsConstructorDescriptionPixelClassifierTraining(ImageDataOp featureCalculator) Create a new pixel classifier helper, to support generating training data.
- 
Method SummaryModifier and TypeMethodDescriptioncreateTrainingData(Collection<ImageData<BufferedImage>> imageData) Create training data, using a label map automatically generated from the available classifications.createTrainingData(ImageData<BufferedImage> imageData) Create training data, using a label map automatically generated from the available classifications.createTrainingDataForLabelMap(Collection<ImageData<BufferedImage>> imageData, Map<PathClass, Integer> labels) Get a classifier training map, using a predefined label map (which determines which classifications to use).Get the strategy for handling the boundaries of area annotations.Get anImageDataOpused for feature calculation.Get the resolution at which the training should occur.voidsetBoundaryStrategy(BoundaryStrategy strategy) Set the strategy for handling the boundaries of area annotations.voidsetFeatureOp(ImageDataOp featureOp) Set theImageDataOpused to calculate features.voidSet the resolution at which the training should occur.
- 
Constructor Details- 
PixelClassifierTrainingCreate a new pixel classifier helper, to support generating training data.- Parameters:
- featureCalculator-
 
 
- 
- 
Method Details- 
getFeatureOpGet anImageDataOpused for feature calculation.- Returns:
 
- 
getResolutionGet the resolution at which the training should occur.- Returns:
 
- 
setResolutionSet the resolution at which the training should occur.- Parameters:
- cal-
 
- 
setFeatureOpSet theImageDataOpused to calculate features.- Parameters:
- featureOp-
 
- 
setBoundaryStrategySet the strategy for handling the boundaries of area annotations.- Parameters:
- strategy-
 
- 
getBoundaryStrategyGet the strategy for handling the boundaries of area annotations.- Returns:
 
- 
createTrainingDatapublic PixelClassifierTraining.ClassifierTrainingData createTrainingData(ImageData<BufferedImage> imageData) throws IOException Create training data, using a label map automatically generated from the available classifications.- Parameters:
- imageData-
- Returns:
- Throws:
- IOException
 
- 
createTrainingDatapublic PixelClassifierTraining.ClassifierTrainingData createTrainingData(Collection<ImageData<BufferedImage>> imageData) throws IOException Create training data, using a label map automatically generated from the available classifications.- Parameters:
- imageData-
- Returns:
- Throws:
- IOException
 
- 
createTrainingDataForLabelMappublic PixelClassifierTraining.ClassifierTrainingData createTrainingDataForLabelMap(Collection<ImageData<BufferedImage>> imageData, Map<PathClass, Integer> labels) throws IOExceptionGet a classifier training map, using a predefined label map (which determines which classifications to use).- Parameters:
- imageData- collection of- ImageDataused for training
- labels- map linking classifications to labels in the output; may be null, in which case a label map will be generated from the data
- Returns:
- a PixelClassifierTraining.ClassifierTrainingDataobject representing training data
- Throws:
- IOException
 
 
-