1 #ifndef vil_pyramid_image_view_hxx_ 2 #define vil_pyramid_image_view_hxx_ 10 unsigned nj,
unsigned n_planes)
11 : nlevels_(levels), max_levels_(256)
27 : nlevels_(levels), max_levels_(256)
39 unsigned i=image->ni()/2, j=image->nj()/2;
58 std::vector<double>
const& scales)
60 nlevels_=(
unsigned int)(images.size());
61 images_.resize(nlevels_);
62 scales_.resize(nlevels_);
63 for (
unsigned l=0; l<nlevels_; l++) {
64 images_[l] = images[l];
65 scales_[l] = scales[l];
72 this->images_.resize(rhs.
nlevels());
83 std::vector<vil_image_view_base_sptr>::iterator image_iter=images_.begin();
84 std::vector<double>::iterator scale_iter= scales_.begin();
85 while (i<nlevels_ && scale<scales_[i]) {
92 images_.insert(image_iter,image);
93 scales_.insert(scale_iter,scale);
101 this->images_.resize(rhs.
nlevels());
103 this->nlevels_ = rhs.
nlevels();
113 unsigned ni=image_in.
ni();
114 unsigned nj=image_in.
nj();
119 image_out = half_size;
123 #define VIL_PYRAMID_IMAGE_VIEW_INSTANTIATE(T) \ 124 template class vil_pyramid_image_view<T > std::vector< vil_image_view_base_sptr > images_
the list of image vieas.
void add_view(vil_image_view_base_sptr &image, double scale)
adds a view to the list of view sorted in the right place based on the scale in descending order.
Concrete view of image data of type T held in memory.
void scale_down(const vil_image_view< T > &, vil_image_view_base_sptr &image_out)
generates an image half the size of the given image and takes the averages.
Representation of a pyramid hierarchy of image views.
double scale(unsigned level)
unsigned max_levels() const
Sample grid of points with bilinear interpolation in one image and place in another.
unsigned nlevels() const
Number of pyramid levels.
bool limit_reached(unsigned i, unsigned j)
returns true if the image size is < 4x4 or the max_level is reached.
std::vector< double > scales_
the associated scales of images, scales_.size() is always equals to images_.size().
unsigned ni() const
Width.
unsigned nj() const
Height.
A base class reference-counting view of some image data.
vil_pyramid_image_view()
Default constructor, creates an empty list of pyramid.
unsigned nplanes() const
Number of planes.
void vil_resample_bilin(const vil_image_view< sType > &src_image, vil_image_view< dType > &dest_image, double x0, double y0, double dx1, double dy1, double dx2, double dy2, int n1, int n2)
Sample grid of points in one image and place in another, using bilinear interpolation.
T * ptr() const
These methods all return the raw/dumb pointer.
const vil_pyramid_image_view< T > & operator=(const vil_pyramid_image_view< T > &rhs)