Metadata-Version: 2.3
Name: mrc2omezarr
Version: 0.3
Summary: Command line tool to convert MRC-files to OME-Zarr.
Project-URL: Repository, https://github.com/uermel/mrc2omezarr.git
Project-URL: Issues, https://github.com/uermel/mrc2omezarr/issues
Author-email: "Utz H. Ermel" <utz@ermel.me>
License: MIT License
        
        Copyright (c) 2024 Utz H. Ermel
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: conversion,cryo-et,cryoet,mrc,ome,tomography,zarr
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.9
Requires-Dist: click
Requires-Dist: fsspec
Requires-Dist: mrcfile
Requires-Dist: numpy
Requires-Dist: ome-zarr
Requires-Dist: pydantic-ome-ngff
Requires-Dist: pydantic>2
Requires-Dist: zarr<3
Provides-Extra: dev
Requires-Dist: black; extra == 'dev'
Requires-Dist: ipython; extra == 'dev'
Requires-Dist: notebook; extra == 'dev'
Requires-Dist: pre-commit; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Description-Content-Type: text/markdown

# mrc2omezarr

Command line tool for conversion from MRC to multiscale OME-Zarr format.

Default settings produce Zarr-files similar to those on the CZI cryoET data portal:

- Files contain one image
- Scales: 1x, 2x, 4x (original resolution)
- Scale transformations transform to angstrom coordinates
- Chunk size: 256, 256, 256

The original MRC-header is retained as a dictionary in the root .zattrs file.

Input as well as output can be local or remote. For remote files include the protocol in the filename, e.g. `s3://bucket/path/to/file.mrc`.

## Install

```bash
git clone https://github.com/uermel/mrc2omezarr.git
cd mrc2omezarr
pip install .
```

## Usage

```bash
Usage: mrc2omezarr [OPTIONS]

Options:
  --mrc-path TEXT                 Path to the MRC file. Include the protocol
                                  if necessary. (e.g. s3://)  [required]
  --zarr-path TEXT                Path to the output Zarr file. Include the
                                  protocol if necessary. (e.g. s3://)
                                  [required]
  --permissive / --no-permissive  Whether to read the MRC file in permissive
                                  mode.  [default: no-permissive]
  --overwrite / --no-overwrite    Whether to overwrite the output Zarr file.
                                  [default: overwrite]
  --scale-factors TEXT            Scale factors for multiscale pyramid. Comma-
                                  separated list of integers.  [default:
                                  1,2,4]
  --voxel-size TEXT               Voxel size in Angstroms. Comma-separated
                                  list of floats or single float. If not
                                  provided, it will be read from the MRC
                                  header.
  --is-image-stack / --no-is-image-stack
                                  Whether the data is an image stack
                                  (determined from MRC-header by default).
  --chunk-size INTEGER            Chunk size for the Zarr file.  [default:
                                  256]
  --filesystem-args TEXT          Path to a JSON file containing additional
                                  arguments to pass to the fsspec-filesystem.
  --help                          Show this message and exit.

```
