Stimfit @PACKAGE_VERSION@
Loading...
Searching...
No Matches
Stfio

Classes

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

Enumerations

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

Functions

StfioDll Vector_double stfio::vec_scal_plus (const Vector_double &vec, double scalar)
StfioDll Vector_double stfio::vec_scal_minus (const Vector_double &vec, double scalar)
StfioDll Vector_double stfio::vec_scal_mul (const Vector_double &vec, double scalar)
StfioDll Vector_double stfio::vec_scal_div (const Vector_double &vec, double scalar)
StfioDll Vector_double stfio::vec_vec_plus (const Vector_double &vec1, const Vector_double &vec2)
StfioDll Vector_double stfio::vec_vec_minus (const Vector_double &vec1, const Vector_double &vec2)
StfioDll Vector_double stfio::vec_vec_mul (const Vector_double &vec1, const Vector_double &vec2)
StfioDll Vector_double stfio::vec_vec_div (const Vector_double &vec1, const Vector_double &vec2)
 stfio::ProgressInfo::ProgressInfo (const std::string &, const std::string &, int, bool)
 Constructor.
virtual bool stfio::ProgressInfo::Update (int value, const std::string &newmsg="", bool *skip=NULL)=0
 Updates the progress info.
 stfio::StdoutProgressInfo::StdoutProgressInfo (const std::string &title, const std::string &message, int maximum, bool verbose)
bool stfio::StdoutProgressInfo::Update (int value, const std::string &newmsg="", bool *skip=NULL)
 Updates the progress info.
 stfio::txtImportSettings::txtImportSettings ()
StfioDll stfio::filetype stfio::findType (const std::string &ext)
 Attempts to determine the filetype from the filter extension.
StfioDll std::string stfio::findExtension (stfio::filetype ftype)
 Returns file extension for a file type.
StfioDll bool stfio::importFile (const std::string &fName, stfio::filetype type, Recording &ReturnData, const stfio::txtImportSettings &txtImport, stfio::ProgressInfo &progDlg)
 Generic file import.
StfioDll bool stfio::exportFile (const std::string &fName, stfio::filetype type, const Recording &Data, ProgressInfo &progDlg)
 Generic file export.
StfioDll Recording stfio::concatenate (const Recording &src, const std::vector< std::size_t > &sections, ProgressInfo &progDlg)
 Produce new recording with concatenated sections.
StfioDll Recording stfio::multiply (const Recording &src, const std::vector< std::size_t > &sections, std::size_t channel, double factor)
 Produce new recording with multiplied sections.

Variables

int stfio::txtImportSettings::hLines
bool stfio::txtImportSettings::toSection
bool stfio::txtImportSettings::firstIsTime
int stfio::txtImportSettings::ncolumns
double stfio::txtImportSettings::sr
std::string stfio::txtImportSettings::yUnits
std::string stfio::txtImportSettings::yUnitsCh2
std::string stfio::txtImportSettings::xUnits

Detailed Description

Enumeration Type Documentation

◆ filetype

File types.

Enumerator
atf 

Axon text file.

abf 

Axon binary file.

axg 

Axograph binary file.

ascii 

Generic text file.

cfs 

CED filing system.

igor 

Igor binary wave.

son 

CED Son files.

hdf5 

hdf5 files.

heka 

heka files.

biosig 

biosig files.

tdms 

TDMS files.

intan 

Intan CLAMP files.

none 

Undefined file type.

Definition at line 116 of file stfio.h.

Function Documentation

◆ concatenate()

StfioDll Recording stfio::concatenate ( const Recording & src,
const std::vector< std::size_t > & sections,
ProgressInfo & progDlg )

Produce new recording with concatenated sections.

Parameters
srcSource recording
sectionsIndices of selected sections
ProgressInfoProgress indicator
Returns
New recording with concatenated selected sections

References StfioDll.

◆ exportFile()

StfioDll bool stfio::exportFile ( const std::string & fName,
stfio::filetype type,
const Recording & Data,
ProgressInfo & progDlg )

Generic file export.

Parameters
fNameThe full path name of the file.
typeThe file type.
DataData to be written
ProgressInfoProgress indicator
Returns
true if the file has successfully been written, false otherwise.

References StfioDll.

◆ findExtension()

StfioDll std::string stfio::findExtension ( stfio::filetype ftype)

Returns file extension for a file type.

Parameters
ftypeFile type
Returns
File extension for given file type (in the form ".ext")

References StfioDll.

◆ findType()

StfioDll stfio::filetype stfio::findType ( const std::string & ext)

Attempts to determine the filetype from the filter extension.

Parameters
extThe filter extension to be tested (in the form wxT("*.ext")).
Returns
The corresponding file type.

References StfioDll.

◆ importFile()

StfioDll bool stfio::importFile ( const std::string & fName,
stfio::filetype type,
Recording & ReturnData,
const stfio::txtImportSettings & txtImport,
stfio::ProgressInfo & progDlg )

Generic file import.

Parameters
fNameThe full path name of the file.
typeThe file type.
ReturnDataWill contain the file data on return.
txtImportThe text import filter settings.
ProgressInfoProgress indicator
Returns
true if the file has successfully been read, false otherwise.

References StfioDll.

◆ multiply()

StfioDll Recording stfio::multiply ( const Recording & src,
const std::vector< std::size_t > & sections,
std::size_t channel,
double factor )

Produce new recording with multiplied sections.

Parameters
srcSource recording
sectionsIndices of selected sections
channelChannel index
factorMultiplication factor
Returns
New recording with multiplied selected sections

References channel.

◆ ProgressInfo()

stfio::ProgressInfo::ProgressInfo ( const std::string & ,
const std::string & ,
int ,
bool  )
inline

Constructor.

Parameters
titleDialog title
messageMessage displayed
maximumMaximum value for the progress meter
verboseWhether or not to emit a lot of noise

Definition at line 77 of file stfio.h.

◆ StdoutProgressInfo()

stfio::StdoutProgressInfo::StdoutProgressInfo ( const std::string & title,
const std::string & message,
int maximum,
bool verbose )

◆ txtImportSettings()

stfio::txtImportSettings::txtImportSettings ( )
inline

Definition at line 102 of file stfio.h.

References firstIsTime, hLines, ncolumns, sr, toSection, xUnits, yUnits, and yUnitsCh2.

◆ Update() [1/2]

virtual bool stfio::ProgressInfo::Update ( int value,
const std::string & newmsg = "",
bool * skip = NULL )
pure virtual

Updates the progress info.

Parameters
valueNew value of the progress meter
newmsgNew message for the info text
skipThis is set to true if the user has chosen to skip the operation
Returns
True unless the operation was cancelled.

Implemented in stf::wxProgressInfo, and stfio::StdoutProgressInfo.

◆ Update() [2/2]

bool stfio::StdoutProgressInfo::Update ( int value,
const std::string & newmsg = "",
bool * skip = NULL )
virtual

Updates the progress info.

Parameters
valueNew value of the progress meter
newmsgNew message for the info text
skipThis is set to true if the user has chosen to skip the operation
Returns
True unless the operation was cancelled.

Implements stfio::ProgressInfo.

◆ vec_scal_div()

StfioDll Vector_double stfio::vec_scal_div ( const Vector_double & vec,
double scalar )

References StfioDll.

◆ vec_scal_minus()

StfioDll Vector_double stfio::vec_scal_minus ( const Vector_double & vec,
double scalar )

References StfioDll.

◆ vec_scal_mul()

StfioDll Vector_double stfio::vec_scal_mul ( const Vector_double & vec,
double scalar )

References StfioDll.

◆ vec_scal_plus()

StfioDll Vector_double stfio::vec_scal_plus ( const Vector_double & vec,
double scalar )

References StfioDll.

◆ vec_vec_div()

StfioDll Vector_double stfio::vec_vec_div ( const Vector_double & vec1,
const Vector_double & vec2 )

References StfioDll.

◆ vec_vec_minus()

StfioDll Vector_double stfio::vec_vec_minus ( const Vector_double & vec1,
const Vector_double & vec2 )

References StfioDll.

◆ vec_vec_mul()

StfioDll Vector_double stfio::vec_vec_mul ( const Vector_double & vec1,
const Vector_double & vec2 )

References StfioDll.

◆ vec_vec_plus()

StfioDll Vector_double stfio::vec_vec_plus ( const Vector_double & vec1,
const Vector_double & vec2 )

References StfioDll.

Variable Documentation

◆ firstIsTime

bool stfio::txtImportSettings::firstIsTime

First column contains time.

Definition at line 107 of file stfio.h.

Referenced by txtImportSettings().

◆ hLines

int stfio::txtImportSettings::hLines

Number of header lines.

Definition at line 105 of file stfio.h.

Referenced by txtImportSettings().

◆ ncolumns

int stfio::txtImportSettings::ncolumns

Number of columns.

Definition at line 108 of file stfio.h.

Referenced by txtImportSettings().

◆ sr

double stfio::txtImportSettings::sr

Sampling rate.

Definition at line 109 of file stfio.h.

Referenced by txtImportSettings().

◆ toSection

bool stfio::txtImportSettings::toSection

Import columns into separate sections rather than separate channels.

Definition at line 106 of file stfio.h.

Referenced by txtImportSettings().

◆ xUnits

std::string stfio::txtImportSettings::xUnits

x units string.

Definition at line 112 of file stfio.h.

Referenced by txtImportSettings().

◆ yUnits

std::string stfio::txtImportSettings::yUnits

y units string.

Definition at line 110 of file stfio.h.

Referenced by txtImportSettings().

◆ yUnitsCh2

std::string stfio::txtImportSettings::yUnitsCh2

y units string of second channel.

Definition at line 111 of file stfio.h.

Referenced by txtImportSettings().