# Vaa3D in Python Made Easy
Python library for Vaa3D functions.
## Installation
```shell
$ pip install v3d-py-helper
```
By cloning the repo and test the Cyhton usages:
```shell
$ python setup.py build_ext --inplace
```
## Usage
### Loading Vaa3D format data
```python
from v3dpy.loaders import Raw, PBD
raw = Raw()
img = raw.load('path.v3draw')
raw.save('path.v3draw', img)
pbd = PBD()
img = pbd.load('path.v3dpbd')
pbd.save('path.v3dpbd', img)
```
### Loading TeraFly format data
Currently only support Tiff 3D tiles.
```python
from v3dpy.terafly import TeraflyInterface
import numpy as np
t = TeraflyInterface('teraconvert_path')
x, y, z, c = t.get_dim()
# center block
size = np.array(t.get_dim()[:3])
half_block_size = np.array([128, 128, 64]) // 2
start = size // 2 - half_block_size
end = size // 2 + half_block_size - 1
# 4D image, indexed by c, z, y, x
img = t.get_sub_volume(start[0], end[0], start[1], end[1], start[2], end[2])
```
## Toubleshooting
On Windows, MS BuildTool >= 16 is required to build the wheel.
## Useful Links
Github project: https://github.com/SEU-ALLEN-codebase/v3d-py-helper
Vaa3D source: https://github.com/Vaa3D/v3d_external
Documentation: https://SEU-ALLEN-codebase.github.io/v3d-py-helper
Raw data
{
"_id": null,
"home_page": "",
"name": "v3d-py-helper",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "",
"keywords": "vaa3d,neuron-morphology,image-processing",
"author": "",
"author_email": "Zuohan Zhao <zzhmark@126.com>, Yufeng Liu <yufeng_liu@seu.edu.cn>",
"download_url": "https://files.pythonhosted.org/packages/00/42/bd7a3bec31fdc24fb827aacc99dd93c66ff9a876d1bf9a13b706d4bea8d9/v3d-py-helper-0.2.21.tar.gz",
"platform": null,
"description": "# Vaa3D in Python Made Easy\r\nPython library for Vaa3D functions.\r\n\r\n## Installation\r\n\r\n```shell\r\n$ pip install v3d-py-helper\r\n```\r\n\r\nBy cloning the repo and test the Cyhton usages:\r\n```shell\r\n$ python setup.py build_ext --inplace\r\n```\r\n\r\n## Usage\r\n\r\n### Loading Vaa3D format data\r\n\r\n```python\r\nfrom v3dpy.loaders import Raw, PBD\r\n\r\nraw = Raw()\r\nimg = raw.load('path.v3draw')\r\nraw.save('path.v3draw', img)\r\n\r\npbd = PBD()\r\nimg = pbd.load('path.v3dpbd')\r\npbd.save('path.v3dpbd', img)\r\n```\r\n\r\n### Loading TeraFly format data\r\n\r\nCurrently only support Tiff 3D tiles.\r\n\r\n```python\r\nfrom v3dpy.terafly import TeraflyInterface\r\nimport numpy as np\r\n\r\nt = TeraflyInterface('teraconvert_path')\r\nx, y, z, c = t.get_dim()\r\n# center block\r\nsize = np.array(t.get_dim()[:3])\r\nhalf_block_size = np.array([128, 128, 64]) // 2\r\nstart = size // 2 - half_block_size\r\nend = size // 2 + half_block_size - 1\r\n\r\n# 4D image, indexed by c, z, y, x \r\nimg = t.get_sub_volume(start[0], end[0], start[1], end[1], start[2], end[2])\r\n```\r\n\r\n## Toubleshooting\r\n\r\nOn Windows, MS BuildTool >= 16 is required to build the wheel.\r\n\r\n\r\n## Useful Links\r\n\r\nGithub project: https://github.com/SEU-ALLEN-codebase/v3d-py-helper\r\n\r\nVaa3D source: https://github.com/Vaa3D/v3d_external\r\n\r\nDocumentation: https://SEU-ALLEN-codebase.github.io/v3d-py-helper\r\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "Make Vaa3D functions available for high-performance python computation.",
"version": "0.2.21",
"project_urls": {
"Documentation": "https://SEU-ALLEN-codebase.github.io/v3d-py-helper",
"GitHub Project": "https://github.com/SEU-ALLEN-codebase/v3d-py-helper",
"Vaa3D Source": "https://github.com/Vaa3D/v3d_external"
},
"split_keywords": [
"vaa3d",
"neuron-morphology",
"image-processing"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "326cbe1119b7e8820032f448abb5393a83157c3a42bae9aefff69b0e6970cba7",
"md5": "3b757fb8a441d00da6b87fc350f7bab2",
"sha256": "97e684e8ff5925f2614f8f07fa165e23886af87a7f1f13f000a9ccd18c017f92"
},
"downloads": -1,
"filename": "v3d_py_helper-0.2.21-cp310-cp310-win_amd64.whl",
"has_sig": false,
"md5_digest": "3b757fb8a441d00da6b87fc350f7bab2",
"packagetype": "bdist_wheel",
"python_version": "cp310",
"requires_python": ">=3.10",
"size": 372790,
"upload_time": "2024-01-31T05:04:59",
"upload_time_iso_8601": "2024-01-31T05:04:59.549276Z",
"url": "https://files.pythonhosted.org/packages/32/6c/be1119b7e8820032f448abb5393a83157c3a42bae9aefff69b0e6970cba7/v3d_py_helper-0.2.21-cp310-cp310-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0042bd7a3bec31fdc24fb827aacc99dd93c66ff9a876d1bf9a13b706d4bea8d9",
"md5": "1af9bbd8aaff20034df738503ad8ad40",
"sha256": "65786b391e2396783cee8155cc0931983b23575258e22d8f64e61c214910e1bb"
},
"downloads": -1,
"filename": "v3d-py-helper-0.2.21.tar.gz",
"has_sig": false,
"md5_digest": "1af9bbd8aaff20034df738503ad8ad40",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 2447280,
"upload_time": "2024-01-31T05:05:05",
"upload_time_iso_8601": "2024-01-31T05:05:05.350305Z",
"url": "https://files.pythonhosted.org/packages/00/42/bd7a3bec31fdc24fb827aacc99dd93c66ff9a876d1bf9a13b706d4bea8d9/v3d-py-helper-0.2.21.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-31 05:05:05",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "SEU-ALLEN-codebase",
"github_project": "v3d-py-helper",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "v3d-py-helper"
}