4.4. Data Reader#
4.4.1. Description#
The DataReader
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 into 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.
4.4.2. File Formats#
We already provide a concrete implementation 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 |