SimpleOperationPool.cpp 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /**
  2. * @file SimpleOperationPool.cpp
  3. * @brief pool for simple feature extraction methods
  4. * @author Sven Sickert
  5. * @date 10/09/2015
  6. */
  7. #include "SimpleOperationPool.h"
  8. using namespace OBJREC;
  9. SimpleOperationPool::SimpleOperationPool ( )
  10. : OperationPool ( )
  11. {
  12. }
  13. SimpleOperationPool::SimpleOperationPool ( const NICE::Config *_config )
  14. : OperationPool ( _config )
  15. {
  16. contextMode = false;
  17. }
  18. SimpleOperationPool::SimpleOperationPool ( const NICE::Config *_config,
  19. const bool _contextMode )
  20. : OperationPool ( _config )
  21. {
  22. contextMode = _contextMode;
  23. }
  24. SimpleOperationPool::~SimpleOperationPool ( )
  25. {
  26. }
  27. void SimpleOperationPool::getOperations ( std::string confString )
  28. {
  29. if ( config->gB ( confString, "minus", true ) )
  30. {
  31. Operation3D* o = new Minus3D();
  32. o->setContext( contextMode );
  33. pool.push_back ( o );
  34. }
  35. if ( config->gB ( confString, "minus_abs", true ) )
  36. {
  37. Operation3D* o = new MinusAbs3D();
  38. o->setContext( contextMode );
  39. pool.push_back ( o );
  40. }
  41. if ( config->gB ( confString, "addition", true ) )
  42. {
  43. Operation3D* o = new Addition3D();
  44. o->setContext( contextMode );
  45. pool.push_back ( o );
  46. }
  47. if ( config->gB ( confString, "only1", true ) )
  48. {
  49. Operation3D* o = new Only13D();
  50. o->setContext ( contextMode );
  51. pool.push_back ( o );
  52. }
  53. if ( config->gB ( confString, "rel_x", true ) )
  54. pool.push_back ( new RelativeXPosition3D() );
  55. if ( config->gB ( confString, "rel_y", true ) )
  56. pool.push_back ( new RelativeYPosition3D() );
  57. if ( config->gB ( confString, "rel_z", true ) )
  58. pool.push_back ( new RelativeZPosition3D() );
  59. }