CFEL - ASG Software Suite  2.5.0
CASS
pixel_finder_base.cpp
Go to the documentation of this file.
1 // Copyright (C) 2011 Lutz Foucar
2 
3 /**
4  * @file pixel_finder_base.cpp file contains base class for all coalescing functors.
5  *
6  * @author Lutz Foucar
7  */
8 
9 #include <sstream>
10 #include <stdexcept>
11 
12 #include "pixel_finder_base.h"
13 
14 #include "above_noise_finder.h"
15 #include "pixel_finder_simple.h"
16 
17 using namespace cass;
18 using namespace pixeldetector;
19 using namespace std;
20 using namespace std::tr1;
21 
23 {
24  shared_pointer ptr;
25  if (type == "aboveNoise")
26  ptr = shared_pointer(new AboveNoiseFinder());
27  else if (type == "simple")
28  ptr = shared_pointer(new PixelFinderSimple());
29  else if (type == "range")
30  ptr = shared_pointer(new WithinRange());
31  else if (type == "simpleMoreOptions")
33  else
34  throw invalid_argument("PixelFinderBase::instance: Pixel Finder type '" +type +
35  "' is unknown.");
36  return ptr;
37 }
std::tr1::shared_ptr< PixelFinderBase > shared_pointer
typedef the shared pointer of this
same as simple, but with adjustable box size
simple algorithm to find pixels of interest
STL namespace.
static shared_pointer instance(const std::string &type)
create an instance of the requested functor
will find pixels by comparing them to a "noise" map
contains hll like finder for pixels
contains base class for all pixel finders.
contains pixel finder that works like Per Johnsons