Skip to content

Commit

Permalink
Merge pull request #35 from andreped/readme-ci-update
Browse files Browse the repository at this point in the history
Added default value to argument description in CLI; improved documentation
  • Loading branch information
andreped authored Sep 11, 2024
2 parents 18cb725 + e215ca4 commit cd9f9c8
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 18 deletions.
29 changes: 18 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
# [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)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.13745169.svg)](https://doi.org/10.5281/zenodo.13745169)

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.

## [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:
Expand Down Expand Up @@ -97,7 +103,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]
vsi2tif - simple tool for converting images from cellSens VSI to Generic TIFF
Expand All @@ -110,24 +116,25 @@ 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
which image plane to convert image from. If set to -1, all series are converted and the largest is kept - default 0
```

## [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)
## [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:
```
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name="vsi2tif",
version="0.1.4",
version="0.1.5",
author="André Pedersen, Sebastian Krossa, Erik Smistad, David Bouget",
author_email="[email protected]",
license="MIT",
Expand Down
19 changes: 13 additions & 6 deletions vsi2tif/vsi2tif.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,25 @@ def main():
parser.add_argument("-i", "--input", help="folder with input files", required=True)
parser.add_argument("-o", "--output", help="folder for output files", required=True)
parser.add_argument("-b", "--bfconvert", help="path to bfconvert tool", required=True)
parser.add_argument("-c", "--compression", help="compression technique for final image", default="jpeg")
parser.add_argument("-s", "--tilesize", help="tile size to use during both conversion steps", default=1024)
parser.add_argument("-q", "--quality", help="compression quality used with JPEG compression", default=87)
parser.add_argument("-m", "--max-mem", help="set maximum memory in the java vm", default=32)
parser.add_argument("-v", "--verbose", help="set verbosity level", default=1, type=int)
parser.add_argument(
"-c", "--compression", help="compression technique for final image - default 'jpeg'", default="jpeg"
)
parser.add_argument(
"-s", "--tilesize", help="tile size to use during both conversion steps - default 1024", default=1024
)
parser.add_argument(
"-q", "--quality", help="compression quality used with JPEG compression - default 87", default=87
)
parser.add_argument("-m", "--max-mem", help="set maximum memory in the java vm - default 32", default=32)
parser.add_argument("-v", "--verbose", help="set verbosity level - default 1", default=1, type=int)
parser.add_argument(
"--remove-name-spaces", help="replace spaces in filename with underscores in batch mode", action="store_true"
)
parser.add_argument(
"-p",
"--plane",
help="which image plane to convert image from. If set to -1, all series are converted and the largest is kept",
help="image plane to convert image from. If set to -1, all series are converted and "
"the largest is kept - default 0",
default=0,
type=int,
)
Expand Down

0 comments on commit cd9f9c8

Please sign in to comment.