ngawari


Namengawari JSON
Version 0.1.14 PyPI version JSON
download
home_pageNone
SummaryA simple and functional toolkit for working with data in VTK.
upload_time2025-11-05 14:35:37
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Ngawari

Ngawari is a Python-based toolkit for simplifying operations in data analysis and processing, particularly focused on medical imaging and computational geometry. It is built heavily on top of the [VTK library](https://vtk.org/).

## Features

- Advanced geometric calculations and transformations
- Medical imaging data processing
- Statistical analysis tools
- 3D visualization capabilities

## Installation

To install Ngawari, run the following command:

```bash
pip install ngawari
```

## Usage

Here's a quick example of how to use Ngawari:

```python
from ngawari import ftk, fIO, vtkfilters
import numpy as np

# Create a simple sphere
sphere = vtkfilters.buildSphereSource([0, 0, 0], radius=1.0)

# Get points as numpy array
points = vtkfilters.getPtsAsNumpy(sphere)

# Add a scalar array
vtkfilters.setArrayFromNumpy(sphere, points[:, 0], "x_coords", SET_SCALAR=True)

# Apply a filter
smoothed = vtkfilters.smoothTris(sphere, iterations=10)

# Write to file
fIO.writeVTKFile(smoothed, "smoothed_sphere.vtp")

# Build image over sphere:
image = vtkfilters.buildRawImageDataFromPolyData(smoothed, res=[0.1,0.1,0.1])

# Add a scalar array to the image
vtkfilters.setArrayFromNumpy(image, np.random.rand(image.GetNumberOfPoints()), "random_scalar", SET_SCALAR=True)

# Null scalars outside sphere
image_nulled = vtkfilters.filterNullOutsideSurface(image, smoothed)

# Write to file
fIO.writeVTKFile(image_nulled, "image_over_sphere.vti")
```

For more detailed usage instructions, please refer to the documentation.

## Documentation 

Full documentation is available at [https://fraser29.github.io/ngawari/](https://fraser29.github.io/ngawari/)

## Contributing

We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for more details.

## License

Ngawari is released under the MIT License. See the [LICENSE](LICENSE) file for more details.

## Contact

For any questions or support, please open an issue on our [GitHub repository](https://github.com/fraser29/ngawari) or contact us at support@ngawari.com.

## Dependencies

This project uses the following major dependencies:
- VTK (BSD 3-Clause License) - https://vtk.org/ 
            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ngawari",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "\"Fraser M. Callaghan\" <callaghan.fm@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/b0/df/1452bb4bdcc600a3619f8d708b2aa340196da7d73d00363142d68812564e/ngawari-0.1.14.tar.gz",
    "platform": null,
    "description": "# Ngawari\n\nNgawari is a Python-based toolkit for simplifying operations in data analysis and processing, particularly focused on medical imaging and computational geometry. It is built heavily on top of the [VTK library](https://vtk.org/).\n\n## Features\n\n- Advanced geometric calculations and transformations\n- Medical imaging data processing\n- Statistical analysis tools\n- 3D visualization capabilities\n\n## Installation\n\nTo install Ngawari, run the following command:\n\n```bash\npip install ngawari\n```\n\n## Usage\n\nHere's a quick example of how to use Ngawari:\n\n```python\nfrom ngawari import ftk, fIO, vtkfilters\nimport numpy as np\n\n# Create a simple sphere\nsphere = vtkfilters.buildSphereSource([0, 0, 0], radius=1.0)\n\n# Get points as numpy array\npoints = vtkfilters.getPtsAsNumpy(sphere)\n\n# Add a scalar array\nvtkfilters.setArrayFromNumpy(sphere, points[:, 0], \"x_coords\", SET_SCALAR=True)\n\n# Apply a filter\nsmoothed = vtkfilters.smoothTris(sphere, iterations=10)\n\n# Write to file\nfIO.writeVTKFile(smoothed, \"smoothed_sphere.vtp\")\n\n# Build image over sphere:\nimage = vtkfilters.buildRawImageDataFromPolyData(smoothed, res=[0.1,0.1,0.1])\n\n# Add a scalar array to the image\nvtkfilters.setArrayFromNumpy(image, np.random.rand(image.GetNumberOfPoints()), \"random_scalar\", SET_SCALAR=True)\n\n# Null scalars outside sphere\nimage_nulled = vtkfilters.filterNullOutsideSurface(image, smoothed)\n\n# Write to file\nfIO.writeVTKFile(image_nulled, \"image_over_sphere.vti\")\n```\n\nFor more detailed usage instructions, please refer to the documentation.\n\n## Documentation \n\nFull documentation is available at [https://fraser29.github.io/ngawari/](https://fraser29.github.io/ngawari/)\n\n## Contributing\n\nWe welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for more details.\n\n## License\n\nNgawari is released under the MIT License. See the [LICENSE](LICENSE) file for more details.\n\n## Contact\n\nFor any questions or support, please open an issue on our [GitHub repository](https://github.com/fraser29/ngawari) or contact us at support@ngawari.com.\n\n## Dependencies\n\nThis project uses the following major dependencies:\n- VTK (BSD 3-Clause License) - https://vtk.org/ ",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A simple and functional toolkit for working with data in VTK.",
    "version": "0.1.14",
    "project_urls": {
        "Documentation": "https://fraser29.github.io/ngawari",
        "Homepage": "https://github.com/fraser29/ngawari"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ef821647710e5d7de1431936e05ddaa3b03cb2d00100435804d0a25d987fc2ec",
                "md5": "900ceca3788d0ad53a100c8a4970d90f",
                "sha256": "e165a83dd0b71351617d6721416897f07d9add811f83b3e203bf380d8f8c41ea"
            },
            "downloads": -1,
            "filename": "ngawari-0.1.14-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "900ceca3788d0ad53a100c8a4970d90f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 55736,
            "upload_time": "2025-11-05T14:35:36",
            "upload_time_iso_8601": "2025-11-05T14:35:36.621140Z",
            "url": "https://files.pythonhosted.org/packages/ef/82/1647710e5d7de1431936e05ddaa3b03cb2d00100435804d0a25d987fc2ec/ngawari-0.1.14-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b0df1452bb4bdcc600a3619f8d708b2aa340196da7d73d00363142d68812564e",
                "md5": "c0f95feeef342674e6fba1d068a7ea70",
                "sha256": "62f5cf5c3d0aaa282f72ac4954d7efc4047636b9bdde7e5e0dd8b98fa0ac18b0"
            },
            "downloads": -1,
            "filename": "ngawari-0.1.14.tar.gz",
            "has_sig": false,
            "md5_digest": "c0f95feeef342674e6fba1d068a7ea70",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 66788,
            "upload_time": "2025-11-05T14:35:37",
            "upload_time_iso_8601": "2025-11-05T14:35:37.856888Z",
            "url": "https://files.pythonhosted.org/packages/b0/df/1452bb4bdcc600a3619f8d708b2aa340196da7d73d00363142d68812564e/ngawari-0.1.14.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-11-05 14:35:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "fraser29",
    "github_project": "ngawari",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "ngawari"
}
        
Elapsed time: 1.88312s