Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: andreped/vsi2tif
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.1.1
Choose a base ref
...
head repository: andreped/vsi2tif
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on Sep 5, 2024

  1. Copy the full SHA
    6e55570 View commit details
  2. Copy the full SHA
    a3ab2f8 View commit details
  3. Merge pull request #21 from andreped/windows-support

    Added support for Windows; only installation steps needed updating
    andreped authored Sep 5, 2024
    Copy the full SHA
    41e5c6d View commit details
  4. Error handling during conversion; fixed env bug to allow vips to be a…

    …ccessible from subprocess (#22)
    
    * Implemented run_wrapper() method to handle verbosity and fix env bug
    
    * use wrapper in convert methods; handle errors gracefully
    
    * Skip images that fail
    
    * Linted code
    
    * Bump v0.1.2
    andreped authored Sep 5, 2024
    Copy the full SHA
    8d2629e View commit details

Commits on Sep 10, 2024

  1. Flag to automatically replace spaces in destination filename.

    Preventing crash when suprocessing using filenames with spaces.
    [skip ci]
    dbouget committed Sep 10, 2024
    Copy the full SHA
    c6f3628 View commit details
  2. Copy the full SHA
    52c6dae View commit details
  3. Typo fix

    [skip ci]
    dbouget committed Sep 10, 2024
    Copy the full SHA
    c094b28 View commit details
  4. Run build-test CI on all PRs

    andreped committed Sep 10, 2024
    Copy the full SHA
    56df49b View commit details
  5. Merge pull request #27 from andreped/fix-ci-events

    Run build-test CI on all PRs
    andreped authored Sep 10, 2024
    Copy the full SHA
    6e2d0c3 View commit details
  6. Copy the full SHA
    013d134 View commit details
  7. Copy the full SHA
    f410e19 View commit details
  8. linting

    [skip ci]
    dbouget committed Sep 10, 2024
    Copy the full SHA
    a87de35 View commit details
  9. Copy the full SHA
    a6b2fcb View commit details
  10. linting and flag fix

    [skip ci]
    dbouget committed Sep 10, 2024
    Copy the full SHA
    e5cdf5e View commit details

Commits on Sep 11, 2024

  1. Merge pull request #26 from dbouget/space_fix

    Handling spaces in filenames
    andreped authored Sep 11, 2024
    Copy the full SHA
    de92c1f View commit details
  2. Copy the full SHA
    d35e683 View commit details
  3. Merge pull request #25 from dbouget/dynamic_plane_export

    Dynamic plane export
    andreped authored Sep 11, 2024
    Copy the full SHA
    444fe6e View commit details
  4. Copy the full SHA
    30eadb0 View commit details
  5. Minor reformat of argparse

    andreped committed Sep 11, 2024
    Copy the full SHA
    3fdba64 View commit details
  6. Added missing typehint

    andreped committed Sep 11, 2024
    Copy the full SHA
    9197f37 View commit details
  7. Typofix in help

    andreped committed Sep 11, 2024
    Copy the full SHA
    9a77f81 View commit details
  8. Merge pull request #29 from andreped/ci-cleanup

    CI run event standardization; typehint fixing; argparse refactoring
    andreped authored Sep 11, 2024
    Copy the full SHA
    bb66bc5 View commit details
  9. Copy the full SHA
    6c1039d View commit details
  10. Copy the full SHA
    886d49d View commit details
  11. Linted code

    andreped committed Sep 11, 2024
    Copy the full SHA
    b1fce42 View commit details
  12. Copy the full SHA
    67cbf0e View commit details
  13. Merge pull request #30 from andreped/28-bug-unable-to-debug-cli-script

    Dynamic import handling to allow python debugging
    andreped authored Sep 11, 2024
    Copy the full SHA
    d8de072 View commit details
  14. Bump v0.1.3

    andreped committed Sep 11, 2024
    Copy the full SHA
    9918d77 View commit details
  15. Updated author list

    andreped committed Sep 11, 2024
    Copy the full SHA
    392d8dc View commit details
  16. Copy the full SHA
    c948875 View commit details
  17. Fixed bug in CLI method args

    andreped committed Sep 11, 2024
    Copy the full SHA
    189afd5 View commit details
  18. Copy the full SHA
    dab9931 View commit details
  19. Bump v0.1.4 [no ci]

    andreped committed Sep 11, 2024
    Copy the full SHA
    0a137c5 View commit details
  20. Merge pull request #31 from andreped/integration-tests

    Added integration test workflow
    andreped authored Sep 11, 2024
    Copy the full SHA
    d28724c View commit details
  21. Copy the full SHA
    251e851 View commit details
  22. Merge pull request #33 from andreped/zenodo

    Updated README with citation section and zenodo badge [no ci]
    andreped authored Sep 11, 2024
    Copy the full SHA
    fbee633 View commit details
  23. Copy the full SHA
    66305d3 View commit details
  24. Renamed CI

    andreped committed Sep 11, 2024
    Copy the full SHA
    d4bd6b4 View commit details
  25. Merge pull request #34 from andreped/jpeg-quality

    Change default JPEG compression quality from 85 to 87
    andreped authored Sep 11, 2024
    Copy the full SHA
    18cb725 View commit details
  26. Updated usage in README

    andreped committed Sep 11, 2024
    Copy the full SHA
    9c93d4b View commit details
  27. Copy the full SHA
    57934c0 View commit details
  28. Copy the full SHA
    bc095bc View commit details
  29. Linted code

    andreped committed Sep 11, 2024
    Copy the full SHA
    392e164 View commit details
  30. Bump v0.1.5

    andreped committed Sep 11, 2024
    Copy the full SHA
    e215ca4 View commit details
  31. Merge pull request #35 from andreped/readme-ci-update

    Added default value to argument description in CLI; improved documentation
    andreped authored Sep 11, 2024
    Copy the full SHA
    cd9f9c8 View commit details
  32. Renamed old notebook

    andreped committed Sep 11, 2024
    Copy the full SHA
    fe7ac4b View commit details
  33. Added google colab notebook

    andreped committed Sep 11, 2024
    Copy the full SHA
    40a8bb1 View commit details
  34. Copy the full SHA
    873d051 View commit details
  35. Copy the full SHA
    4d8c36c View commit details
  36. Merge pull request #36 from andreped/google-colab

    Added notebook for Colab; updated README to include both notebooks for macos and ubuntu
    andreped authored Sep 11, 2024
    Copy the full SHA
    95fca62 View commit details
13 changes: 8 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -2,17 +2,17 @@ name: Build Package

on:
push:
branches: ['main']
branches: 'main'
pull_request:
branches: ['main']
branches: 'main'
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@v1
uses: actions/checkout@v4

- name: Set up Python 3.6
uses: actions/setup-python@v2
@@ -26,7 +26,7 @@ jobs:
run: python setup.py bdist_wheel

- name: Upload Python wheel
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: "Python wheel"
path: ./dist/*
@@ -52,7 +52,7 @@ jobs:
run: pip install wheel setuptools

- name: Download artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: "Python wheel"

@@ -63,3 +63,6 @@ jobs:
- name: Test CLI
run: vsi2tif --help
shell: bash

- name: Test Python debugger
run: python vsi2tif/vsi2tif.py --help
88 changes: 88 additions & 0 deletions .github/workflows/integration_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Integration Tests

on:
push:
branches: 'main'
pull_request:
branches: 'main'
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Set up Python 3.6
uses: actions/setup-python@v2
with:
python-version: '3.6'

- name: Install dependencies
run: pip install wheel setuptools

- name: Build package
run: python setup.py bdist_wheel

- name: Upload Python wheel
uses: actions/upload-artifact@v4
with:
name: "Python wheel"
path: ./dist/*
if-no-files-found: error

integration-tests:
needs: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest]
python: ["3.10"]
steps:
- name: Checkout repo
uses: actions/checkout@v1

- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}

- name: Install dependencies
run: pip install wheel setuptools

- name: Download artifact
uses: actions/download-artifact@v4
with:
name: "Python wheel"

- name: Install wheel
run: pip install --find-links=. vsi2tif-*
shell: bash

- name: Install vips
run: |
brew install --cask zulu@8
brew install vips
- name: Install bftools
run: |
wget http://downloads.openmicroscopy.org/latest/bio-formats5.6/artifacts/bftools.zip
unzip bftools.zip
- name: Download test data
run: |
wget https://openslide.cs.cmu.edu/download/openslide-testdata/Olympus/OS-1.zip
wget https://openslide.cs.cmu.edu/download/openslide-testdata/Olympus/OS-2.zip
unzip OS-1.zip
unzip OS-2.zip
mkdir WSI/
mv OS-* WSI/
- name: Test single conversion
run: vsi2tif -i ./WSI/OS-2.vsi -o ./OS-2.tif -b bftools/bfconvert -v 0
shell: bash

- name: Test batch conversion
run: vsi2tif -i ./WSI -o ./converted/ -b bftools/bfconvert -v 0
shell: bash
6 changes: 3 additions & 3 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -2,17 +2,17 @@ name: Check Linting

on:
push:
branches: ['main']
branches: 'main'
pull_request:
branches: ['main']
branches: 'main'
workflow_dispatch:

jobs:
check-linting:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v1
uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v2
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@v1
uses: actions/checkout@v4

- name: Set up Python 3.6
uses: actions/setup-python@v2
@@ -27,7 +27,7 @@ jobs:
run: python setup.py bdist_wheel

- name: Upload Python wheel
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: "Python wheel"
path: ./dist/*
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -11,4 +11,7 @@
*.vsi
*.zip
*bftools/
*.ets
*.ets
*.xml
*.iml
*.idea/
81 changes: 69 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
# [vsi2tif](https://github.com/andreped/vsi2tif#vsi2tif)

[![CI](https://github.com/andreped/vsi2tif/workflows/Build%20Package/badge.svg)](https://github.com/andreped/vsi2tif/actions)
[![CI](https://github.com/andreped/vsi2tif/workflows/Check%20Linting/badge.svg)](https://github.com/andreped/vsi2tif/actions)
[![License](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
[![Pip Downloads](https://img.shields.io/pypi/dm/vsi2tif?label=pip%20downloads&logo=python)](https://pypi.org/project/vsi2tif/)
[![PyPI version](https://badge.fury.io/py/vsi2tif.svg)](https://badge.fury.io/py/vsi2tif)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.13745169.svg)](https://doi.org/10.5281/zenodo.13745169)
<a href="https://colab.research.google.com/gist/andreped/0e945c30ebb01b309a36162d9ec133ae/vsi2tif-converting-olympus-wsi-to-generic-tiff-ubuntu-linux.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>

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

A simple Jupyter Notebook can be seen [here](https://github.com/andreped/vsi2tif/blob/main/notebooks/conversion_tutorial.ipynb) demonstrating how use the tool.
To quickly get started, see these notebooks ([Ubuntu Linux](https://github.com/andreped/vsi2tif/blob/main/notebooks/conversion_tutorial_ubuntu_linux.ipynb), [macOS](https://github.com/andreped/vsi2tif/blob/main/notebooks/conversion_tutorial_macos.ipynb)) for installing the tool, converting your first image, and verifying that the image works with OpenSlide.

## [Continuous integration](https://github.com/andreped/vsi2tif#continuous-integration)

| Build Type | Status |
| - | - |
| **Integration Tests** | [![CI](https://github.com/andreped/vsi2tif/workflows/Integration%20Tests/badge.svg)](https://github.com/andreped/vsi2tif/actions) |
| **Unit Tests** | [![CI](https://github.com/andreped/vsi2tif/workflows/Build%20Package/badge.svg)](https://github.com/andreped/vsi2tif/actions) |
| **Linting Checks** | [![CI](https://github.com/andreped/vsi2tif/workflows/Check%20Linting/badge.svg)](https://github.com/andreped/vsi2tif/actions) |

## [Requirements](https://github.com/andreped/vsi2tif#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:

<details>
<details open>
<summary>

### [Ubuntu](https://github.com/andreped/vsi2tif#ubuntu)</summary>
@@ -44,6 +54,33 @@ brew install vips

</details>

<details>
<summary>

### [Windows](https://github.com/andreped/vsi2tif#windows)</summary>

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

1. Download bftools (click [here](http://downloads.openmicroscopy.org/latest/bio-formats5.6/artifacts/bftools.zip))

2. Download vips binary from Windows from [here](https://github.com/libvips/build-win64-mxe/releases) 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
```

3. 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/
```

4. Add path to `vips.exe` to the PATH (requires powershell administrator)
```
$Env:PATH += ";$HOME/vips-dev-8.15/bin/"
```

</details>


## [Installation](https://github.com/andreped/vsi2tif#installation)

@@ -69,7 +106,7 @@ vsi2tif -i /path/to/olympus/wsis/ -o /path/to/converted/wsis/directory/ -b /path
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]
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
@@ -82,19 +119,39 @@ options:
-b BFCONVERT, --bfconvert BFCONVERT
path to bfconvert tool
-c COMPRESSION, --compression COMPRESSION
compression technique for final image
compression technique for final image - default 'jpeg'
-s TILESIZE, --tilesize TILESIZE
tile size to use during both conversion steps
-p PLANE, --plane PLANE
which image plane to convert image from
tile size to use during both conversion steps - default 1024
-q QUALITY, --quality QUALITY
compression quality used with JPEG compression
compression quality used with JPEG compression - default 87
-m MAX_MEM, --max-mem MAX_MEM
set maximum memory in the java vm
set maximum memory in the java vm - default 32
-v VERBOSE, --verbose VERBOSE
set verbosity level
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](https://github.com/andreped/vsi2tif#license)

This project has [MIT license](https://github.com/andreped/vsi2tif/blob/main/LICENSE).

## [How to cite](https://github.com/andreped/vsi2tif#how-to-cite) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.13745169.svg)](https://doi.org/10.5281/zenodo.13745169)

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}
}
```
File renamed without changes.
Loading