| LSSTApplications
    20.0.0
    LSSTDataManagementBasePackage | 
 
 
 
Go to the documentation of this file.
   23 #ifndef LSST_SPHGEOM_PIXELFINDER_H_ 
   24 #define LSST_SPHGEOM_PIXELFINDER_H_ 
   71                 RegionType 
const & region,
 
   78         _maxRanges{maxRanges == 0 ? maxRanges - 1 : maxRanges}
 
   93         if ((r & DISJOINT) != 0) {
 
   97         if ((r & WITHIN) != 0) {
 
  100             _insert(index, level);
 
  102         } 
else if (level == _level) {
 
  105                 _insert(index, level);
 
  109         static_cast<Derived *
>(
this)->subdivide(
pixel, index, level);
 
  114     RegionType 
const * _region;
 
  116     int const _desiredLevel;
 
  117     size_t const _maxRanges;
 
  119     void _insert(uint64_t index, 
int level) {
 
  120         int shift = 2 * (_desiredLevel - level);
 
  121         _ranges->
insert(index << shift, (index + 1) << shift);
 
  122         while (_ranges->
size() > _maxRanges) {
 
  147     template <
typename, 
bool> 
class Finder,
 
  152     Circle const * c = 
nullptr;
 
  154     Box const * 
b = 
nullptr;
 
  155     if ((c = 
dynamic_cast<Circle const *
>(&r))) {
 
  156         Finder<Circle, InteriorOnly> find(s, *c, level, maxRanges);
 
  158     } 
else if ((e = 
dynamic_cast<Ellipse const *
>(&r))) {
 
  159         Finder<Circle, InteriorOnly> find(
 
  162     } 
else if ((
b = 
dynamic_cast<Box const *
>(&r))) {
 
  163         Finder<Box, InteriorOnly> find(s, *
b, level, maxRanges);
 
  166         Finder<ConvexPolygon, InteriorOnly> find(
 
  167             s, 
dynamic_cast<ConvexPolygon const &
>(r), level, maxRanges);
 
  175 #endif // LSST_SPHGEOM_PIXELFINDER_H_ 
  
Region is a minimal interface for 2-dimensional regions on the unit sphere.
Box represents a rectangle in spherical coordinate space that contains its boundary.
RangeSet & complement()
complement replaces this set S with U ∖ S, where U is the universe of range sets, [0,...
void visit(UnitVector3d const *pixel, uint64_t index, int level)
UnitVector3d is a unit vector in ℝ³ with components stored in double precision.
ConvexPolygon is a closed convex polygon on the unit sphere.
Ellipse is an elliptical region on the sphere.
This file contains the meat of the ConvexPolygon implementation.
Relationship relate(VertexIterator const begin, VertexIterator const end, Box const &b)
table::PointKey< int > pixel
A base class for image defects.
PixelFinder(RangeSet &ranges, RegionType const ®ion, int level, size_t maxRanges)
size_t size() const
size returns the number of ranges in this set.
This file provides a type for representing integer sets.
A RangeSet is a set of unsigned 64 bit integers.
Circle getBoundingCircle() const override
getBoundingCircle returns a bounding-circle for this region.
Circle is a circular region on the unit sphere that contains its boundary.
RangeSet & simplify(uint32_t n)
simplify simplifies this range set by "coarsening" its ranges.
RangeSet findPixels(Region const &r, size_t maxRanges, int level)