Skip to content

Simple tool for converting WSIs from cellSens VSI to pyramidal TIFF

License

Notifications You must be signed in to change notification settings

AICAN-Research/vsi2tif

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CI CI License

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

A simple Jupyter Notebook can be seen here demonstrating how use the tool.

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

  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
  1. Download bftools (click here)

  2. Install vips and JDK

brew install --cask zulu@8
brew install vips

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/"

Install from source:

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

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] [-p PLANE] [-q QUALITY] [-m MAX_MEM] [-v VERBOSE]

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
  -s TILESIZE, --tilesize TILESIZE
                        tile size to use during both conversion steps
  -p PLANE, --plane PLANE
                        which image plane to convert image from
  -q QUALITY, --quality QUALITY
                        compression quality used with JPEG compression
  -m MAX_MEM, --max-mem MAX_MEM
                        set maximum memory in the java vm
  -v VERBOSE, --verbose VERBOSE
                        set verbosity level

This project has MIT license.

About

Simple tool for converting WSIs from cellSens VSI to pyramidal TIFF

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 97.2%
  • Python 2.6%
  • Shell 0.2%