LArOpenCV
1
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
ImageCluster
ImageClusterBase.cxx
Go to the documentation of this file.
1
#ifndef __IMAGECLUSTERBASE_CXX__
2
#define __IMAGECLUSTERBASE_CXX__
3
4
#include "
ImageClusterBase.h
"
5
6
namespace
larcv {
7
8
ImageClusterBase::ImageClusterBase
(
const
std::string name)
9
:
laropencv_base
(name)
10
, _name(name)
11
, _proc_time(0.)
12
, _proc_count(0)
13
, _profile(true)
14
{
LARCV_DEBUG
((*
this
)) <<
"Constructed"
<< std::endl;}
15
16
void
ImageClusterBase::Configure
(const ::fcllite::PSet& cfg) {
17
18
LARCV_DEBUG
((*
this
)) <<
"start"
<< std::endl;
19
this->
set_verbosity
((
msg::Level_t
)(cfg.get<
unsigned
short
>(
"Verbosity"
,(
unsigned
short
)(this->logger().level()))));
20
_profile
= cfg.get<
bool
>(
"Profile"
,
_profile
);
21
22
this->
_Configure_
(cfg);
23
24
LARCV_DEBUG
((*
this
)) <<
"end"
<< std::endl;
25
}
26
27
ContourArray_t
ImageClusterBase::Process
(
const
larcv::ContourArray_t
& clusters,
28
const ::cv::Mat& img,
29
larcv::ImageMeta
& meta)
30
{
31
if
(!
_profile
)
return
this->
_Process_
(clusters,img,meta);
32
_watch
.
Start
();
33
auto
result = this->
_Process_
(clusters,img,meta);
34
_proc_time
+=
_watch
.
WallTime
();
35
++
_proc_count
;
36
return
result;
37
}
38
39
}
40
41
#endif
Generated on Wed Jan 27 2016 14:36:23 for LArOpenCV by
1.8.4