forked from kvtsang/Supera
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SuperaKeyPointCluster.h
96 lines (75 loc) · 2.32 KB
/
SuperaKeyPointCluster.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/**
* \file SuperaKeyPointCluster.h
*
* \ingroup Package_Name
*
* \brief Class def header for a class SuperaKeyPointCluster
*
* @author kazuhiro
*/
/** \addtogroup Package_Name
@{*/
#ifndef __SUPERAKEYPOINTCLUSTER_H__
#define __SUPERAKEYPOINTCLUSTER_H__
#include "SuperaBase.h"
#include "FMWKInterface.h"
#include "ImageMetaMaker.h"
#include "ParamsPixel2D.h"
#include "ParamsVoxel3D.h"
#include "larcv/core/DataFormat/EventVoxel2D.h"
#include "larcv/core/DataFormat/EventVoxel3D.h"
#include "larcv/core/DataFormat/Vertex.h"
namespace larcv {
/**
\class ProcessBase
User defined class SuperaKeyPointCluster ... these comments are used to generate
doxygen documentation!
*/
class SuperaKeyPointCluster : public SuperaBase,
public supera::ParamsPixel2D,
public supera::ParamsVoxel3D,
public supera::ImageMetaMaker {
public:
/// Default constructor
SuperaKeyPointCluster(const std::string name="SuperaKeyPointCluster");
/// Default destructor
~SuperaKeyPointCluster(){}
void configure(const PSet&);
void initialize();
bool process(IOManager& mgr);
void finalize();
private:
larcv::Vertex GetPoint(const supera::LArMCStep_t& step);
void CreateCluster2D(larcv::ClusterPixel2D& res,
const std::set<larcv::Vertex>& pt_s,
const unsigned short val,
const int time_offset);
void CreateCluster3D(larcv::ClusterVoxel3D& res,
const std::set<larcv::Vertex>& pt_s,
const unsigned short val,
const int time_offset);
std::string _in_roi_label;
bool _apply_sce;
size_t _row_pad;
size_t _col_pad;
bool _cluster_primary_start;
bool _cluster_secondary_start;
bool _cluster_scattering;
size_t _pad3d_x, _pad3d_y, _pad3d_z;
};
/**
\class larcv::SuperaKeyPointClusterFactory
\brief A concrete factory class for larcv::SuperaKeyPointCluster
*/
class SuperaKeyPointClusterProcessFactory : public ProcessFactoryBase {
public:
/// ctor
SuperaKeyPointClusterProcessFactory() { ProcessFactory::get().add_factory("SuperaKeyPointCluster",this); }
/// dtor
~SuperaKeyPointClusterProcessFactory() {}
/// creation method
ProcessBase* create(const std::string instance_name) { return new SuperaKeyPointCluster(instance_name); }
};
}
#endif
/** @} */ // end of doxygen group