3.4. Data Reader#
3.4.1. Description#
The Data Reader is an object that is responsible for actually reading data files in junifer.
It reads the value of the key path
for each data type in the Data object
and loads them to memory. After reading the data into memory, it adds the key data
to the same level as path
and the value is the actual data in the memory.
Datareaders are meant to be used inside the datagrabber context but you can operate on them outside the context as long as the actual data is in the memory and the Python runtime has not garbage-collected it.
For data formats not supported by junifer yet, you can either make your own Data Reader or open an issue on junifer Github and we can help you out.
3.4.2. Currently supported file-formats#
We already provide a concrete implementation junifer.datareader.DefaultDataReader
which knows how to
read the following file formats:
File extension |
File type |
Description |
---|---|---|
|
NIfTI (uncompressed) |
Uncompressed NIfTI |
|
NIfTI (compressed) |
Compressed NIfTI |
|
CSV |
Comma-separated values file |
|
TSV |
Tab-separated values file |