VivoQuant 6.5.0
Loading...
Searching...
No Matches
AbstractImporter Class Referenceabstract

Description

Base of the file importers that scripts get from VQ, such as VQ.brukerImporter().

A typical import loads the files, then hands the result to the Data Manager:

var imp = VQ.gelImporter();
imp.setSliceThickness(1.0); // otherwise load() asks for it
if (!imp.load('C:/data/image.gel')) {
VQ.debug(imp.takeError());
}
imp.transferData(0, VQ.dataManager());

Errors are reported through the functions inherited from HasErrorQObject.

Public Member Functions

virtual bool load (Array< string > fileNames)=0
 Reads image files. Nothing is added to the Data Manager until transferData().
virtual bool load (string fileName)
void transferData (int idx, DataManager *dm)
 Adds the data read by load() to the Data Manager, then forgets it.
Public Member Functions inherited from HasErrorQObject
bool hasError ()
 Returns true if an error message is stored.
void clearError ()
 Clears the stored error message.
string takeError ()
 Returns the stored error message and clears it.
string errorString ()
 Returns the stored error message, or an empty string. The message is kept.

Member Function Documentation

◆ load() [1/2]

virtual bool load ( Array< string > fileNames)
pure virtual

Reads image files. Nothing is added to the Data Manager until transferData().

Parameters
fileNamesThe files to read. Some importers read only one file.
Returns
true if the files were read. On failure, most importers store a message that errorString() returns.

Implemented in AnalyzeImport, BrukerImport, GelImport, ImgHdrImport, ImgInfImport, RawImporter, and VevoAbstractImport.

◆ load() [2/2]

virtual bool load ( string fileName)
inlinevirtual

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
fileNameThe file to read

Reimplemented in AnalyzeImport, GelImport, ImgHdrImport, ImgInfImport, and VevoAbstractImport.

◆ transferData()

void transferData ( int idx,
DataManager * dm )

Adds the data read by load() to the Data Manager, then forgets it.

Parameters
idxPosition to load into: 0 = Reference, 1 = Input 1, and so on. If load() read several data sets, they go into consecutive positions starting at idx.
dmThe Data Manager, from VQ.dataManager()
Note
Call load() again before the next transferData(); a second call adds nothing.