{"id":19102374,"url":"https://github.com/elevans/pysjo","last_synced_at":"2026-06-19T19:31:55.039Z","repository":{"id":235568734,"uuid":"790392991","full_name":"elevans/pysjo","owner":"elevans","description":"A Python wrapper for the SciJava Ops framework.","archived":false,"fork":false,"pushed_at":"2025-01-24T19:38:57.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-22T09:48:59.513Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elevans.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-22T19:50:20.000Z","updated_at":"2025-01-24T19:39:00.000Z","dependencies_parsed_at":"2024-04-26T04:25:04.366Z","dependency_job_id":"03d7cbba-ee9e-45e1-b5c7-b7583c07a1ff","html_url":"https://github.com/elevans/pysjo","commit_stats":null,"previous_names":["elevans/pyops","elevans/pysjo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/elevans/pysjo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elevans%2Fpysjo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elevans%2Fpysjo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elevans%2Fpysjo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elevans%2Fpysjo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elevans","download_url":"https://codeload.github.com/elevans/pysjo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elevans%2Fpysjo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34546192,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-19T02:00:06.005Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T03:55:09.223Z","updated_at":"2026-06-19T19:31:55.033Z","avatar_url":"https://github.com/elevans.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"pysjo: Python wrapper for the SciJava Ops framework\n===\n\npysjo provides easy access to the SciJava Ops framework and helper classes to convert\nbetween ImgLib2 and NumPy array types.\n\n## Installation\n\nWith conda:\n\n```bash\nconda create -n pysjo -c conda-forge imglyb scyjava openjdk\u003e=11\n```\n\nWith mamba\n\n```bash\nmamba create -n pysjo imglyb scyjava openjdk\u003e=11\n```\n\nClone this repository, navigate to the `pysjo` folder and install it with:\n\n```bash\npip install -e .\n```\n\n## Usage\n\n### Initialize SciJava Ops\nTo access the Op environment, import `pysjo` and use the `get_ops()` method:\n\n```python\nimport pysjo\n\n# get an instance of the Op environment\nops = pysjo.init()\n```\n\nWe can check that the Ops environment build was successful by printing the output of `ops.help()`:\n\n```\n\u003e\u003e\u003e ops.help()\n'Namespaces:\n\t\u003e coloc\n\t\u003e convert\n\t\u003e copy\n\t\u003e create\n\t\u003e deconvolve\n\t\u003e expression\n\t\u003e features\n\t\u003e filter\n\t\u003e flim\n\t\u003e geom\n\t\u003e image\n\t\u003e imageMoments\n\t\u003e labeling\n\t\u003e linalg\n\t\u003e logic\n\t\u003e map\n\t\u003e math\n\t\u003e morphology\n\t\u003e segment\n\t\u003e stats\n\t\u003e thread\n\t\u003e threshold\n\t\u003e topology\n\t\u003e transform\n\t\u003e types'\n```\n\nYou can also start the JVM configured for the SciJava Ops framework (_i.e._ the default endpoints)\nwithout building the Op environment by using the `init()` method instead:\n\n```python\nimport pysjo\n\n# initialize the JVM with SciJava endpoints\npysjo.init()\n```\n\n### Opening and saving images\n\nImages can be opened and saved using the `pysjo.io` module (backed by SCIFIO): \n\n```python\nimport pysjo.io as io\n\n# open data as Img\nimg = io.open_as_img(\"/path/to/data.tif\")\n\n# open data as NumPy\nnarr = io.open_as_numpy(\"/path/to/data/tif\")\n```\n\n### Converting between ImgLib2 and NumPy images\n\nImages can be converted between ImgLib2 (_i.e._ `net.imglib2.RandomAccessibleInterval`) and\nNumPy (_i.e._ `numpy.ndarray`) with the `pysjo.convert` module:\n\n```python\nimport pysjo.convert as convert\n\n# convert an Img to a NumPy array\nnarr = convert.imglib_to_numpy(img)\n\n# convert a NumPy array to an Img/RAI\nimg = convert.numpy_to_imglib(narr)\n```\n\n### Accessing ImgLib2 and SciJava classes\n\nCommonly used Java classes for ImgLib2, SCIFIO and other related projects\ncan be accessed through the `pysjo.java` module:\n\n```python\nfrom pysjo.java import imglib2, scifio\n\n# access ImgLib2\nimglib2.ComplexFloatType\nimglib2.DoubleType\nimglib2.Img\n\n# access scifio\nscifio.ImgOpener\nscifio.ImgSaver\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felevans%2Fpysjo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felevans%2Fpysjo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felevans%2Fpysjo/lists"}