Stimfit @PACKAGE_VERSION@
Loading...
Searching...
No Matches
stfio Namespace Reference

The stfio namespace. More...

Classes

class  ProgressInfo
 ProgressInfo class. More...
class  StdoutProgressInfo
 StdoutProgressInfo class. More...
struct  txtImportSettings
 Text file import filter settings. More...

Enumerations

enum  filetype {
  atf , abf , axg , ascii ,
  cfs , igor , son , hdf5 ,
  heka , biosig , tdms , intan ,
  none
}
 File types. More...

Functions

void importABFFile (const std::string &fName, Recording &ReturnData, ProgressInfo &progDlg)
 Open an ABF file and store its contents to a Recording object. Attempts to identify the ABF version.
void importABF1File (const std::string &fName, Recording &ReturnData, ProgressInfo &progDlg)
 Open an ABF1 file and store its contents to a Recording object.
void importABF2File (const std::string &fName, Recording &ReturnData, ProgressInfo &progDlg)
 Open an ABF2 file and store its contents to a Recording object.
void importASCIIFile (const std::string &fName, int hLinesToSkip, int nColumns, bool firstIsTime, bool toSection, Recording &ReturnRec, ProgressInfo &progDlg)
 Open an ASCII file and store its contents to a Recording object.
bool exportASCIIFile (const std::string &fName, const Section &Export)
 Export a Section to a text file.
bool exportASCIIFile (const std::string &fName, const Channel &Export)
 Export a Channel to a text file.
void importATFFile (const std::string &fName, Recording &ReturnData, ProgressInfo &progDlg)
 Open an ATF file and store its contents to a Recording object.
StfioDll bool exportATFFile (const std::string &fName, const Recording &WData)
 Export a Recording to an ATF file.
void importAXGFile (const std::string &fName, Recording &ReturnData, ProgressInfo &progDlg)
 Open an AXG file and store its contents to a Recording object.
int importCFSFile (const std::string &fName, Recording &ReturnData, ProgressInfo &progDlg)
 Open a CFS file and store its contents to a Recording object.
StfioDll bool exportCFSFile (const std::string &fName, const Recording &WData, ProgressInfo &progDlg)
 Export a Recording to a CFS file.
void importHDF5File (const std::string &fName, Recording &ReturnData, ProgressInfo &progDlg)
 Open a HDF5 file and store its contents to a Recording object.
StfioDll bool exportHDF5File (const std::string &fName, const Recording &WData, ProgressInfo &progDlg)
 Export a Recording to a HDF5 file.
void importHEKAFile (const std::string &fName, Recording &ReturnData, ProgressInfo &progDlg)
 Open an HEKA file and store its contents to a Recording object.
StfioDll bool exportIGORFile (const std::string &fName, const Recording &WData, ProgressInfo &progDlg)
 Export a Recording to an Igor binary wave.
void importIntanFile (const std::string &fName, Recording &ReturnData, ProgressInfo &progDlg)
 Open an Intan file and store its contents to a Recording object.
StfioDll Vector_double vec_scal_plus (const Vector_double &vec, double scalar)
StfioDll Vector_double vec_scal_minus (const Vector_double &vec, double scalar)
StfioDll Vector_double vec_scal_mul (const Vector_double &vec, double scalar)
StfioDll Vector_double vec_scal_div (const Vector_double &vec, double scalar)
StfioDll Vector_double vec_vec_plus (const Vector_double &vec1, const Vector_double &vec2)
StfioDll Vector_double vec_vec_minus (const Vector_double &vec1, const Vector_double &vec2)
StfioDll Vector_double vec_vec_mul (const Vector_double &vec1, const Vector_double &vec2)
StfioDll Vector_double vec_vec_div (const Vector_double &vec1, const Vector_double &vec2)
StfioDll stfio::filetype findType (const std::string &ext)
 Attempts to determine the filetype from the filter extension.
StfioDll std::string findExtension (stfio::filetype ftype)
 Returns file extension for a file type.
StfioDll bool importFile (const std::string &fName, stfio::filetype type, Recording &ReturnData, const stfio::txtImportSettings &txtImport, stfio::ProgressInfo &progDlg)
 Generic file import.
StfioDll bool exportFile (const std::string &fName, stfio::filetype type, const Recording &Data, ProgressInfo &progDlg)
 Generic file export.
StfioDll Recording concatenate (const Recording &src, const std::vector< std::size_t > &sections, ProgressInfo &progDlg)
 Produce new recording with concatenated sections.
StfioDll Recording multiply (const Recording &src, const std::vector< std::size_t > &sections, std::size_t channel, double factor)
 Produce new recording with multiplied sections.

Detailed Description

The stfio namespace.

All essential core functions and classes are in this namespace. Its purpose is to reduce name mangling problems.

Function Documentation

◆ exportASCIIFile() [1/2]

bool stfio::exportASCIIFile ( const std::string & fName,
const Channel & Export )

Export a Channel to a text file.

Parameters
fNameFull path to the file to be written.
ExportThe channel to be exported.
Returns
true upon success, false otherwise.

◆ exportASCIIFile() [2/2]

bool stfio::exportASCIIFile ( const std::string & fName,
const Section & Export )

Export a Section to a text file.

Parameters
fNameFull path to the file to be written.
ExportThe section to be exported.
Returns
true upon success, false otherwise.

◆ exportATFFile()

StfioDll bool stfio::exportATFFile ( const std::string & fName,
const Recording & WData )

Export a Recording to an ATF file.

Parameters
fNameFull path to the file to be written.
WDataThe data to be exported.

References StfioDll.

◆ exportCFSFile()

StfioDll bool stfio::exportCFSFile ( const std::string & fName,
const Recording & WData,
ProgressInfo & progDlg )

Export a Recording to a CFS file.

Parameters
fNameFull path to the file to be written.
WDataThe data to be exported.
Returns
The CFS file handle.

References StfioDll.

◆ exportHDF5File()

StfioDll bool stfio::exportHDF5File ( const std::string & fName,
const Recording & WData,
ProgressInfo & progDlg )

Export a Recording to a HDF5 file.

Parameters
fNameFull path to the file to be written.
WDataThe data to be exported.
Returns
The HDF5 file handle.

References StfioDll.

◆ exportIGORFile()

StfioDll bool stfio::exportIGORFile ( const std::string & fName,
const Recording & WData,
ProgressInfo & progDlg )

Export a Recording to an Igor binary wave.

Parameters
fNameFull path to the file to be written.
WDataThe data to be exported.
Returns
At present, always returns 0.

◆ importABF1File()

void stfio::importABF1File ( const std::string & fName,
Recording & ReturnData,
ProgressInfo & progDlg )

Open an ABF1 file and store its contents to a Recording object.

Parameters
fNameThe full path to the file to be opened.
ReturnDataOn entry, an empty Recording object. On exit, the data stored in fName.
progressTrue if the progress dialog should be updated.

◆ importABF2File()

void stfio::importABF2File ( const std::string & fName,
Recording & ReturnData,
ProgressInfo & progDlg )

Open an ABF2 file and store its contents to a Recording object.

Parameters
fNameThe full path to the file to be opened.
ReturnDataOn entry, an empty Recording object. On exit, the data stored in fName.
progressTrue if the progress dialog should be updated.

◆ importABFFile()

void stfio::importABFFile ( const std::string & fName,
Recording & ReturnData,
ProgressInfo & progDlg )

Open an ABF file and store its contents to a Recording object. Attempts to identify the ABF version.

Parameters
fNameThe full path to the file to be opened.
ReturnDataOn entry, an empty Recording object. On exit, the data stored in fName.
progressTrue if the progress dialog should be updated.

◆ importASCIIFile()

void stfio::importASCIIFile ( const std::string & fName,
int hLinesToSkip,
int nColumns,
bool firstIsTime,
bool toSection,
Recording & ReturnRec,
ProgressInfo & progDlg )

Open an ASCII file and store its contents to a Recording object.

Parameters
fNameFull path to the file to be read.
hLinesToSkipHeader lines to skip.
nColumnsNumber of columns.
firstIsTimetrue if the first column contains time values, false otherwise.
toSectiontrue if the columns should be put into different sections, false if they should be put into different channels.
ReturnRecOn entry, an empty Recording object. On exit, the data stored in fName.
progressTrue if the progress dialog should be updated.

◆ importATFFile()

void stfio::importATFFile ( const std::string & fName,
Recording & ReturnData,
ProgressInfo & progDlg )

Open an ATF file and store its contents to a Recording object.

Parameters
fNameFull path to the file to be read.
ReturnDataOn entry, an empty Recording object. On exit, the data stored in fName.
progressTrue if the progress dialog should be updated.

◆ importAXGFile()

void stfio::importAXGFile ( const std::string & fName,
Recording & ReturnData,
ProgressInfo & progDlg )

Open an AXG file and store its contents to a Recording object.

Parameters
fNameThe full path to the file to be opened.
ReturnDataOn entry, an empty Recording object. On exit, the data stored in fName.
progressTrue if the progress dialog should be updated.

◆ importCFSFile()

int stfio::importCFSFile ( const std::string & fName,
Recording & ReturnData,
ProgressInfo & progDlg )

Open a CFS file and store its contents to a Recording object.

Parameters
fNameFull path to the file to be read.
ReturnDataOn entry, an empty Recording object. On exit, the data stored in fName.
progressSet to true if a progress dialog should be updated.
Returns
0 upon success, a negative error code upon failure.

◆ importHDF5File()

void stfio::importHDF5File ( const std::string & fName,
Recording & ReturnData,
ProgressInfo & progDlg )

Open a HDF5 file and store its contents to a Recording object.

Parameters
fNameFull path to the file to be read.
ReturnDataOn entry, an empty Recording object. On exit, the data stored in fName.
progressTrue if the progress dialog should be updated.

◆ importHEKAFile()

void stfio::importHEKAFile ( const std::string & fName,
Recording & ReturnData,
ProgressInfo & progDlg )

Open an HEKA file and store its contents to a Recording object.

Parameters
fNameThe full path to the file to be opened.
ReturnDataOn entry, an empty Recording object. On exit, the data stored in fName.
progressTrue if the progress dialog should be updated.

◆ importIntanFile()

void stfio::importIntanFile ( const std::string & fName,
Recording & ReturnData,
ProgressInfo & progDlg )

Open an Intan file and store its contents to a Recording object.

Parameters
fNameThe full path to the file to be opened.
ReturnDataOn entry, an empty Recording object. On exit, the data stored in fName.
progressTrue if the progress dialog should be updated.