nifti-converter


Namenifti-converter JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryConvert NIfTI files to usual image formats
upload_time2024-10-24 00:54:02
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseNone
keywords image nifti nii
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # NIfTI Converter

<!-- Specify absolute path to allow navigation from PyPI -->
[日本語](https://github.com/neurodata-tokyo/nifti-converter/blob/main/README.ja.md)

This tool is a command-line application that converts between NIfTI format image files and common image file formats (PNG, TIFF, etc.).

## Installation

```sh
pip install nifti-converter
```

## Usage

### Converting NIfTI to image sequence

```sh
nii2iseq -i <input_file> [-o <output_directory>] [--prefix <prefix>]
```

Options:
- `-i`, `--input`: Path to the NIfTI file
- `-o`, `--output`: Directory to output files (default: same name as input file without extension)
- `--prefix`: Prefix for output file names (default: "")
- `-f`, `--format`: Output file format (default: png)

#### Notes

- This tool only supports 3D NIfTI files. Files containing 4D or higher dimensional data will result in an error.
- Only png and tiff formats are supported for output files.
- Each slice is saved in the format `<prefix><XXX>.<format>` (where XXX is a 3-digit number starting from 000).

### Converting image sequence to NIfTI

```sh
iseq2nii -i <input_directory> [-o <output_file>]
```

Options:
- `-i`, `--input`: Path to the input image directory
- `-o`, `--output`: Output file destination (default: "<input_directory_name>.nii")

## For Developers

### Prerequisites

- [uv](https://docs.astral.sh/uv/)

### Installation

1. Clone this repository
2. Install dependencies:

```sh
cd nifti-converter
uv sync
```

### Testing

To run the modified application locally, execute the following command:

```sh
# Converting NIfTI to image sequence
uv run nii2iseq -i <input_file> [-o <output_directory>] [--prefix <prefix>]
# Converting image sequence to NIfTI
uv run iseq2nii -i <input_directory> [-o <output_file>]
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "nifti-converter",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "image, nifti, nii",
    "author": null,
    "author_email": "\"Neurodata.tokyo\" <contact@neurodata.tokyo>",
    "download_url": "https://files.pythonhosted.org/packages/53/e4/6cf56badbaa5cd7ecd46dc71638246fd637df55a985655bf7de06ad05141/nifti_converter-0.1.0.tar.gz",
    "platform": null,
    "description": "# NIfTI Converter\n\n<!-- Specify absolute path to allow navigation from PyPI -->\n[\u65e5\u672c\u8a9e](https://github.com/neurodata-tokyo/nifti-converter/blob/main/README.ja.md)\n\nThis tool is a command-line application that converts between NIfTI format image files and common image file formats (PNG, TIFF, etc.).\n\n## Installation\n\n```sh\npip install nifti-converter\n```\n\n## Usage\n\n### Converting NIfTI to image sequence\n\n```sh\nnii2iseq -i <input_file> [-o <output_directory>] [--prefix <prefix>]\n```\n\nOptions:\n- `-i`, `--input`: Path to the NIfTI file\n- `-o`, `--output`: Directory to output files (default: same name as input file without extension)\n- `--prefix`: Prefix for output file names (default: \"\")\n- `-f`, `--format`: Output file format (default: png)\n\n#### Notes\n\n- This tool only supports 3D NIfTI files. Files containing 4D or higher dimensional data will result in an error.\n- Only png and tiff formats are supported for output files.\n- Each slice is saved in the format `<prefix><XXX>.<format>` (where XXX is a 3-digit number starting from 000).\n\n### Converting image sequence to NIfTI\n\n```sh\niseq2nii -i <input_directory> [-o <output_file>]\n```\n\nOptions:\n- `-i`, `--input`: Path to the input image directory\n- `-o`, `--output`: Output file destination (default: \"<input_directory_name>.nii\")\n\n## For Developers\n\n### Prerequisites\n\n- [uv](https://docs.astral.sh/uv/)\n\n### Installation\n\n1. Clone this repository\n2. Install dependencies:\n\n```sh\ncd nifti-converter\nuv sync\n```\n\n### Testing\n\nTo run the modified application locally, execute the following command:\n\n```sh\n# Converting NIfTI to image sequence\nuv run nii2iseq -i <input_file> [-o <output_directory>] [--prefix <prefix>]\n# Converting image sequence to NIfTI\nuv run iseq2nii -i <input_directory> [-o <output_file>]\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Convert NIfTI files to usual image formats",
    "version": "0.1.0",
    "project_urls": {
        "Repository": "https://github.com/neurodata-tokyo/nifti-converter"
    },
    "split_keywords": [
        "image",
        " nifti",
        " nii"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "0bdb45c1735ad7169639138ae84d0c75b8e0f9362cb814e86e7a1fcb96671d01",
                "md5": "b433d8c137494139ba7e8c5eacd901e8",
                "sha256": "7fe459875c6ff1b37c84c7451de66e3d3db5384a1aae52f35f219e8934771662"
            },
            "downloads": -1,
            "filename": "nifti_converter-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b433d8c137494139ba7e8c5eacd901e8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 5274,
            "upload_time": "2024-10-24T00:54:01",
            "upload_time_iso_8601": "2024-10-24T00:54:01.119225Z",
            "url": "https://files.pythonhosted.org/packages/0b/db/45c1735ad7169639138ae84d0c75b8e0f9362cb814e86e7a1fcb96671d01/nifti_converter-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "53e46cf56badbaa5cd7ecd46dc71638246fd637df55a985655bf7de06ad05141",
                "md5": "67422cf96418b43418076d7bc4435774",
                "sha256": "9fbe1cdb64cebf8a0d4c411475a3d7327d788b616126e75859b8307759757a09"
            },
            "downloads": -1,
            "filename": "nifti_converter-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "67422cf96418b43418076d7bc4435774",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 14978,
            "upload_time": "2024-10-24T00:54:02",
            "upload_time_iso_8601": "2024-10-24T00:54:02.741093Z",
            "url": "https://files.pythonhosted.org/packages/53/e4/6cf56badbaa5cd7ecd46dc71638246fd637df55a985655bf7de06ad05141/nifti_converter-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-24 00:54:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "neurodata-tokyo",
    "github_project": "nifti-converter",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "nifti-converter"
}
        
Elapsed time: 0.31670s