3Depict
|
#include "APTFileIO.h"
#include "ionhit.h"
#include "../../common/stringFuncs.h"
#include "../../common/basics.h"
#include "../../common/translation.h"
#include <cstring>
#include <new>
Macros | |
#define | USE_SEEKING_LIMITLOAD |
Functions | |
unsigned int | LimitLoadPosFile (unsigned int inputnumcols, unsigned int outputnumcols, const unsigned int index[], vector< IonHit > &posIons, const char *posFile, size_t limitCount, unsigned int &progress, ATOMIC_BOOL &wantAbort, bool strongSampling) |
unsigned int | GenericLoadFloatFile (unsigned int inputnumcols, unsigned int outputnumcols, const unsigned int index[], vector< IonHit > &posIons, const char *posFile, unsigned int &progress, ATOMIC_BOOL &wantAbort) |
Load a pos file directly into a single ion list. More... | |
unsigned int | limitLoadTextFile (unsigned int maxCols, vector< vector< float > > &data, const char *textFile, const char *delim, const size_t limitCount, unsigned int &progress, ATOMIC_BOOL &wantAbort, bool strongRandom) |
unsigned int | LoadATOFile (const char *fileName, vector< IonHit > &ions, unsigned int &progress, ATOMIC_BOOL &wantAbort, unsigned int forceEndian) |
unsigned int | loadTapsimBinFile (const char *fileName, unsigned int &progress, ATOMIC_BOOL &wantAbort, vector< IonHit > &posIons) |
Variables | |
const size_t | PROGRESS_REDUCE =5000 |
const char * | TEXT_LOAD_ERR_STRINGS [] |
const char * | POS_ERR_STRINGS [] |
const char * | ION_TEXT_ERR_STRINGS [] |
const char * | LAWATAP_ATO_ERR_STRINGS [] |
const char * | TAPSIM_ERR_STRINGS [] |
#define USE_SEEKING_LIMITLOAD |
anonymous enum |
anonymous enum |
unsigned int GenericLoadFloatFile | ( | unsigned int | inputnumcols, |
unsigned int | outputnumcols, | ||
const unsigned int | index[], | ||
vector< IonHit > & | posIons, | ||
const char * | posFile, | ||
unsigned int & | progress, | ||
ATOMIC_BOOL & | wantAbort | ||
) |
Load a pos file directly into a single ion list.
Pos files are fixed record size files, with data stored as 4byte big endian floating point. (IEEE 574?). Data is stored as x,y,z,mass/charge. Load a pos file into a T of IonHits
References ASSERT, IonHit::DATA_SIZE, IonHit::hasInf(), IonHit::hasNaN(), POS_ABORT_FAIL, POS_ALLOC_FAIL, POS_EMPTY_FAIL, POS_INF_LOAD_ERROR, POS_NAN_LOAD_ERROR, POS_OPEN_FAIL, POS_READ_FAIL, POS_SIZE_MODULUS_ERR, PROGRESS_REDUCE, and IonHit::setHit().
Referenced by LimitLoadPosFile(), ExternalProgramFilter::refresh(), DataLoadFilter::refresh(), and SpatialAnalysisFilter::refresh().
unsigned int LimitLoadPosFile | ( | unsigned int | inputnumcols, |
unsigned int | outputnumcols, | ||
const unsigned int | index[], | ||
vector< IonHit > & | posIons, | ||
const char * | posFile, | ||
size_t | limitCount, | ||
unsigned int & | progress, | ||
ATOMIC_BOOL & | wantAbort, | ||
bool | strongSampling | ||
) |
References ASSERT, ATOMIC_BOOL, GenericLoadFloatFile(), getFilesize(), RandNumGen::initTimer(), LimitLoadPosFile(), POS_ABORT_FAIL, POS_ALLOC_FAIL, POS_EMPTY_FAIL, POS_INF_LOAD_ERROR, POS_NAN_LOAD_ERROR, POS_OPEN_FAIL, POS_READ_FAIL, POS_SIZE_MODULUS_ERR, PROGRESS_REDUCE, and randomDigitSelection().
Referenced by LimitLoadPosFile(), and DataLoadFilter::refresh().
unsigned int limitLoadTextFile | ( | unsigned int | maxCols, |
vector< vector< float > > & | data, | ||
const char * | textFile, | ||
const char * | delim, | ||
const size_t | limitCount, | ||
unsigned int & | progress, | ||
ATOMIC_BOOL & | wantAbort, | ||
bool | strongRandom | ||
) |
References ASSERT, RandNumGen::initTimer(), loadTextData(), POS_ABORT_FAIL, randomDigitSelection(), splitStrsRef(), stream_cast(), stripZeroEntries(), TEXT_ERR_ALLOC_FAIL, TEXT_ERR_FORMAT, TEXT_ERR_ONLY_HEADER, TEXT_ERR_OPEN, TEXT_ERR_READ_CONTENTS, and TEXT_ERR_REOPEN.
Referenced by DataLoadFilter::refresh().
unsigned int LoadATOFile | ( | const char * | fileName, |
vector< IonHit > & | ions, | ||
unsigned int & | progress, | ||
ATOMIC_BOOL & | wantAbort, | ||
unsigned int | forceEndian | ||
) |
References ASSERT, floatSwapBytes(), RandNumGen::initTimer(), LAWATAP_ATO_EMPTY_FAIL, LAWATAP_ATO_MEM_ERR, LAWATAP_ATO_OPEN_FAIL, LAWATAP_ATO_SIZE_ERR, LAWATAP_ATO_VERSIONCHECK_ERR, and randomDigitSelection().
Referenced by loadTapsimBinFile(), and DataLoadFilter::refresh().
unsigned int loadTapsimBinFile | ( | const char * | fileName, |
unsigned int & | progress, | ||
ATOMIC_BOOL & | wantAbort, | ||
vector< IonHit > & | posIons | ||
) |
References ASSERT, ATOMIC_BOOL, floatSwapBytes(), genRandomFilename(), LoadATOFile(), IonHit::makePosData(), rmFile(), IonHit::setMassToCharge(), IonHit::setPos(), shortSwapBytes(), splitStrsRef(), stream_cast(), TAPSIM_ERR_ABORTED, TAPSIM_ERR_FILE_FORMAT_FAIL, TAPSIM_ERR_FILE_OPEN_FAIL, TEST, and WARN.
Referenced by DataLoadFilter::refresh().
const char* ION_TEXT_ERR_STRINGS[] |
const char* LAWATAP_ATO_ERR_STRINGS[] |
Referenced by DataLoadFilter::refresh().
const char* POS_ERR_STRINGS[] |
Referenced by DataLoadFilter::refresh().
const size_t PROGRESS_REDUCE =5000 |
const char* TAPSIM_ERR_STRINGS[] |
Referenced by DataLoadFilter::refresh().
const char* TEXT_LOAD_ERR_STRINGS[] |
Referenced by DataLoadFilter::refresh().