Skip to content

ResoLift - Upscale large TIFF images with chunk-based processing

License

Notifications You must be signed in to change notification settings

khersameesh24/ResoLift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ResoLift

Upscale large TIFFs using chunk-based image processing and sharpening

Helper package for the (Spatialxe)[https://github.com/nf-core/spatialxe] pipeline.

The package can be used as a pre-processing step in the image-based segmentation approach in the spatialxe pipeline and is available as a local nextflow module in the pipeline.

For a standalone use case scenario

$ resolift --help
    usage: ResoLift [-h] -i INPUT -o OUTPUT [-s SCALE] [-c CHUNK_SIZE] [-p SHARPEN]

    Upscale large TIFF images using chunk-based processing and sharpening.

    optional arguments:
    -h, --help            show this help message and exit
    -i INPUT, --input INPUT
                            Path to the input TIFF file.
    -o OUTPUT, --output OUTPUT
                            Path to save the upscaled TIFF file.
    -s SCALE, --scale SCALE
                            Scaling factor for resolution increase (default: 2.0).
    -c CHUNK_SIZE, --chunk-size CHUNK_SIZE
                            Number of rows to process at a time (default: 1024).
    -p SHARPEN, --sharpen SHARPEN
                            Strength of the sharpening effect (default: 1.0).

Simplest command line use case

$ resolift --input <input.tif> --output <output.tif>

To increase chunk size for very large tiff (default: 1024)

$ resolift --input <input.tif> --output <output.tif> --chunk-size 2048

To increase sharpness strength (default: 0.5)

$ resolift --input <input.tif> --output <output.tif> --sharpen 1.0

To use resolift as a python package

>>> import resolift as rs
>>> resolift.TiffUpscaler(input_path, output_path, scale_factor2.0, chunk_size=1024, sharpen_strength=0.5)

About

ResoLift - Upscale large TIFF images with chunk-based processing

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages