LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
home
lsstsw
stack
Linux64
afw
11.0-2-g04d2804
include
lsst
afw
detection
FootprintCtrl.h
Go to the documentation of this file.
1
/*
2
* LSST Data Management System
3
* Copyright 2008, 2009, 2010 LSST Corporation.
4
*
5
* This product includes software developed by the
6
* LSST Project (http://www.lsst.org/).
7
*
8
* This program is free software: you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation, either version 3 of the License, or
11
* (at your option) any later version.
12
*
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
17
*
18
* You should have received a copy of the LSST License Statement and
19
* the GNU General Public License along with this program. If not,
20
* see <http://www.lsstcorp.org/LegalNotices/>.
21
*/
22
#if !defined(LSST_DETECTION_FOOTPRINTCTRL_H)
23
#define LSST_DETECTION_FOOTPRINTCTRL_H
24
29
namespace
lsst {
30
namespace
afw {
31
namespace
detection {
36
class
FootprintControl
{
37
enum
TBool
{
FALSE_
=
false
,
TRUE_
=
true
,
NONE_
};
// ternary boolean value. N.b. _XXX is reserved
38
39
static
std::pair<bool, bool>
makePairFromTBool
(
TBool
const
val
)
40
{
41
return
(val ==
NONE_
) ? std::make_pair(
false
,
false
) : std::make_pair(
true
, val ==
TRUE_
);
42
}
43
public
:
44
explicit
FootprintControl
() :
_circular
(
NONE_
),
_isotropic
(
NONE_
),
45
_left
(
NONE_
),
_right
(
NONE_
),
_up
(
NONE_
),
_down
(
NONE_
) {}
46
explicit
FootprintControl
(
bool
circular,
bool
isotropic=
false
) :
47
_circular
(circular ?
TRUE_
:
FALSE_
),
_isotropic
(isotropic ?
TRUE_
:
FALSE_
),
48
_left
(
NONE_
),
_right
(
NONE_
),
_up
(
NONE_
),
_down
(
NONE_
) {}
49
explicit
FootprintControl
(
bool
left,
bool
right,
bool
up,
bool
down) :
50
_circular
(
NONE_
),
_isotropic
(
NONE_
),
51
_left
(left ?
TRUE_
:
FALSE_
),
_right
(right ?
TRUE_
:
FALSE_
),
52
_up
(up ?
TRUE_
:
FALSE_
),
_down
(down ?
TRUE_
:
FALSE_
) {}
53
54
#define DEFINE_ACCESSORS(NAME, UNAME) \
55
\
56
void grow ## UNAME(bool val \
57
) { _ ## NAME = val ? TRUE_ : FALSE_; } \
58
\
59
std::pair<bool, bool> is ## UNAME() const { \
60
return makePairFromTBool(_ ## NAME); \
61
}
62
63
DEFINE_ACCESSORS
(circular, Circular)
64
//DEFINE_ACCESSORS(isotropic, Isotropic) // special, as isotropic => circular
65
DEFINE_ACCESSORS
(left, Left)
66
DEFINE_ACCESSORS
(right, Right)
67
DEFINE_ACCESSORS
(up, Up)
68
DEFINE_ACCESSORS
(down, Down)
69
71
void
growIsotropic
(
bool
val
72
) {
73
_circular
=
TRUE_
;
74
_isotropic
= val ?
TRUE_
:
FALSE_
;
75
}
77
std::pair<bool, bool>
isIsotropic
()
const
{
78
return
makePairFromTBool
(
_isotropic
);
79
}
80
81
#undef DEFINE_ACCESSORS
82
private
:
83
TBool
_circular
;
// grow in all directions ( == left & right & up & down)
84
TBool
_isotropic
;
// go to the expense of as isotropic a grow as possible
85
TBool
_left
,
_right
,
_up
,
_down
;
// grow in selected directions?
86
};
87
91
class
HeavyFootprintCtrl
{
92
public
:
93
enum
ModifySource
{
NONE
,
SET
,};
94
95
explicit
HeavyFootprintCtrl
(
ModifySource
modifySource=
NONE
) :
96
_modifySource
(modifySource),
97
_imageVal
(0.0),
_maskVal
(0),
_varianceVal
(0.0)
98
{}
99
100
ModifySource
getModifySource
()
const
{
return
_modifySource
; }
101
void
setModifySource
(
ModifySource
modifySource) {
_modifySource
= modifySource; }
102
103
double
getImageVal
()
const
{
return
_imageVal
; }
104
void
setImageVal
(
double
imageVal) {
_imageVal
= imageVal; }
105
long
getMaskVal
()
const
{
return
_maskVal
; }
106
void
setMaskVal
(
long
maskVal) {
_maskVal
= maskVal; }
107
double
getVarianceVal
()
const
{
return
_varianceVal
; }
108
void
setVarianceVal
(
double
varianceVal) {
_varianceVal
= varianceVal; }
109
110
private
:
111
ModifySource
_modifySource
;
112
double
_imageVal
;
113
long
_maskVal
;
114
double
_varianceVal
;
115
};
116
117
}}}
118
119
#endif
lsst::afw::detection::FootprintControl::growIsotropic
void growIsotropic(bool val)
Set whether Footprint should be grown isotropically.
Definition:
FootprintCtrl.h:71
lsst::afw::detection::FootprintControl::_down
TBool _down
Definition:
FootprintCtrl.h:85
lsst::afw::detection::HeavyFootprintCtrl::SET
Definition:
FootprintCtrl.h:93
lsst::afw::detection::FootprintControl::makePairFromTBool
static std::pair< bool, bool > makePairFromTBool(TBool const val)
Definition:
FootprintCtrl.h:39
lsst::afw::detection::FootprintControl
A Control Object for Footprints, controlling e.g. how they are grown.
Definition:
FootprintCtrl.h:36
lsst::afw::detection::FootprintControl::_right
TBool _right
Definition:
FootprintCtrl.h:85
lsst::afw::detection::HeavyFootprintCtrl::_varianceVal
double _varianceVal
Definition:
FootprintCtrl.h:114
lsst::afw::detection::HeavyFootprintCtrl
A control object for HeavyFootprints.
Definition:
FootprintCtrl.h:91
lsst::afw::detection::FootprintControl::isIsotropic
std::pair< bool, bool > isIsotropic() const
Return <isSet, Value> for isotropic grows.
Definition:
FootprintCtrl.h:77
lsst::afw::detection::FootprintControl::_up
TBool _up
Definition:
FootprintCtrl.h:85
lsst::afw::detection::HeavyFootprintCtrl::NONE
Definition:
FootprintCtrl.h:93
lsst::afw::detection::HeavyFootprintCtrl::setModifySource
void setModifySource(ModifySource modifySource)
Definition:
FootprintCtrl.h:101
lsst::afw::detection::HeavyFootprintCtrl::_imageVal
double _imageVal
Definition:
FootprintCtrl.h:112
lsst::afw::detection::FootprintControl::NONE_
Definition:
FootprintCtrl.h:37
lsst::afw::detection::FootprintControl::FootprintControl
FootprintControl(bool circular, bool isotropic=false)
Definition:
FootprintCtrl.h:46
val
bool val
Definition:
DevicePreference.cc:55
lsst::afw::detection::HeavyFootprintCtrl::setImageVal
void setImageVal(double imageVal)
Definition:
FootprintCtrl.h:104
lsst::afw::detection::HeavyFootprintCtrl::_modifySource
ModifySource _modifySource
Definition:
FootprintCtrl.h:111
lsst::afw::detection::HeavyFootprintCtrl::setMaskVal
void setMaskVal(long maskVal)
Definition:
FootprintCtrl.h:106
lsst::afw::detection::HeavyFootprintCtrl::HeavyFootprintCtrl
HeavyFootprintCtrl(ModifySource modifySource=NONE)
Definition:
FootprintCtrl.h:95
lsst::afw::detection::FootprintControl::_left
TBool _left
Definition:
FootprintCtrl.h:85
lsst::afw::detection::FootprintControl::FALSE_
Definition:
FootprintCtrl.h:37
lsst::afw::detection::HeavyFootprintCtrl::_maskVal
long _maskVal
Definition:
FootprintCtrl.h:113
lsst::afw::detection::HeavyFootprintCtrl::setVarianceVal
void setVarianceVal(double varianceVal)
Definition:
FootprintCtrl.h:108
lsst::afw::detection::HeavyFootprintCtrl::getModifySource
ModifySource getModifySource() const
Definition:
FootprintCtrl.h:100
DEFINE_ACCESSORS
#define DEFINE_ACCESSORS(NAME, UNAME)
Definition:
FootprintCtrl.h:54
lsst::afw::detection::FootprintControl::_circular
TBool _circular
Definition:
FootprintCtrl.h:83
lsst::afw::detection::HeavyFootprintCtrl::getMaskVal
long getMaskVal() const
Definition:
FootprintCtrl.h:105
lsst::afw::detection::FootprintControl::FootprintControl
FootprintControl()
Definition:
FootprintCtrl.h:44
lsst::afw::detection::HeavyFootprintCtrl::getImageVal
double getImageVal() const
Definition:
FootprintCtrl.h:103
lsst::afw::detection::HeavyFootprintCtrl::ModifySource
ModifySource
Definition:
FootprintCtrl.h:93
lsst::afw::detection::FootprintControl::TBool
TBool
Definition:
FootprintCtrl.h:37
lsst::afw::detection::FootprintControl::_isotropic
TBool _isotropic
Definition:
FootprintCtrl.h:84
lsst::afw::detection::FootprintControl::TRUE_
Definition:
FootprintCtrl.h:37
lsst::afw::detection::HeavyFootprintCtrl::getVarianceVal
double getVarianceVal() const
Definition:
FootprintCtrl.h:107
lsst::afw::detection::FootprintControl::FootprintControl
FootprintControl(bool left, bool right, bool up, bool down)
Definition:
FootprintCtrl.h:49
Generated on Thu Sep 24 2015 02:29:14 for LSSTApplications by
1.8.5