3Depict
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | List of all members
IonInfoFilter Class Reference

Ion derived information filter, things like volume, composition, etc. More...

#include <ionInfo.h>

Inheritance diagram for IonInfoFilter:
Inheritance graph
[legend]
Collaboration diagram for IonInfoFilter:
Collaboration graph
[legend]

Public Member Functions

 IonInfoFilter ()
 Constructor. More...
 
FiltercloneUncached () const
 Duplicate filter contents, excluding cache. More...
 
virtual void initFilter (const std::vector< const FilterStreamData *> &dataIn, std::vector< const FilterStreamData *> &dataOut)
 Initialise the filter's internal state using limited filter stream data propagation. More...
 
unsigned int refresh (const std::vector< const FilterStreamData *> &dataIn, std::vector< const FilterStreamData *> &dataOut, ProgressData &progress)
 Apply filter to new data, updating cache as needed. Vector. More...
 
size_t numBytesForCache (size_t nObjects) const
 Get (approx) number of bytes required for cache. More...
 
unsigned int getType () const
 return type ID More...
 
std::string typeString () const
 Return filter type as std::string. More...
 
void getProperties (FilterPropGroup &propertyList) const
 Get the properties of the filter, in key-value form. First vector is for each output. More...
 
bool setProperty (unsigned int key, const std::string &value, bool &needUpdate)
 
void setPropFromBinding (const SelectionBinding &b)
 Set the binding value for a float. More...
 
std::string getSpecificErrString (unsigned int code) const
 Get the human readable error string associated with a particular error code during refresh(...) More...
 
bool writeState (std::ostream &f, unsigned int format, unsigned int depth) const
 Dump state to output stream, using specified format. More...
 
bool readState (xmlNodePtr &n, const std::string &packDir="")
 Read state from XML stream, using xml format. More...
 
unsigned int getRefreshBlockMask () const
 Get the bitmask encoded list of filterStreams that this filter blocks from propagation. More...
 
unsigned int getRefreshEmitMask () const
 Get the bitmask encoded list of filterstreams that this filter emits from ::refresh. More...
 
unsigned int getRefreshUseMask () const
 Get the bitmask encoded list of filterstreams that this filter may use during ::refresh. More...
 
bool needsUnrangedData () const
 Does the filter need unranged input? More...
 
- Public Member Functions inherited from Filter
 Filter ()
 
virtual ~Filter ()
 
virtual void clearCache ()
 Erase cache. More...
 
virtual void clearDevices ()
 Erase any active devices. More...
 
std::string getErrString (unsigned int code) const
 Get the human readable error string associated with a particular error code during refresh(...). Do not override this for specific filter errors. Override getSpecificErrString. More...
 
std::string trueName () const
 Return the unique name for a given filter – DO NOT TRANSLATE. More...
 
virtual void getStateOverrides (std::vector< std::string > &overrides) const
 Return the XML elements that refer to external entities (i.e. files) which do not move with the XML files. At this time, only files are supported. These will be looked for on the filesystem and moved as needed. More...
 
void setCaching (bool enableCache)
 Enable/disable caching for this filter. More...
 
bool haveCache () const
 Have cached output data? More...
 
virtual std::string getUserString () const
 Return a user-specified string, or just the typestring if user set string not active. More...
 
virtual void setUserString (const std::string &str)
 Set a user-specified string return value is. More...
 
virtual bool writePackageState (std::ostream &f, unsigned int format, const std::vector< std::string > &valueOverrides, unsigned int depth=0) const
 Modified version of writeState for packaging. By default simply calls writeState. More...
 
void getSelectionDevices (std::vector< SelectionDevice *> &devices) const
 Get the selection devices for this filter. MUST be called after refresh() More...
 
void updateOutputInfo (const std::vector< const FilterStreamData *> &dataOut)
 Update the output statistics for this filter (num items of streams of each type output) More...
 
virtual void setPropFromRegion (unsigned int method, unsigned int regionID, float newPos)
 Set a region update. More...
 
virtual bool canBeHazardous () const
 Can this filter perform actions that are potentially a security concern? More...
 
unsigned int getNumOutput (unsigned int streamType) const
 Get the number of outputs for the specified type during the filter's last refresh. More...
 
void getConsoleStrings (std::vector< std::string > &v) const
 Get the filter messages from the console. To erase strings, either call erase, or erase cahche. More...
 
void clearConsole ()
 
virtual bool monitorNeedsRefresh () const
 
virtual bool isPureDataSource () const
 
virtual bool isUsefulAsAppend () const
 
template<>
bool applyPropertyNow (bool &prop, const std::string &val, bool &needUp)
 
template<>
bool applyPropertyNow (Point3D &prop, const std::string &val, bool &needUp)
 
template<>
bool applyPropertyNow (std::string &prop, const std::string &val, bool &needUp)
 

Additional Inherited Members

- Static Public Member Functions inherited from Filter
static void setStrongRandom (bool strongRand)
 Should filters use strong randomisation (where applicable) or not? More...
 
template<typename T >
static void getStreamsOfType (const std::vector< const FilterStreamData *> &vec, std::vector< const T *> &dataOut)
 
- Static Public Attributes inherited from Filter
static ATOMIC_BOOLwantAbort = 0
 
- Protected Member Functions inherited from Filter
void convertFileStringToAbsolute (const string &basePath, std::string &s) const
 
void propagateCache (std::vector< const FilterStreamData *> &dataOut) const
 Propagate the cache into output. More...
 
template<class T >
bool applyPropertyNow (T &oldProp, const std::string &newVal, bool &needUp)
 
void cacheAsNeeded (FilterStreamData *s)
 
- Static Protected Member Functions inherited from Filter
static unsigned int collateIons (const std::vector< const FilterStreamData *> &dataIn, std::vector< IonHit > &outVector, ProgressData &prog, size_t totalDataSize=(size_t) -1)
 
static unsigned int collateIons (const std::vector< const FilterStreamData *> &dataIn, std::vector< Point3D > &outVector, ProgressData &prog, size_t totalDataSize=(size_t) -1)
 
static void propagateStreams (const std::vector< const FilterStreamData *> &dataIn, std::vector< const FilterStreamData *> &dataOut, size_t mask=STREAMTYPE_MASK_ALL, bool invertMask=false)
 Propagate the given input data to an output vector. More...
 
static std::string getBaseErrString (unsigned int errCode)
 Get the generic (applies to any filter) error codes. More...
 
template<class T >
static unsigned int extendDataVector (std::vector< T > &dest, const std::vector< IonHit > &vIonData, unsigned int &progress, size_t offset)
 Extend a point data vector using some ion data. More...
 
template<class T >
static size_t buildSplitPoints (const vector< const FilterStreamData *> &dataIn, ProgressData &progress, size_t totalDataSize, const RangeFile *rngF, const vector< bool > &pSourceEnabled, const vector< bool > &pTargetEnabled, vector< T > &pSource, vector< T > &pTarget)
 
static unsigned int getIonstreamIonID (const IonStreamData *d, const RangeFile *r)
 
static void demuxKey (unsigned int key, unsigned int &keyType, unsigned int &ionOffset)
 Hack to merge/extract two bits of information into a single property key. More...
 
static unsigned int muxKey (unsigned int keyType, unsigned int ionOffset)
 
- Protected Attributes inherited from Filter
bool cache
 
bool cacheOK
 
unsigned int numStreamsLastRefresh [NUM_STREAM_TYPES]
 Array of the number of streams propagated on last refresh. More...
 
std::vector< std::string > consoleOutput
 Temporary console output. Should be only nonzero size if messages are present. More...
 
std::string userString
 User settable labelling string (human readable ID, etc etc) More...
 
std::vector< FilterStreamData * > filterOutputs
 
std::vector< SelectionDevice * > devices
 User interaction "Devices" associated with this filter. More...
 
- Static Protected Attributes inherited from Filter
static bool strongRandom = false
 

Detailed Description

Ion derived information filter, things like volume, composition, etc.

Constructor & Destructor Documentation

◆ IonInfoFilter()

IonInfoFilter::IonInfoFilter ( )

Constructor.

References Filter::cache, and Filter::cacheOK.

Referenced by cloneUncached(), and needsUnrangedData().

Here is the caller graph for this function:

Member Function Documentation

◆ cloneUncached()

Filter * IonInfoFilter::cloneUncached ( ) const
virtual

Duplicate filter contents, excluding cache.

Implements Filter.

References Filter::cache, Filter::cacheOK, IonInfoFilter(), and Filter::userString.

◆ getProperties()

void IonInfoFilter::getProperties ( FilterPropGroup propertyList) const
virtual

◆ getRefreshBlockMask()

unsigned int IonInfoFilter::getRefreshBlockMask ( ) const
virtual

Get the bitmask encoded list of filterStreams that this filter blocks from propagation.

Implements Filter.

References STREAMTYPE_MASK_ALL.

Referenced by typeString().

Here is the caller graph for this function:

◆ getRefreshEmitMask()

unsigned int IonInfoFilter::getRefreshEmitMask ( ) const
virtual

Get the bitmask encoded list of filterstreams that this filter emits from ::refresh.

Implements Filter.

Referenced by typeString().

Here is the caller graph for this function:

◆ getRefreshUseMask()

unsigned int IonInfoFilter::getRefreshUseMask ( ) const
virtual

Get the bitmask encoded list of filterstreams that this filter may use during ::refresh.

Implements Filter.

References STREAM_TYPE_IONS, and STREAM_TYPE_RANGE.

Referenced by typeString().

Here is the caller graph for this function:

◆ getSpecificErrString()

std::string IonInfoFilter::getSpecificErrString ( unsigned int  code) const
virtual

Get the human readable error string associated with a particular error code during refresh(...)

Implements Filter.

References ASSERT, COMPILE_ASSERT, IONINFO_ERR_ENUM_END, and THREEDEP_ARRAYSIZE.

Referenced by typeString().

Here is the caller graph for this function:

◆ getType()

unsigned int IonInfoFilter::getType ( ) const
inlinevirtual

return type ID

Implements Filter.

References FILTER_TYPE_IONINFO.

◆ initFilter()

void IonInfoFilter::initFilter ( const std::vector< const FilterStreamData *> &  dataIn,
std::vector< const FilterStreamData *> &  dataOut 
)
virtual

Initialise the filter's internal state using limited filter stream data propagation.

Reimplemented from Filter.

References RangeStreamData::rangeFile, and STREAM_TYPE_RANGE.

◆ needsUnrangedData()

bool IonInfoFilter::needsUnrangedData ( ) const

◆ numBytesForCache()

size_t IonInfoFilter::numBytesForCache ( size_t  nObjects) const
virtual

Get (approx) number of bytes required for cache.

Implements Filter.

◆ readState()

bool IonInfoFilter::readState ( xmlNodePtr &  n,
const std::string &  packDir = "" 
)
virtual

Read state from XML stream, using xml format.

Implements Filter.

References boolStrDec(), Filter::userString, VOLUME_MODE_END, XMLGetNextElemAttrib(), XMLHelpFwdToElem(), and XMLHelpGetProp().

Referenced by typeString().

Here is the caller graph for this function:

◆ refresh()

unsigned int IonInfoFilter::refresh ( const std::vector< const FilterStreamData *> &  dataIn,
std::vector< const FilterStreamData *> &  dataOut,
ProgressData progress 
)
virtual

◆ setProperty()

bool IonInfoFilter::setProperty ( unsigned int  key,
const std::string &  value,
bool &  needUpdate 
)
virtual

Set the properties for the nth filter, needUpdate tells us if filter output changes due to property set

Implements Filter.

References Filter::applyPropertyNow(), ASSERT, BACKGROUND_MODE_STRING, Filter::cacheOK, FIT_MODE_ENUM_END, IONINFO_KEY_BACK_BINSIZE, IONINFO_KEY_BACK_MASSEND, IONINFO_KEY_BACK_MASSSTART, IONINFO_KEY_BACKMODE, IONINFO_KEY_NORMALISE, IONINFO_KEY_TOTALS, IONINFO_KEY_VOLUME, IONINFO_KEY_VOLUME_ALGORITHM, stream_cast(), VOLUME_MODE_END, and volumeModeString.

Referenced by needsUnrangedData(), and typeString().

Here is the caller graph for this function:

◆ setPropFromBinding()

void IonInfoFilter::setPropFromBinding ( const SelectionBinding b)
virtual

Set the binding value for a float.

Implements Filter.

References ASSERT, computeConvexHull(), ERR_BAD_QHULL, and freeConvexHull().

Referenced by typeString().

Here is the caller graph for this function:

◆ typeString()

std::string IonInfoFilter::typeString ( ) const
inlinevirtual

◆ writeState()

bool IonInfoFilter::writeState ( std::ostream &  f,
unsigned int  format,
unsigned int  depth 
) const
virtual

Dump state to output stream, using specified format.

Implements Filter.

References ASSERT, escapeXML(), STATE_FORMAT_XML, tabs(), Filter::trueName(), and Filter::userString.

Referenced by typeString().

Here is the caller graph for this function:

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