v2.0.0
Loading...
Searching...
No Matches
BIDSLIB::BidsTsv Class Reference

Generic BIDS TSV file I/O. More...

#include <bids_tsv.h>

Public Types

using SPtr = QSharedPointer<BidsTsv>

Public Member Functions

 BidsTsv ()
 ~BidsTsv ()

Static Public Member Functions

static QList< BidsTsvRowreadTsv (const QString &sFilePath, QStringList &headers)
static bool writeTsv (const QString &sFilePath, const QStringList &headers, const QList< BidsTsvRow > &rows)

Detailed Description

Generic BIDS TSV file I/O.

Generic BIDS TSV file reader/writer.

BIDS TSV files are tab-separated value files with:

  • A mandatory header row defining column names.
  • "n/a" for missing values.
  • UTF-8 encoding, LF line endings.

Domain-specific TSV I/O (channels, electrodes, events) is handled by BidsChannel, BidsElectrode, and BidsEvent respectively.

Definition at line 81 of file bids_tsv.h.

Member Typedef Documentation

◆ SPtr

using BIDSLIB::BidsTsv::SPtr = QSharedPointer<BidsTsv>

Definition at line 84 of file bids_tsv.h.

Constructor & Destructor Documentation

◆ BidsTsv()

BidsTsv::BidsTsv ( )

Definition at line 70 of file bids_tsv.cpp.

◆ ~BidsTsv()

BidsTsv::~BidsTsv ( )

Definition at line 76 of file bids_tsv.cpp.

Member Function Documentation

◆ readTsv()

QList< BidsTsvRow > BidsTsv::readTsv ( const QString & sFilePath,
QStringList & headers )
static

Reads a TSV file into an ordered list of row maps.

Parameters
[in]sFilePathPath to the TSV file.
[out]headersColumn names from the header row.
Returns
List of rows, each row a map of column-name → value.

Definition at line 82 of file bids_tsv.cpp.

◆ writeTsv()

bool BidsTsv::writeTsv ( const QString & sFilePath,
const QStringList & headers,
const QList< BidsTsvRow > & rows )
static

Writes rows to a TSV file.

Parameters
[in]sFilePathOutput file path.
[in]headersColumn names (determines column order).
[in]rowsData rows.
Returns
true on success, false on I/O error.

Definition at line 123 of file bids_tsv.cpp.


The documentation for this class was generated from the following files: