Extract metadata of input file to Flywheel.
Project description
File metadata importer
Flywheel gear for importing metadata header of file to Flywheel.
Metadata is stored under file.info.header. Currently, supporting
the following file types:
- DICOM and DICOM Zip Archive
- PTD (Siemens PT format)
- NIfTI
- ParaVision (Bruker format)
- PAR/REC (Philips format)
Usage
Inputs
- input-file: The input file.
Configuration
- debug (boolean, default:
False): Include debug statements in log. - siemens CSA (boolean, default:
False): If True, extracts Siemens CSA header for Dicom. - derived metadata (boolean, default:
True): If True, derives additional metadata from the file header and stores them under file.info.header.derived. - tag (string, default:
file-metadata-importer): The tag to be added on input file upon run completion.
file.info.header structure
DICOM
Dicom header will be stored under file.info.header.dicom. Additionally, if:
input-fileis an archive (e.g dicom.zip), thenfile.info.header.dicom_arraywill be populated.Siemens CSAis enabled, thenfile.info.header.csawill be populated if found.
Bruker ParaVision
ParaVision metadata will be stored under file.info.header.paravision
Siemens PTD
The raw PTD preamble will be stored under file.info.header.ptd
Details
DICOM
By default, the following tags are not extracted:
- All private tags
PixelDataPixel DataContourDataEncryptedAttributesSequenceOriginalAttributesSequenceSpectroscopyData
By default, for zip archive or multiframe the following tags are extracted
and stored in file.info.header.dicom_array:
AcquisitionNumberAcquisitionTimeEchoTimeImageOrientationPatientImagePositionPatientImageTypeInstanceNumberSliceLocation
Extracting additional tags
Additional tags can be extracted and indexed by ammending the list above.
To add or remove to that list, specific key/value must be set on the project
custom information (project.info) like below:
context:
header:
dicom:
<DICOM-tag>: True
Key: value should take the form of Tag: bool where Tag can either be
a Dicom keyword (e.g. PatientID), a Dicom hex index (e.g 00100020) or
a Dicom private tag GEMS_PARM_01, 0043xx01. If bool is True, the tag
will be added to the parsed tags in the file.info.header.dicom and
the file.info.header.dicom_array namespaces, if False is will be removed.
Derived fields
The following values derived from dicom are stored in a file.info.header.derived dictionary
SpacingBetweenSlices( Also a type 3 tag at (0018,0088))MinSliceLocation: Minimum value of slice locationMaxSliceLocation: Maximum value of slice locationScanCoverage: Span of slice location (max-min)SliceAxis: 3D unit vector connecting slice originsfov: "Field of view" which is 3D span in patient coords along x,y,z (empty if slice spacing is not uniform)affine: 4x4 affine transform to convert grid to patient coords (empty if slice spacing is not uniform)
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 Distributions
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 fw_gear_file_metadata_importer-1.3.0-py3-none-any.whl.
File metadata
- Download URL: fw_gear_file_metadata_importer-1.3.0-py3-none-any.whl
- Upload date:
- Size: 22.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.10.12 Linux/5.10.176+
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f18f9971a1616b8facd55624a1c44a2d2120885747341a5326d1330aa2c4cd5
|
|
| MD5 |
dd68cae641961f1b3b9d0b8fe3fb031f
|
|
| BLAKE2b-256 |
5abf9abba2eae4ca8c6aa7641b742022b0f92b7791a06271931be052fe0dc32d
|