Package qupath.lib.experimental.pixels
Interface OutputHandler<S,T,U>  
- Type Parameters:
- S- the type of image
- T- the type of mask
- U- the type of output
- All Known Implementing Classes:
- OutputHandler.ObjectOutputHandler
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A functional interface for handling the output of a 
Processor.
 This may (for example) add measurements to the parent object, set the classification, or create child objects.
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic classstatic interface
- 
Method SummaryModifier and TypeMethodDescriptiondefault OutputHandler<S, T, U> andThen(OutputHandler<S, T, U> after) Append a second output handler to this one.static <S,T, U> OutputHandler <S, T, U> Create a basic do-nothing output handler that consumes the output with no changes.static <S,T, U> OutputHandler <S, T, U> createMaskAndSplitObjectOutputHandler(OutputHandler.OutputToObjectConverter<S, T, U> converter) Create an output handler that can be used to add objects to the parent object, applying the ROI mask and splitting objects with discontinuous ROIs.static <S,T, U> OutputHandler <S, T, U> createObjectOutputHandler(OutputHandler.OutputToObjectConverter<S, T, U> converter) Create an output handler that can be used to add objects to the parent object, applying the ROI mask.static <S,T, U> OutputHandler <S, T, U> createUnmaskedObjectOutputHandler(OutputHandler.OutputToObjectConverter<S, T, U> converter) Create an output handler that can be used to add objects to the parent object.booleanhandleOutput(Parameters<S, T> params, U output) Optional method to handle the output of aProcessor.static booleanhandleOutputClassification(Parameters<?, ?> params, String output) Handle the output of a pixel processor by setting a PathClass, given by its name.static booleanhandleOutputClassification(Parameters<?, ?> params, PathClass output) Handle the output of a pixel processor by setting a PathClass.static booleanhandleOutputMeasurements(Parameters<?, ?> params, Map<String, ? extends Number> output) Handle the output of a pixel processor by adding measurements to the path object.default OutputHandler<S, T, U> orElse(OutputHandler<S, T, U> after) Append a second output handler to this one, but only call it if this one returns false.
- 
Method Details- 
handleOutputOptional method to handle the output of aProcessor. For example, this might assign classifications, add measurements, or add child objects.- Parameters:
- params- the processing parameters
- output- the generated output
 
- 
andThenAppend a second output handler to this one. Both are called, and return true if either returns true.- Parameters:
- after-
- Returns:
 
- 
orElseAppend a second output handler to this one, but only call it if this one returns false. The return value of the handler is then true if either returns true.- Parameters:
- after-
- Returns:
 
- 
createUnmaskedObjectOutputHandlerstatic <S,T, OutputHandler<S,U> T, createUnmaskedObjectOutputHandlerU> (OutputHandler.OutputToObjectConverter<S, T, U> converter) Create an output handler that can be used to add objects to the parent object. This requires anOutputHandler.OutputToObjectConverterto convert the output to a list of objects.This method does not apply any masking to the parent ROI, but assumed this has already been applied elsewhere. Consequently, it can result in objects being created that extend beyond the ROI. To avoid this, use createMaskAndSplitObjectOutputHandler(OutputToObjectConverter)or #createMaskedObjectOutputHandler(OutputToObjectConverter)}.- Type Parameters:
- S- the image type
- T- the mask type
- U- the output type
- Parameters:
- converter-
- Returns:
 
- 
createObjectOutputHandlerstatic <S,T, OutputHandler<S,U> T, createObjectOutputHandlerU> (OutputHandler.OutputToObjectConverter<S, T, U> converter) Create an output handler that can be used to add objects to the parent object, applying the ROI mask. This can result in objects with discontinuous ROIs. This requires anOutputHandler.OutputToObjectConverterto convert the output to a list of objects.- Type Parameters:
- S- the image type
- T- the mask type
- U- the output type
- Parameters:
- converter-
- Returns:
- See Also:
 
- 
createMaskAndSplitObjectOutputHandlerstatic <S,T, OutputHandler<S,U> T, createMaskAndSplitObjectOutputHandlerU> (OutputHandler.OutputToObjectConverter<S, T, U> converter) Create an output handler that can be used to add objects to the parent object, applying the ROI mask and splitting objects with discontinuous ROIs. This requires anOutputHandler.OutputToObjectConverterto convert the output to a list of objects.- Type Parameters:
- S- the image type
- T- the mask type
- U- the output type
- Parameters:
- converter-
- Returns:
- See Also:
 
- 
consumeOutputCreate a basic do-nothing output handler that consumes the output with no changes. This returns true regardless of input, without doing anything further.- Type Parameters:
- S-
- T-
- U-
- Returns:
 
- 
handleOutputMeasurementsstatic boolean handleOutputMeasurements(Parameters<?, ?> params, Map<String, ? extends Number> output) Handle the output of a pixel processor by adding measurements to the path object.- Parameters:
- params-
- output-
 
- 
handleOutputClassificationHandle the output of a pixel processor by setting a PathClass.- Parameters:
- params-
- output-
 
- 
handleOutputClassificationHandle the output of a pixel processor by setting a PathClass, given by its name.- Parameters:
- params-
- output-
 
 
-