LSSTApplications  19.0.0-14-gb0260a2+72efe9b372,20.0.0+7927753e06,20.0.0+8829bf0056,20.0.0+995114c5d2,20.0.0+b6f4b2abd1,20.0.0+bddc4f4cbe,20.0.0-1-g253301a+8829bf0056,20.0.0-1-g2b7511a+0d71a2d77f,20.0.0-1-g5b95a8c+7461dd0434,20.0.0-12-g321c96ea+23efe4bbff,20.0.0-16-gfab17e72e+fdf35455f6,20.0.0-2-g0070d88+ba3ffc8f0b,20.0.0-2-g4dae9ad+ee58a624b3,20.0.0-2-g61b8584+5d3db074ba,20.0.0-2-gb780d76+d529cf1a41,20.0.0-2-ged6426c+226a441f5f,20.0.0-2-gf072044+8829bf0056,20.0.0-2-gf1f7952+ee58a624b3,20.0.0-20-geae50cf+e37fec0aee,20.0.0-25-g3dcad98+544a109665,20.0.0-25-g5eafb0f+ee58a624b3,20.0.0-27-g64178ef+f1f297b00a,20.0.0-3-g4cc78c6+e0676b0dc8,20.0.0-3-g8f21e14+4fd2c12c9a,20.0.0-3-gbd60e8c+187b78b4b8,20.0.0-3-gbecbe05+48431fa087,20.0.0-38-ge4adf513+a12e1f8e37,20.0.0-4-g97dc21a+544a109665,20.0.0-4-gb4befbc+087873070b,20.0.0-4-gf910f65+5d3db074ba,20.0.0-5-gdfe0fee+199202a608,20.0.0-5-gfbfe500+d529cf1a41,20.0.0-6-g64f541c+d529cf1a41,20.0.0-6-g9a5b7a1+a1cd37312e,20.0.0-68-ga3f3dda+5fca18c6a4,20.0.0-9-g4aef684+e18322736b,w.2020.45
LSSTDataManagementBasePackage
HeavyFootprint.cc
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 
23 #include <cstdint>
24 #include <cassert>
25 #include <string>
26 #include <typeinfo>
27 #include <algorithm>
28 #include "boost/format.hpp"
29 #include "lsst/pex/exceptions.h"
40 
41 namespace lsst {
42 namespace afw {
43 namespace detection {
44 namespace {
45 
46 template <typename T>
47 struct FlattenWithSetter {
48  FlattenWithSetter(T val) : _val(val) {}
49 
50  void operator()(lsst::geom::Point2I const& point, T& out, T& in) {
51  out = in;
52  in = _val;
53  }
54 
55 private:
56  T _val;
57 };
58 
59 template <>
60 struct FlattenWithSetter<lsst::afw::image::MaskPixel> {
62  FlattenWithSetter(T val) : _mask(~val) {}
63 
64  void operator()(lsst::geom::Point2I const& point, T& out, T& in) {
65  out = in;
66  in &= _mask;
67  }
68 
69 private:
70  T _mask;
71 };
72 } // namespace
73 
74 template <typename ImagePixelT, typename MaskPixelT, typename VariancePixelT>
77  HeavyFootprintCtrl const* ctrl)
78  : Footprint(foot),
79  _image(ndarray::allocate(ndarray::makeVector(foot.getArea()))),
80  _mask(ndarray::allocate(ndarray::makeVector(foot.getArea()))),
81  _variance(ndarray::allocate(ndarray::makeVector(foot.getArea()))) {
83 
84  if (!ctrl) {
85  ctrl = &ctrl_s;
86  }
87 
88  switch (ctrl->getModifySource()) {
90  getSpans()->flatten(_image, mimage.getImage()->getArray(), mimage.getXY0());
91  getSpans()->flatten(_mask, mimage.getMask()->getArray(), mimage.getXY0());
92  getSpans()->flatten(_variance, mimage.getVariance()->getArray(), mimage.getXY0());
93  break;
95  ImagePixelT const ival = ctrl->getImageVal();
96  MaskPixelT const mval = ctrl->getMaskVal();
97  VariancePixelT const vval = ctrl->getVarianceVal();
98 
99  getSpans()->applyFunctor(FlattenWithSetter<ImagePixelT>(ival), ndarray::ndFlat(_image),
100  ndarray::ndImage(mimage.getImage()->getArray(), mimage.getXY0()));
101  getSpans()->applyFunctor(FlattenWithSetter<MaskPixelT>(mval), ndarray::ndFlat(_mask),
102  ndarray::ndImage(mimage.getMask()->getArray(), mimage.getXY0()));
103  getSpans()->applyFunctor(FlattenWithSetter<VariancePixelT>(vval), ndarray::ndFlat(_variance),
104  ndarray::ndImage(mimage.getVariance()->getArray(), mimage.getXY0()));
105  break;
106  }
107  }
108 }
109 
110 template <typename ImagePixelT, typename MaskPixelT, typename VariancePixelT>
112  HeavyFootprintCtrl const* ctrl)
113  : Footprint(foot),
114  _image(ndarray::allocate(ndarray::makeVector(foot.getArea()))),
115  _mask(ndarray::allocate(ndarray::makeVector(foot.getArea()))),
116  _variance(ndarray::allocate(ndarray::makeVector(foot.getArea()))) {}
117 
118 template <typename ImagePixelT, typename MaskPixelT, typename VariancePixelT>
121  getSpans()->unflatten(mimage.getImage()->getArray(), _image, mimage.getXY0());
122  getSpans()->unflatten(mimage.getMask()->getArray(), _mask, mimage.getXY0());
123  getSpans()->unflatten(mimage.getVariance()->getArray(), _variance, mimage.getXY0());
124 }
125 
126 template <typename ImagePixelT, typename MaskPixelT, typename VariancePixelT>
128  getSpans()->unflatten(image.getArray(), _image, image.getXY0());
129 }
130 
131 template <typename ImagePixelT, typename MaskPixelT, typename VariancePixelT>
135  // Merge the Footprints (by merging the Spans)
137 
138  // Find the union bounding-box
140  bbox.include(h2.getBBox());
141 
142  // Create union-bb-sized images and insert the heavies
145  h1.insert(im1);
146  h2.insert(im2);
147  // Add the pixels
148  im1 += im2;
149 
150  // Build new HeavyFootprint from the merged spans and summed pixels.
151  return std::make_shared<HeavyFootprint<ImagePixelT, MaskPixelT, VariancePixelT>>(*foot, im1);
152 }
153 
154 template <typename ImagePixelT, typename MaskPixelT, typename VariancePixelT>
157  // Coordinated cycling through the iterators while juggling the offsets into the arrays
158  typedef typename ndarray::Array<ImagePixelT const, 1, 1>::Iterator ArrayIter;
159  ArrayIter lhsArray = getImageArray().begin(), rhsArray = rhs.getImageArray().begin();
160  auto lhsIter = getSpans()->begin(), rhsIter = rhs.getSpans()->begin();
161  auto const lhsEnd = getSpans()->end(), rhsEnd = rhs.getSpans()->end();
162  double sum = 0.0;
163  while (lhsIter != lhsEnd && rhsIter != rhsEnd) {
164  geom::Span const &lhsSpan = *lhsIter, rhsSpan = *rhsIter;
165  int const yLhs = lhsSpan.getY(), yRhs = rhsSpan.getY();
166  if (yLhs == yRhs) {
167  int const x0Lhs = lhsSpan.getX0(), x1Lhs = lhsSpan.getX1();
168  int const x0Rhs = rhsSpan.getX0(), x1Rhs = rhsSpan.getX1();
169  int const xMin = std::max(x0Lhs, x0Rhs), xMax = std::min(x1Lhs, x1Rhs);
170  if (xMin <= xMax) {
171  lhsArray += xMin - x0Lhs;
172  rhsArray += xMin - x0Rhs;
173  for (int x = xMin; x <= xMax; ++x, ++lhsArray, ++rhsArray) {
174  sum += (*lhsArray) * (*rhsArray);
175  }
176  // Rewind to the start of the span, for easier sync between spans and arrays
177  lhsArray -= xMax + 1 - x0Lhs;
178  rhsArray -= xMax + 1 - x0Rhs;
179  }
180  if (x1Lhs <= x1Rhs) {
181  lhsArray += lhsSpan.getWidth();
182  ++lhsIter;
183  } else {
184  rhsArray += rhsSpan.getWidth();
185  ++rhsIter;
186  }
187  continue;
188  } else if (yLhs < yRhs) {
189  while (lhsIter != lhsEnd && lhsIter->getY() < yRhs) {
190  lhsArray += lhsIter->getWidth();
191  ++lhsIter;
192  }
193  continue;
194  } else { // yLhs > yRhs
195  while (rhsIter != rhsEnd && rhsIter->getY() < yLhs) {
196  rhsArray += rhsIter->getWidth();
197  ++rhsIter;
198  }
199  continue;
200  }
201  }
202  return sum;
203 }
204 
205 // Persistence (using afw::table::io)
206 //
207 
208 namespace {
209 
210 // Schema and Keys used to persist the pixels of a HeavyFootprint (Spans and Peaks are handled by the
211 // Footprint base class). This is a singleton, but a different one for each template instantiation.
212 template <typename ImagePixelT, typename MaskPixelT = image::MaskPixel,
213  typename VariancePixelT = image::VariancePixel>
214 struct HeavyFootprintPersistenceHelper {
215  afw::table::Schema schema;
216  afw::table::Key<afw::table::Array<ImagePixelT>> image;
217  afw::table::Key<afw::table::Array<MaskPixelT>> mask;
218  afw::table::Key<afw::table::Array<VariancePixelT>> variance;
219 
220  static HeavyFootprintPersistenceHelper const& get() {
221  static HeavyFootprintPersistenceHelper const instance;
222  return instance;
223  }
224 
225 private:
226  HeavyFootprintPersistenceHelper()
227  : schema(),
228  image(schema.addField<afw::table::Array<ImagePixelT>>(
229  "image", "image pixels for HeavyFootprint", "count")),
230  mask(schema.addField<afw::table::Array<MaskPixelT>>("mask", "mask pixels for HeavyFootprint")),
231  variance(schema.addField<afw::table::Array<VariancePixelT>>(
232  "variance", "variance pixels for HeavyFootprint", "count^2")) {}
233 };
234 
235 // These suffix-computing structs are used to compute the string name associated with a HeavyFootprint
236 // for Persistence.
237 // We don't instantiate HeavyFootprints with anything other than defaults for Mask and Variance, so we
238 // don't bother figuring out what suffixes to use for them for now. If we change that, we just need
239 // to add more explicit specializations of this template.
240 template <typename ImagePixelT, typename MaskPixelT = image::MaskPixel,
241  typename VariancePixelT = image::VariancePixel>
242 struct ComputeSuffix;
243 template <>
244 struct ComputeSuffix<std::uint16_t> {
245  static std::string apply() { return "U"; }
246 };
247 template <>
248 struct ComputeSuffix<float> {
249  static std::string apply() { return "F"; }
250 };
251 template <>
252 struct ComputeSuffix<double> {
253  static std::string apply() { return "D"; }
254 };
255 template <>
256 struct ComputeSuffix<int> {
257  static std::string apply() { return "I"; }
258 };
259 
260 } // namespace
261 
262 template <typename ImagePixelT, typename MaskPixelT, typename VariancePixelT>
264  return "HeavyFootprint" + ComputeSuffix<ImagePixelT, MaskPixelT, VariancePixelT>::apply();
265 }
266 
267 template <typename ImagePixelT, typename MaskPixelT, typename VariancePixelT>
269  HeavyFootprintPersistenceHelper<ImagePixelT, MaskPixelT, VariancePixelT> const& keys =
270  HeavyFootprintPersistenceHelper<ImagePixelT, MaskPixelT, VariancePixelT>::get();
271  // delegate to Footprint::write to handle spans and peaks
272  Footprint::write(handle);
273  // add one more catalog for pixel values
274  afw::table::BaseCatalog cat = handle.makeCatalog(keys.schema);
276  // We could deep-copy the arrays instead of const-casting them, which might be marginally safer,
277  // but we always save an OutputArchive to disk immediately after we create it, so there's really
278  // no chance that we could get the HeavyFootprint in trouble by having this view modified.
279  record->set(keys.image, ndarray::const_array_cast<ImagePixelT>(getImageArray()));
280  record->set(keys.mask, ndarray::const_array_cast<MaskPixelT>(getMaskArray()));
281  record->set(keys.variance, ndarray::const_array_cast<VariancePixelT>(getVarianceArray()));
282  handle.saveCatalog(cat);
283 }
284 
285 template <typename ImagePixelT, typename MaskPixelT, typename VariancePixelT>
286 class HeavyFootprint<ImagePixelT, MaskPixelT, VariancePixelT>::Factory
288 public:
289  explicit Factory(std::string const& name) : afw::table::io::PersistableFactory(name) {}
290 
292  CatalogVector const& catalogs) const override {
293  HeavyFootprintPersistenceHelper<ImagePixelT, MaskPixelT, VariancePixelT> const& keys =
294  HeavyFootprintPersistenceHelper<ImagePixelT, MaskPixelT, VariancePixelT>::get();
295  HeavyFootprintPersistenceHelper<ImagePixelT, std::uint16_t, VariancePixelT> const& legacyKeys =
296  HeavyFootprintPersistenceHelper<ImagePixelT, std::uint16_t, VariancePixelT>::get();
297  LSST_ARCHIVE_ASSERT(catalogs.size() == 3u);
298 
299  // Read in the SpanSet into a new Footprint object
300  std::shared_ptr<Footprint> loadedFootprint = readSpanSet(catalogs[0], archive);
301  // Now read in the PeakCatalog records
302  readPeaks(catalogs[1], *loadedFootprint);
303  afw::table::BaseRecord const& record = catalogs[2].front();
304 
305  // Create the HeavyFootprint from the above Footprint
306  auto result =
307  std::make_shared<HeavyFootprint<ImagePixelT, MaskPixelT, VariancePixelT>>(*loadedFootprint);
308  result->_image = ndarray::const_array_cast<ImagePixelT>(record.get(keys.image));
309 
310  // Handle legacy Masks prior to change to int32
311  if (catalogs[2].getSchema() == legacyKeys.schema) {
312  auto legacyMask = ndarray::const_array_cast<std::uint16_t>(record.get(legacyKeys.mask));
313  result->_mask.deep() = legacyMask;
314  } else {
315  result->_mask = ndarray::const_array_cast<MaskPixelT>(record.get(keys.mask));
316  }
317  result->_variance = ndarray::const_array_cast<VariancePixelT>(record.get(keys.variance));
318  return result;
319  }
320 
322 };
323 
324 // initialize static instance, registering the factory with the persistence mechanism at the same time
325 template <typename ImagePixelT, typename MaskPixelT, typename VariancePixelT>
328  "HeavyFootprint" + ComputeSuffix<ImagePixelT, MaskPixelT, VariancePixelT>::apply());
329 } // namespace detection
330 
331 //
332 // Explicit instantiations
333 //
334 //
335 #define INSTANTIATE(TYPE) \
336  template std::shared_ptr<detection::HeavyFootprint<TYPE>> \
337  table::io::PersistableFacade<detection::HeavyFootprint<TYPE>>::dynamicCast( \
338  std::shared_ptr<table::io::Persistable> const&); \
339  template class detection::HeavyFootprint<TYPE>; \
340  template std::shared_ptr<detection::HeavyFootprint<TYPE>> detection::mergeHeavyFootprints<TYPE>( \
341  detection::HeavyFootprint<TYPE> const&, detection::HeavyFootprint<TYPE> const&);
342 
344 INSTANTIATE(double);
345 INSTANTIATE(float);
346 INSTANTIATE(int);
347 } // namespace afw
348 } // namespace lsst
ndarray::ndImage
details::ImageNdGetter< T, inA, inB > ndImage(ndarray::Array< T, inA, inB > const &array, lsst::geom::Point2I xy0=lsst::geom::Point2I())
Marks a ndarray to be interpreted as an image when applying a functor from a SpanSet.
Definition: SpanSetFunctorGetters.h:333
lsst::afw::detection::HeavyFootprintCtrl::SET
@ SET
Definition: FootprintCtrl.h:103
lsst::afw::image
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects.
Definition: imageAlgorithm.dox:1
lsst::afw::detection::Footprint::getBBox
lsst::geom::Box2I getBBox() const
Return the Footprint's bounding box.
Definition: Footprint.h:208
lsst::afw::detection::HeavyFootprint::getPersistenceName
std::string getPersistenceName() const override
Return the name correspoinging ot the persistence type.
Definition: HeavyFootprint.cc:263
lsst::afw::detection::HeavyFootprint::getImageArray
ndarray::Array< ImagePixelT, 1, 1 > getImageArray()
Definition: HeavyFootprint.h:107
std::string
STL class.
lsst::afw::detection::HeavyFootprintCtrl
A control object for HeavyFootprints.
Definition: FootprintCtrl.h:99
std::shared_ptr
STL class.
lsst::afw::detection::HeavyFootprint::Factory::registration
static Factory registration
Definition: HeavyFootprint.cc:321
lsst::afw::table::BaseRecord::get
Field< T >::Value get(Key< T > const &key) const
Return the value of a field for the given key.
Definition: BaseRecord.h:151
lsst::afw::table::io::OutputArchiveHandle
An object passed to Persistable::write to allow it to persist itself.
Definition: OutputArchive.h:118
MaskedImage.h
std::vector::size
T size(T... args)
lsst::afw::table::io::OutputArchiveHandle::saveCatalog
void saveCatalog(BaseCatalog const &catalog)
Save a catalog in the archive.
Definition: OutputArchive.cc:211
lsst::afw::detection::HeavyFootprint::write
void write(OutputArchiveHandle &handle) const override
Write an instance of a Footprint to an output Archive.
Definition: HeavyFootprint.cc:268
lsst::afw::detection::Footprint::readSpanSet
static std::unique_ptr< Footprint > readSpanSet(afw::table::BaseCatalog const &, afw::table::io::InputArchive const &)
Static method used to unpersist the SpanSet member of the Footprint class.
Definition: Footprint.cc:272
lsst::afw
Definition: imageAlgorithm.dox:1
lsst::afw::table::io::InputArchive
A multi-catalog archive object used to load table::io::Persistable objects.
Definition: InputArchive.h:31
lsst::afw::detection::Footprint::getSpans
std::shared_ptr< geom::SpanSet > getSpans() const
Return a shared pointer to the SpanSet.
Definition: Footprint.h:115
lsst::afw::detection::HeavyFootprint::Factory::read
std::shared_ptr< afw::table::io::Persistable > read(InputArchive const &archive, CatalogVector const &catalogs) const override
Construct a new object from the given InputArchive and vector of catalogs.
Definition: HeavyFootprint.cc:291
astshim.keyMap.keyMapContinued.keys
def keys(self)
Definition: keyMapContinued.py:6
CatalogVector.h
val
ImageT val
Definition: CR.cc:146
lsst::afw::detection::HeavyFootprintCtrl::getModifySource
ModifySource getModifySource() const
Definition: FootprintCtrl.h:115
lsst::afw::geom.transform.transformContinued.name
string name
Definition: transformContinued.py:32
lsst::afw::detection::HeavyFootprint::dot
double dot(HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT > const &other) const
Dot product between HeavyFootprints.
Definition: HeavyFootprint.cc:155
mask
afw::table::Key< afw::table::Array< MaskPixelT > > mask
Definition: HeavyFootprint.cc:217
INSTANTIATE
#define INSTANTIATE(TYPE)
Definition: HeavyFootprint.cc:335
std::vector::front
T front(T... args)
lsst::afw::detection::HeavyFootprintCtrl::getVarianceVal
double getVarianceVal() const
Definition: FootprintCtrl.h:122
lsst::afw::table::io::OutputArchiveHandle::makeCatalog
BaseCatalog makeCatalog(Schema const &schema)
Return a new, empty catalog with the given schema.
Definition: OutputArchive.cc:207
lsst::afw::image::MaskedImage::getXY0
lsst::geom::Point2I getXY0() const
Return the image's origin.
Definition: MaskedImage.h:1110
ndarray
Definition: SpanSetFunctorGetters.h:303
lsst::afw::image::MaskedImage
A class to manipulate images, masks, and variance as a single object.
Definition: MaskedImage.h:73
image
afw::table::Key< afw::table::Array< ImagePixelT > > image
Definition: HeavyFootprint.cc:216
lsst::afw::detection::HeavyFootprint::insert
void insert(lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > &mimage) const
Replace all the pixels in the image with the values in the HeavyFootprint.
Definition: HeavyFootprint.cc:119
lsst::afw::detection::HeavyFootprint
A set of pixels in an Image, including those pixels' actual values.
Definition: HeavyFootprint.h:49
x
double x
Definition: ChebyshevBoundedField.cc:277
ndarray::ndFlat
details::FlatNdGetter< T, inA, inB > ndFlat(ndarray::Array< T, inA, inB > const &array)
Marks a ndarray to be interpreted as a 1D vector when applying a functor from a SpanSet.
Definition: SpanSetFunctorGetters.h:318
lsst::afw::detection::Footprint::write
void write(OutputArchiveHandle &handle) const override
Write an instance of a Footprint to an output Archive.
Definition: Footprint.cc:257
lsst::afw::detection::Footprint::readPeaks
static void readPeaks(afw::table::BaseCatalog const &, Footprint &)
Static method used to unpersist the PeakCatalog member of the Footprint class.
Definition: Footprint.cc:296
lsst::afw::table::BaseRecord
Base class for all records.
Definition: BaseRecord.h:31
lsst::afw::image::VariancePixel
float VariancePixel
default type for MaskedImage variance images
Definition: LsstImageTypes.h:35
lsst::jointcal::Iterator
FastFinder::Iterator Iterator
Definition: FastFinder.cc:178
lsst::afw::table::io::CatalogVector
A vector of catalogs used by Persistable.
Definition: CatalogVector.h:29
Footprint.h
lsst::afw::image::ImageBase::getArray
Array getArray()
Definition: ImageBase.h:474
lsst::afw::table::io::PersistableFactory
A base class for factory classes used to reconstruct objects from records.
Definition: Persistable.h:228
std::uint16_t
lsst::afw::detection::HeavyFootprintCtrl::getImageVal
double getImageVal() const
Definition: FootprintCtrl.h:118
lsst::afw::image::MaskPixel
std::int32_t MaskPixel
default type for Masks and MaskedImage Masks
Definition: LsstImageTypes.h:34
result
py::object result
Definition: _schema.cc:429
lsst
A base class for image defects.
Definition: imageAlgorithm.dox:1
lsst::afw::image::MaskedImage::getVariance
VariancePtr getVariance() const
Return a (shared_ptr to) the MaskedImage's variance.
Definition: MaskedImage.h:1079
std::min
T min(T... args)
lsst::afw::detection::HeavyFootprintCtrl::getMaskVal
long getMaskVal() const
Definition: FootprintCtrl.h:120
LsstImageTypes.h
variance
afw::table::Key< afw::table::Array< VariancePixelT > > variance
Definition: HeavyFootprint.cc:218
lsst::afw::detection::HeavyFootprintCtrl::NONE
@ NONE
Definition: FootprintCtrl.h:102
Peak.h
schema
afw::table::Schema schema
Definition: HeavyFootprint.cc:215
lsst::afw::detection::mergeFootprints
std::shared_ptr< Footprint > mergeFootprints(Footprint const &footprint1, Footprint const &footprint2)
Merges two Footprints – appends their peaks, and unions their spans, returning a new Footprint.
Definition: Footprint.cc:327
lsst::afw::detection::HeavyFootprint::Factory
Definition: HeavyFootprint.cc:287
std
STL namespace.
LSST_ARCHIVE_ASSERT
#define LSST_ARCHIVE_ASSERT(EXPR)
An assertion macro used to validate the structure of an InputArchive.
Definition: Persistable.h:48
lsst::geom::Point< int, 2 >
FootprintCtrl.h
lsst::geom::Box2I
An integer coordinate rectangle.
Definition: Box.h:55
Persistable.cc
lsst::afw::detection::HeavyFootprint::HeavyFootprint
HeavyFootprint()=default
Default constructor for HeavyFootprint.
lsst::afw::image::MaskedImage::getImage
ImagePtr getImage() const
Return a (shared_ptr to) the MaskedImage's image.
Definition: MaskedImage.h:1046
InputArchive.h
lsst::afw::detection::mergeHeavyFootprints
std::shared_ptr< HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT > > mergeHeavyFootprints(HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT > const &h1, HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT > const &h2)
Sum the two given HeavyFootprints h1 and h2, returning a HeavyFootprint with the union footprint,...
Definition: HeavyFootprint.cc:132
lsst::afw::table::CatalogT::addNew
std::shared_ptr< RecordT > addNew()
Create a new record, add it to the end of the catalog, and return a pointer to it.
Definition: Catalog.h:485
HeavyFootprint.h
std::max
T max(T... args)
lsst::afw::detection::Footprint
Class to describe the properties of a detected object from an image.
Definition: Footprint.h:63
lsst::afw::image::Image< ImagePixelT >
lsst::afw::detection::HeavyFootprint::Factory::Factory
Factory(std::string const &name)
Definition: HeavyFootprint.cc:289
lsst::afw::image::MaskedImage::getMask
MaskPtr getMask() const
Return a (shared_ptr to) the MaskedImage's mask.
Definition: MaskedImage.h:1058
lsst::afw::table::CatalogT< BaseRecord >
OutputArchive.h
bbox
AmpInfoBoxKey bbox
Definition: Amplifier.cc:117
exceptions.h