DriveHQ Start Menu
Cloud Drive Mapping
Folder Sync
Cloud Backup
True Drop Box
FTP/SFTP Hosting
Group Account
DriveHQ Start Menu
Online File Server
My Storage
|
Manage Shares
|
Publishes
|
Drop Boxes
|
Group Account
WebDAV Drive Mapping
Cloud Drive Home
|
WebDAV Guide
|
Drive Mapping Tool
|
Drive Mapping URL
Complete Data Backup
Backup Guide
|
Online Backup Tool
|
Cloud-to-Cloud Backup
FTP, Email & Web Service
FTP Home
|
FTP Hosting FAQ
|
Email Hosting
|
EmailManager
|
Web Hosting
Help & Resources
About
|
Enterprise Service
|
Partnership
|
Comparisons
|
Support
Quick Links
Security and Privacy
Download Software
Service Manual
Use Cases
Group Account
Online Help
Blog
Contact
Cloud Surveillance
Sign Up
Login
Features
Business Features
Online File Server
FTP Hosting
Cloud Drive Mapping
Cloud File Backup
Email Backup & Hosting
Cloud File Sharing
Folder Synchronization
Group Management
True Drop Box
Full-text Search
AD Integration/SSO
Mobile Access
IP Camera & DVR Solution
More...
Personal Features
Personal Cloud Drive
Backup All Devices
Mobile APPs
Personal Web Hosting
Sub-Account (for Kids)
Home/PC/Kids Monitoring
More...
Software
DriveHQ Drive Mapping Tool
DriveHQ FileManager
DriveHQ Online Backup
DriveHQ Mobile Apps
Pricing
Business Plans & Pricing
Personal Plans & Pricing
Price Comparison with Others
Feature Comparison with Others
Install Mobile App
Sign up
Creating account...
Invalid character in username! Only 0-9, a-z, A-Z, _, -, . allowed.
Username is required!
Invalid email address!
E-mail is required!
Password is required!
Password is invalid!
Password and confirmation do not match.
Confirm password is required!
I accept
Membership Agreement
Please read the Membership Agreement and check "I accept"!
Free Quick Sign-up
Sign-up Page
Log in
Signing in...
Username or e-mail address is required!
Password is required!
Keep me logged in
Quick Login
Forgot Password
Up
Upload
Download
Share
Publish
New Folder
New File
Copy
Cut
Delete
Paste
Rate
Upgrade
Rotate
Effect
Edit
Slide
History
/* Copyright 2005-2007 Adobe Systems Incorporated Use, modification and distribution are subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt). See http://opensource.adobe.com/gil for most recent version including documentation. */ /*************************************************************************************************/ #ifndef GIL_VIRTUAL_LOCATOR_HPP #define GIL_VIRTUAL_LOCATOR_HPP //////////////////////////////////////////////////////////////////////////////////////// /// \file /// \brief Locator for virtual image views /// \author Lubomir Bourdev and Hailin Jin \n /// Adobe Systems Incorporated /// \date 2005-2007 \n Last updated on February 12, 2007 /// //////////////////////////////////////////////////////////////////////////////////////// #include
#include "position_iterator.hpp" namespace boost { namespace gil { /// \brief A 2D locator over a virtual image. Upon dereferencing, invokes a given function object passing it its coordinates. Models: PixelLocatorConcept, HasDynamicXStepTypeConcept, HasDynamicYStepTypeConcept, HasTransposedTypeConcept /// \ingroup PixelLocatorModel PixelBasedModel /// template
// A function object that given a point returns a reference. Models PixelDereferenceAdaptorConcept class virtual_2d_locator : public pixel_2d_locator_base
, position_iterator
, position_iterator
> { typedef virtual_2d_locator
this_t; public: typedef pixel_2d_locator_base
, position_iterator
, position_iterator
> parent_t; typedef virtual_2d_locator
const_t; typedef Deref deref_fn_t; typedef typename parent_t::point_t point_t; typedef typename parent_t::coord_t coord_t; typedef typename parent_t::x_coord_t x_coord_t; typedef typename parent_t::y_coord_t y_coord_t; typedef typename parent_t::x_iterator x_iterator; typedef typename parent_t::y_iterator y_iterator; template
struct add_deref { typedef virtual_2d_locator
,IsTransposed > type; static type make(const virtual_2d_locator
& loc, const NewDeref& nderef) { return type(loc.pos(), loc.step(), deref_compose
(nderef,loc.deref_fn())); } }; virtual_2d_locator(const point_t& p=point_t(0,0), const point_t& step=point_t(1,1), const deref_fn_t& d=deref_fn_t()) : _p(p,step,d) {} template
virtual_2d_locator(const virtual_2d_locator
& loc, coord_t y_step) : _p(loc.pos(), point_t(loc.step().x,loc.step().y*y_step), loc.deref_fn()) {} template
virtual_2d_locator(const virtual_2d_locator
& loc, coord_t x_step, coord_t y_step, bool transpose=false) : _p(loc.pos(), transpose ? point_t(loc.step().x*y_step,loc.step().y*x_step) : point_t(loc.step().x*x_step,loc.step().y*y_step), loc.deref_fn()) { assert(transpose==(IsTransposed!=TR));} template
virtual_2d_locator(const virtual_2d_locator
& pl) : _p(pl._p) {} virtual_2d_locator(const virtual_2d_locator& pl) : _p(pl._p) {} bool operator==(const this_t& p) const { return _p==p._p; } x_iterator& x() { return *gil_reinterpret_cast
(this); } y_iterator& y() { return _p; } x_iterator const& x() const { return *gil_reinterpret_cast_c
(this); } y_iterator const& y() const { return _p; } // Returns the y distance between two x_iterators given the difference of their x positions y_coord_t y_distance_to(const this_t& it2, x_coord_t xDiff) const { return (it2.pos()[1-IsTransposed] - pos()[1-IsTransposed])/step()[1-IsTransposed]; } bool is_1d_traversable(x_coord_t) const { return false; } // is there no gap at the end of each row? I.e. can we use x_iterator to visit every pixel instead of nested loops? // Methods specific for virtual 2D locator const point_t& pos() const { return _p.pos(); } const point_t& step() const { return _p.step(); } const deref_fn_t& deref_fn() const { return _p.deref_fn(); } private: template
friend class virtual_2d_locator; y_iterator _p; // contains the current position, the step and the dereference object }; ///////////////////////////// // PixelBasedConcept ///////////////////////////// template
struct channel_type
> : public channel_type
::parent_t> { }; template
struct color_space_type
> : public color_space_type
::parent_t> { }; template
struct channel_mapping_type
> : public channel_mapping_type
::parent_t> { }; template
struct is_planar
> : public is_planar
::parent_t> { }; ///////////////////////////// // HasDynamicXStepTypeConcept ///////////////////////////// template
struct dynamic_x_step_type
> { typedef virtual_2d_locator
type; }; ///////////////////////////// // HasDynamicYStepTypeConcept ///////////////////////////// template
struct dynamic_y_step_type
> { typedef virtual_2d_locator
type; }; ///////////////////////////// // HasTransposedTypeConcept ///////////////////////////// template
struct transposed_type
> { typedef virtual_2d_locator
type; }; } } // namespace boost::gil #endif
virtual_locator.hpp
Page URL
File URL
Prev
34/34 Next
Download
( 6 KB )
Note: The DriveHQ service banners will NOT be displayed if the file owner is a paid member.
Comments
Total ratings:
0
Average rating:
Not Rated
Would you like to comment?
Join DriveHQ
for a free account, or
Logon
if you are already a member.