Xmipp  v3.23.11-Nereus
Public Member Functions | List of all members
MDExpression Class Reference

#include <metadata_query.h>

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

Public Member Functions

 MDExpression ()
 
 MDExpression (String _sExpression, int limit=-1, int offset=0, MDLabel orderLabel=MDL_OBJID)
 
virtual String queryStringFunc () const
 
- Public Member Functions inherited from MDQuery
 MDQuery (int limit=-1, int offset=0, MDLabel orderLabel=MDL_OBJID, bool asc=true)
 
virtual ~MDQuery ()
 
String orderByString () const
 
String limitString () const
 
String whereString () const
 

Additional Inherited Members

- Public Attributes inherited from MDQuery
int limit
 If distint of -1 the results will be limited to this value. More...
 
int offset
 If distint of 0, offset elements will be discarded. More...
 
MDLabel orderLabel
 Label to which apply sort of the results. More...
 
bool asc
 

Detailed Description

This subclass of Query will select those entries that satisfy an expression.

//Remove all images with rotational angle between 100 and 200
md.removeObjects(MDExpression("angleRot > 100 AND angleRot < 200"));

Definition at line 294 of file metadata_query.h.

Constructor & Destructor Documentation

◆ MDExpression() [1/2]

MDExpression::MDExpression ( )
inline

Definition at line 298 of file metadata_query.h.

299  {
300  sExpression = " 1=1 ";
301  }

◆ MDExpression() [2/2]

MDExpression::MDExpression ( String  _sExpression,
int  limit = -1,
int  offset = 0,
MDLabel  orderLabel = MDL_OBJID 
)
inline

Definition at line 302 of file metadata_query.h.

306  {
307  sExpression=_sExpression;
308  }
int limit
If distint of -1 the results will be limited to this value.
MDLabel orderLabel
Label to which apply sort of the results.
int offset
If distint of 0, offset elements will be discarded.
MDQuery(int limit=-1, int offset=0, MDLabel orderLabel=MDL_OBJID, bool asc=true)

Member Function Documentation

◆ queryStringFunc()

virtual String MDExpression::queryStringFunc ( ) const
inlinevirtual

Return the query string, should be overrided in subclasses

Reimplemented from MDQuery.

Definition at line 310 of file metadata_query.h.

311  {
312  return sExpression;
313  }

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