LSSTApplications
10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
LSSTDataManagementBasePackage
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
home
lsstsw
stack
Linux64
afw
11.0.rc2+4
include
lsst
afw
math
BoundedField.h
Go to the documentation of this file.
1
// -*- LSST-C++ -*-
2
3
/*
4
* LSST Data Management System
5
* Copyright 2008-2014 LSST Corporation.
6
*
7
* This product includes software developed by the
8
* LSST Project (http://www.lsst.org/).
9
*
10
* This program is free software: you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation, either version 3 of the License, or
13
* (at your option) any later version.
14
*
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU General Public License for more details.
19
*
20
* You should have received a copy of the LSST License Statement and
21
* the GNU General Public License along with this program. If not,
22
* see <http://www.lsstcorp.org/LegalNotices/>.
23
*/
24
25
#ifndef LSST_AFW_MATH_BoundedField_h_INCLUDED
26
#define LSST_AFW_MATH_BoundedField_h_INCLUDED
27
28
#include "ndarray.h"
29
30
#include "
lsst/base.h
"
31
#include "
lsst/afw/geom/Point.h
"
32
#include "
lsst/afw/image/Image.h
"
33
#include "
lsst/afw/table/io/Persistable.h
"
34
35
namespace
lsst {
namespace
afw {
namespace
math {
36
49
class
BoundedField
:
public
table::io::PersistableFacade
<BoundedField>,
public
table::io::Persistable
{
50
public
:
51
60
virtual
double
evaluate
(
geom::Point2D
const
& position)
const
= 0;
61
70
double
evaluate
(
double
x
,
double
y
)
const
{
return
evaluate
(
geom::Point2D
(x, y)); }
71
82
ndarray::Array<double,1,1>
evaluate
(
83
ndarray::Array<double const,1>
const
&
x
,
84
ndarray::Array<double const,1>
const
&
y
85
)
const
;
86
95
geom::Box2I
getBBox
()
const
{
return
_bbox
; }
96
107
template
<
typename
T>
108
void
fillImage
(
image::Image<T>
&
image
,
bool
overlapOnly=
false
)
const
;
109
121
template
<
typename
T>
122
void
addToImage
(
image::Image<T>
&
image
,
double
scaleBy
=1.0,
bool
overlapOnly=
false
)
const
;
123
134
template
<
typename
T>
135
void
multiplyImage
(
image::Image<T>
&
image
,
bool
overlapOnly=
false
)
const
;
136
147
template
<
typename
T>
148
void
divideImage
(
image::Image<T>
&
image
,
bool
overlapOnly=
false
)
const
;
149
155
virtual
PTR
(
BoundedField
) operator*(
double
const
scale
) const = 0;
156
PTR
(
BoundedField
) operator/(
double
scale
)
const
{
157
return
(*
this
)*(1.0/
scale
);
158
}
159
160
virtual
~BoundedField
() {}
161
162
protected
:
163
164
explicit
BoundedField
(
geom::Box2I
const
& bbox) :
_bbox
(bbox) {}
165
166
private
:
167
geom::Box2I
const
_bbox
;
168
};
169
170
PTR
(
BoundedField
) operator*(
double
const
scale
,
CONST_PTR
(
BoundedField
) bf);
171
172
}}}
// namespace lsst::afw::math
173
174
#endif // !LSST_AFW_MATH_BoundedField_h_INCLUDED
y
int y
Definition:
GaussianCentroid.cc:36
Point.h
A coordinate class intended to represent absolute positions.
lsst.afw.math::BoundedField::fillImage
void fillImage(image::Image< T > &image, bool overlapOnly=false) const
Definition:
BoundedField.cc:108
PTR
#define PTR(...)
Definition:
base.h:41
lsst.afw.math::BoundedField::multiplyImage
void multiplyImage(image::Image< T > &image, bool overlapOnly=false) const
Definition:
BoundedField.cc:118
CONST_PTR
#define CONST_PTR(...)
Definition:
base.h:47
lsst.afw.math::BoundedField::addToImage
void addToImage(image::Image< T > &image, double scaleBy=1.0, bool overlapOnly=false) const
Definition:
BoundedField.cc:113
lsst.afw.math::BoundedField::_bbox
geom::Box2I const _bbox
Definition:
BoundedField.h:167
lsst.afw.geom::Point< double, 2 >
lsst.afw.geom::Box2I
An integer coordinate rectangle.
Definition:
Box.h:53
image
table::Key< table::Array< Kernel::Pixel > > image
Definition:
FixedKernel.cc:117
lsst.afw.table.io::Persistable
A base class for objects that can be persisted via afw::table::io Archive classes.
Definition:
Persistable.h:74
scaleBy
double scaleBy
Definition:
BoundedField.cc:63
lsst.afw.math::BoundedField::evaluate
virtual double evaluate(geom::Point2D const &position) const =0
lsst.afw.math::BoundedField::getBBox
geom::Box2I getBBox() const
Definition:
BoundedField.h:95
Image.h
Support for 2-D images.
Persistable.h
x
int x
Definition:
GaussianCentroid.cc:36
lsst.afw.display.ds9.scale
def scale
Definition:
ds9.py:91
base.h
ndarray::Array< double, 1, 1 >
lsst.afw.math::BoundedField::~BoundedField
virtual ~BoundedField()
Definition:
BoundedField.h:160
lsst.afw.math::BoundedField::evaluate
double evaluate(double x, double y) const
Definition:
BoundedField.h:70
lsst.afw.math::BoundedField
An abstract base class for 2-d functions defined on an integer bounding boxes.
Definition:
BoundedField.h:49
lsst.afw.table.io::PersistableFacade
A CRTP facade class for subclasses of Persistable.
Definition:
Persistable.h:182
lsst.afw.image::Image
A class to represent a 2-dimensional array of pixels.
Definition:
PSF.h:43
lsst.afw.math::BoundedField::divideImage
void divideImage(image::Image< T > &image, bool overlapOnly=false) const
Definition:
BoundedField.cc:123
lsst.afw.math::BoundedField::BoundedField
BoundedField(geom::Box2I const &bbox)
Definition:
BoundedField.h:164
Generated on Wed Sep 16 2015 13:35:25 for LSSTApplications by
1.8.5