Class BioimageIoTools
- Since:
- v0.4.0
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic DnnModelbuildDnnModel(qupath.bioimageio.spec.Model spec) Attempt to build aDnnModelthat follows this spec as closely as possible.static PatchClassifierParamsbuildPatchClassifierParams(qupath.bioimageio.spec.Model modelSpec, int preferredTileWidth, int preferredTileHeight, ImageOp... inputOps) Create an instance ofPatchClassifierParamsfrom a model spec.static PatchClassifierParamsbuildPatchClassifierParams(qupath.bioimageio.spec.Model model, ImageOp... inputOps) Create an instance ofPatchClassifierParamsfrom a model spec.static ImageOptransformsToOp(Collection<? extends qupath.bioimageio.spec.tensor.Processing> transforms) Create anImageOpthat applies the specified transforms sequentially.static ImageOptransformToOp(qupath.bioimageio.spec.tensor.Processing transform) Create anImageOpthat applies the specified transforms, if possible.
- 
Constructor Details- 
BioimageIoToolspublic BioimageIoTools()
 
- 
- 
Method Details- 
buildDnnModelAttempt to build aDnnModelthat follows this spec as closely as possible.In some instances, the processing steps requires by the spec might not currently be supported by QuPath - see transformToOp(Processing)for more information.- Parameters:
- spec- The model spec
- Returns:
- A (hopefully closely) corresponding model
 
- 
buildPatchClassifierParamspublic static PatchClassifierParams buildPatchClassifierParams(qupath.bioimageio.spec.Model model, ImageOp... inputOps) Create an instance ofPatchClassifierParamsfrom a model spec. This encapsulates some key information QuPath needs for building a model in a way that can be modified and updated according to user requirements.- Parameters:
- model- the model spec to initialize the parameters
- inputOps- optional additional preprocessing ops to apply, before any in the model spec are added
- Returns:
- a parameters object
 
- 
buildPatchClassifierParamspublic static PatchClassifierParams buildPatchClassifierParams(qupath.bioimageio.spec.Model modelSpec, int preferredTileWidth, int preferredTileHeight, ImageOp... inputOps) Create an instance ofPatchClassifierParamsfrom a model spec. This encapsulates some key information QuPath needs for building a model in a way that can be modified and updated according to user requirements.- Parameters:
- modelSpec- the model spec to initialize the parameters
- preferredTileWidth- preferred tile width, or -1 to automatically determine this; the width will be updated based on the spec
- preferredTileHeight- preferred tile height, or -1 to automatically determine this; the height will be updated based on the spec
- inputOps- optional additional preprocessing ops to apply, before any in the model spec are added
- Returns:
- a parameters object
 
- 
transformsToOppublic static ImageOp transformsToOp(Collection<? extends qupath.bioimageio.spec.tensor.Processing> transforms) Create anImageOpthat applies the specified transforms sequentially.Important! This method is experimental and subject to change in future versions. Not all Bioimage Model Zoo transforms are supported by QuPath ops, and ops are generally per tile whereas model zoo transforms sometimes require global statistics (e.g. for normalization). This method will make an attempt to return a suitable op, but it may not be able to incorporate all steps. - Parameters:
- transforms- The transformations in bioimageio model format
- Returns:
- Corresponding image operations.
 
- 
transformToOpCreate anImageOpthat applies the specified transforms, if possible.Important! This method is experimental and subject to change in future versions. Not all Bioimage Model Zoo transforms are supported by QuPath ops, and ops are generally per tile whereas model zoo transforms sometimes require global statistics (e.g. for normalization). This method will make an attempt to return a suitable op, but may return null if no such op is available. - Parameters:
- transform- The transformation in bioimageio model format
- Returns:
- a corresponding image operation.
 
 
-