svg-to-vl
svg-to-vl is a standalone command-line Python package (available on PyPI) that converts a hand-traced SVG tissue outline into a VirtualLeaf XML simulation template ("leaf" file). The SVG is typically created by tracing a microscopy image in a vector-drawing tool such as Inkscape, using different colours for the paths to encode different cell types. The tool maps the traced path coordinates onto nodes and cells in the resulting XML template. svg-to-vl streamlines building realistic tissue templates, complementing the previous workflow of hand-editing XML files.
The script facilitates the customisation of multiple parameters, including the designation and directory of the template file, which outlines the overarching structure and general parameters for the XML file alongside the desired filename for the resulting XML document. Additionally, users can specify a scaling factor to appropriately map x and y coordinates to the cellular scale and a colour map for encoding cell types within the SVG file. Furthermore, specific details for each cell type are provided, delineated by colons and their hex colour code, encompassing elements such as cell type and intracellular chemical concentrations.
Prerequisites
- Python >=3.10
- pip
- Inkscape (for tracing the SVG)
Install svg-to-vl and its dependencies from PyPI:
pip install svg-to-vl
Usage
svg-to-vl -i "path to the SVG file (without .svg)" -t "path to the XML template file (with file extension)" -s "numerical scaling factor between image and simulation template" -c "color code"
The colour code has the form of "RGB colour code, cell type, intracellular species concentrations: RGB colour code, cell type, intracellular species: ... : ... :" until all colour codes are described. Default colour code is "ffffff,1,2.251808,0.481961:0000f8,2,2.251808,0.481961:009000,3,2.251808,0.481961:ff0000,3,2.251808,0.481961"
Metadata
Release files for svg-to-vl 2.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| svg_to_vl-2.2.1-py3-none-any.whl | Python 3 | none | any | Details for svg_to_vl-2.2.1-py3-none-any.whl |
Release files / svg_to_vl-2.2.1-py3-none-any.whl
| Download URL | svg_to_vl-2.2.1-py3-none-any.whl |
|---|---|
| Size | 10.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b00a5d934cd9038b8fe6867903bc9a01305fb74218d6a4190b71ae2a00ec4dd2
|
|
BLAKE2b-256 checksum How to use checksums |
8b9f0a5453ffe34dc0b125de9c12ed89098511280c023e6eedd652bb2c75672a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.9
|
Security for svg-to-vl 2.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.