Expand description
MRC file format library for cryo-EM and tomography
Provides iterator-centric reading and voxel-block writing with SIMD acceleration.
§Architecture
This crate implements a unified encoding/decoding pipeline:
Raw Bytes → Endian Normalization → Typed Values → Type ConversionWith zero-copy fast paths whenever possible.
Structs§
- ExtHeader
- ExtHeader
Mut - Float32
Complex - Header
- Int16
Complex - Mmap
Reader - Memory-mapped MRC file reader.
- Mmap
Writer - Packed4
Bit - Reader
- Slab
Iter Converted - Slab iterator with type conversion support.
- Slice
Iter Converted - Slice iterator with type conversion support.
- Volume
Shape - Volume geometry
- Voxel
Block - Universal representation of voxel chunks
- Writer
- Writer
Builder
Enums§
- Conversion
Path - Conversion path through the 4-layer pipeline.
- Error
- Error type
- File
Endian - Endianness of MRC file data
- Mode
Traits§
- Convert
- Trait for converting between voxel types.
- Endian
Codec - Bidirectional codec for endian-normalized byte conversion.
- Slice
Access - Trait for writers that provide direct slice access to voxel data.
- Voxel
- Trait for MRC voxel types with compile-time mode tracking.
Functions§
- convert_
f16_ slice_ to_ f32 - Batch conversion from f16 to f32.
- convert_
f32_ slice_ to_ f16 - Batch conversion from f32 to f16.
- convert_
i8_ slice_ to_ f32 - Batch conversion from i8 to f32 using SIMD when available.
- convert_
i16_ slice_ to_ f32 - Batch conversion from i16 to f32 using SIMD when available.
- convert_
u8_ slice_ to_ f32 - Batch conversion from u8 to f32 using SIMD when available.
- convert_
u16_ slice_ to_ f32 - Batch conversion from u16 to f32 using SIMD when available.
- create
- Create a new MRC file for writing
- get_
conversion_ path - Determine the optimal conversion path for the given parameters.
- is_
zero_ copy - Check if zero-copy is possible for the given parameters.
- open
- Open an MRC file for reading
- try_
simd_ convert - Attempt SIMD-accelerated conversion from source slice to destination type.