Python based Cine Decoder to get a Phantom cine file metadata and pixel arrays
Project description
CineReader
CineReader is a Python module for reading Vision Research Phantom .cine files. It allows you to extract metadata, image frames, and precise timestamps from high-speed camera recordings.
Features
- Read Phantom Cine Metadata: Extracts detailed acquisition and camera information from
.cinefiles. - Image Extraction: Efficiently reads single frames or ranges of frames as NumPy arrays, supporting various bit depths and compression formats (including 10-bit and 12-bit packed data).
- Timestamp Handling: Retrieves precise per-frame timestamps and computes time-from-trigger arrays.
- NumPy & Pandas Integration: Returns data in familiar scientific Python formats for easy analysis.
- Optimized Performance: Uses Numba for fast unpacking of compressed image data.
Typical Usage
import cinereader as cr
path = "example.cine"
metadata = cr.read_metadata(path)
metadata, images, timestamps = cr.read(path, start=metadata.FirstImageNo)
- metadata: Detailed information about the cine file and acquisition.
- images: List of NumPy arrays, each representing a frame.
- timestamps: Array of timestamps for each frame, relative to trigger.
Requirements
- Python 3.10+
- numpy 2.2+
- pandas
- numba
Developed by AMETEK Vision Research.
Changelog
06-16-2025, v1.4.1
- minor clean up and repackage after initial release of CineAnalyzer
02-13-2025, v1.1.0
- Added DecimatedFrameRate variable to access the effective frame rate of decimated cines
10-30-2024, v1.0.0
- Clean up for beta release
10-24-2024, v0.12.0
- EDR, Exposure time now floats
10-10-2024, v0.11.0
- apply P10 LUT
- fix unit tests
09-05-2024, v0.9.1
- few tweaks to improve speed
09-04-2024, v0.9.0
- reason: improve performance when the cine is read
- add numba njit for unpack functions
- refactor read images function to use less variables
07-19-2024, v0.8.0
- rebuild with correct naming
- update deprecated utc time call
07-18-2024, v0.7.0
- add time from trigger array, trigger time string
- unit test fixes
07-15-2024, v0.5.0
- remove some params from the print metadata function
07-11-2024, v0.4.0
- added print metadata function for output subset of the metadata object to a 2D string array
Initial release
- fixed: few utf related metadata fixed,some metadata naming changed, a loop in cine read fixed, some list-type metadata fixed resulin correcting more
- added: trigger time stamp added, test_cinereader functions(metadata and pixel values for different cine types), list components for multiple element of one metadata(such as reccrop, imfilter, etc), some loops for list-type metadata,
- added: realbpp metadata output for image display in gui
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cinereader-1.4.1.tar.gz
(12.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cinereader-1.4.1.tar.gz.
File metadata
- Download URL: cinereader-1.4.1.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0db0fe47749ad17bb7e4713dc3fdbd42a7f2e0da9c1fc1b37b6016a9600108ee
|
|
| MD5 |
bcbd091cdda829791f28d27f8116bee8
|
|
| BLAKE2b-256 |
990453446a59c29bac89c6129f24cd1915b614e8602f48b42ae659156ee3246a
|
File details
Details for the file cinereader-1.4.1-py3-none-any.whl.
File metadata
- Download URL: cinereader-1.4.1-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a54067cef0eaa6bdce2e9214d4ec6df2f2f07cfb1e034ae11431df2478df04df
|
|
| MD5 |
0e84513d06d44e4ab761628ffd8e3d38
|
|
| BLAKE2b-256 |
62020ed338c678eb04e6b6e379491a6c04d0fe8a98e8019b01e2714aaf215ba7
|