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
07-17-2025, v1.4.2
- minor clean up
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.2.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.2.tar.gz.
File metadata
- Download URL: cinereader-1.4.2.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 |
0de44df44ed792d09037a1478a35034e363bbcec9c9ef287f0eb96c90e10415e
|
|
| MD5 |
e82347093c110796153ce82d76c38c9a
|
|
| BLAKE2b-256 |
a0af2855e5a8af68d11ba527b111131b8aa76857d204ac8c1447f2fde0c79770
|
File details
Details for the file cinereader-1.4.2-py3-none-any.whl.
File metadata
- Download URL: cinereader-1.4.2-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 |
dc522f7a8317b0d4de510a07fba0dd02572aea9702572e90ce99ee829959b6ed
|
|
| MD5 |
70e36613aa5a710538591b59a12bd9de
|
|
| BLAKE2b-256 |
a9ae404f0ed7e1ae31ffd56cd2405267990165d4ad614b5388a01df8a72e7f62
|