Skip to main content

vsi2tif

License Pip Downloads PyPI version DOI Open In Colab

Tool for converting WSIs from Olympus' cellSens VSI to Generic TIFF.

To quickly get started, see these notebooks (Ubuntu Linux, macOS) for installing the tool, converting your first image, and verifying that the image works with OpenSlide.

Continuous integration

Build Type Status
Integration Tests CI
Unit Tests CI
Linting Checks CI

Requirements

To run the tool, you need to configure bftools and vips. To do that, follow the instructions below for the operating system of interest:

Ubuntu

  1. Download bftools (click here)

  2. Install vips and JDK

sudo apt update
sudo apt-get install openjdk-8-jdk
sudo apt install libvips-tools

macOS

  1. Download bftools (click here)

  2. Install vips and JDK

brew install --cask zulu@8
brew install vips

Windows

To install bftools and vips, I recommend using Powershell as much as possible to automate the installation steps.

  1. Download bftools (click here)

  2. Download vips binary from Windows from here or use wget or similar

https://github.com/libvips/build-win64-mxe/releases/download/v8.15.3/vips-dev-w64-all-8.15.3.zip
  1. Uncompress downloaded file and place it at an appropriate place, like at home
unzip ~/Downloads/vips-dev-w64-all-8.15.3.zip
mv ~/Downloads/vips-dev-w64-all-8.15.3/vips-dev-8.15/ ~/vips-dev-8.15/
  1. Add path to vips.exe to the PATH (requires powershell administrator)
$Env:PATH += ";$HOME/vips-dev-8.15/bin/"

Installation

Install from source:

pip install git+https://github.com/andreped/vsi2tif

Usage

The conversion tool is available through a command line interface (CLI).

Example for converting a single WSI:

vsi2tif -i /path/to/olympus/image.vsi -o /path/to/converted/image.tif -b /path/to/bftools/bfconvert

Here is an example to perform batch conversion of a folder of WSIs:

vsi2tif -i /path/to/olympus/wsis/ -o /path/to/converted/wsis/directory/ -b /path/to/bftools/bfconvert

Comprehensive CLI documentation can be seen below:

usage: vsi2tif [-h] -i INPUT -o OUTPUT -b BFCONVERT [-c COMPRESSION] [-s TILESIZE] [-q QUALITY] [-m MAX_MEM] [-v VERBOSE] [--remove-name-spaces] [-p PLANE] [--noskip-converted] [-f EXTENSION]

vsi2tif - simple tool for converting images from cellSens VSI to Generic TIFF

options:
  -h, --help            show this help message and exit
  -i INPUT, --input INPUT
                        folder with input files
  -o OUTPUT, --output OUTPUT
                        folder for output files
  -b BFCONVERT, --bfconvert BFCONVERT
                        path to bfconvert tool
  -c COMPRESSION, --compression COMPRESSION
                        compression technique for final image - default 'jpeg'
  -s TILESIZE, --tilesize TILESIZE
                        tile size to use during both conversion steps - default 1024
  -q QUALITY, --quality QUALITY
                        compression quality used with JPEG compression - default 87
  -m MAX_MEM, --max-mem MAX_MEM
                        set maximum memory in the java vm - default 32
  -v VERBOSE, --verbose VERBOSE
                        set verbosity level - default 1
  --remove-name-spaces  replace spaces in filename with underscores in batch mode
  -p PLANE, --plane PLANE
                        image plane to convert image from. If set to -1, all series are converted and the largest is kept - default 0
  --noskip-converted    To specifically request existing files to be converted again
  -f EXTENSION, --extension EXTENSION
                        extension type to consider (e.g., .vsi)

License

This project has MIT license.

How to cite DOI

If you found this tool useful in your research, please cite the following:

@software{pedersen2024vsi2tif,
  author       = {André Pedersen and David Bouget and Sebastian Krossa and Erik Smistad},
  title        = {{andreped/vsi2tif: v0.1.4}},
  month        = sep,
  year         = 2024,
  publisher    = {Zenodo},
  version      = {v0.1.4},
  doi          = {10.5281/zenodo.13745169},
  url          = {https://doi.org/10.5281/zenodo.13745169}
}

Metadata

Release files for vsi2tif 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vsi2tif 0.1.6
File Size Uploaded
vsi2tif-0.1.6.tar.gz 10.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vsi2tif 0.1.6
File Interpreter ABI Platform
vsi2tif-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 19.9 kB

Release files / vsi2tif-0.1.6.tar.gz

Download URL vsi2tif-0.1.6.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c72cd0eef40127a969b05e9ff939a038b6655e90342ee2cc865931345f9a067d
BLAKE2b-256 checksum
How to use checksums
386fcc202e334be89fa7af96343c63e7b2ce975e0e4f1c8a83b3fa37b663dac0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.11

Release files / vsi2tif-0.1.6-py3-none-any.whl

Download URL vsi2tif-0.1.6-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
42dad429ddf815f7f9717e2868550e1aa07113f7bf6a027e857a599e8cf269f1
BLAKE2b-256 checksum
How to use checksums
b4ff6993f0672bde613a1e873292e1fb28c722f29f0c881d50a5826fbe31204c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.11

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page