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_DYNAMICIMAGE_ANY_IMAGEVIEW_HPP #define GIL_DYNAMICIMAGE_ANY_IMAGEVIEW_HPP //////////////////////////////////////////////////////////////////////////////////////// /// \file /// \brief Support for run-time instantiated image view /// \author Lubomir Bourdev and Hailin Jin \n /// Adobe Systems Incorporated /// /// //////////////////////////////////////////////////////////////////////////////////////// #include "variant.hpp" #include "../../image_view.hpp" #include "../../image.hpp" namespace boost { namespace gil { namespace detail { template
struct get_const_t { typedef typename View::const_t type; }; template
struct views_get_const_t : public mpl::transform
> {}; } template
struct dynamic_xy_step_type; template
struct dynamic_xy_step_transposed_type; namespace detail { struct any_type_get_num_channels { // works for both image_view and image typedef int result_type; template
result_type operator()(const T& v) const { return num_channels
::value; } }; struct any_type_get_dimensions { // works for both image_view and image typedef point2
result_type; template
result_type operator()(const T& v) const { return v.dimensions(); } }; } //////////////////////////////////////////////////////////////////////////////////////// /// CLASS any_image_view /// /// \ingroup ImageViewModel /// \brief Represents a run-time specified image view. Models HasDynamicXStepTypeConcept, HasDynamicYStepTypeConcept, Note that this class does NOT model ImageViewConcept /// /// Represents a view whose type (color space, layout, planar/interleaved organization, etc) can be specified at run time. /// It is the runtime equivalent of \p image_view. /// Some of the requirements of ImageViewConcept, such as the \p value_type typedef cannot be fulfilled, since the language does not allow runtime type specification. /// Other requirements, such as access to the pixels, would be inefficient to provide. Thus \p any_image_view does not fully model ImageViewConcept. /// However, many algorithms provide overloads taking runtime specified views and thus in many cases \p any_image_view can be used in places taking a view. /// /// To perform an algorithm on any_image_view, put the algorithm in a function object and invoke it by calling \p apply_operation(runtime_view, algorithm_fn); //////////////////////////////////////////////////////////////////////////////////////// template
class any_image_view : public variant
{ typedef variant
parent_t; public: typedef any_image_view
::type> const_t; typedef std::ptrdiff_t x_coord_t; typedef std::ptrdiff_t y_coord_t; typedef point2
point_t; any_image_view() : parent_t() {} template
explicit any_image_view(const T& obj) : parent_t(obj) {} any_image_view(const any_image_view& v) : parent_t((const parent_t&)v) {} template
any_image_view& operator=(const T& obj) { parent_t::operator=(obj); return *this; } any_image_view& operator=(const any_image_view& v) { parent_t::operator=((const parent_t&)v); return *this;} std::size_t num_channels() const { return apply_operation(*this, detail::any_type_get_num_channels()); } point_t dimensions() const { return apply_operation(*this, detail::any_type_get_dimensions()); } x_coord_t width() const { return dimensions().x; } y_coord_t height() const { return dimensions().y; } }; ///////////////////////////// // HasDynamicXStepTypeConcept ///////////////////////////// template
struct dynamic_x_step_type
> { typedef any_image_view
>::type> type; }; ///////////////////////////// // HasDynamicYStepTypeConcept ///////////////////////////// template
struct dynamic_y_step_type
> { typedef any_image_view
>::type> type; }; template
struct dynamic_xy_step_type
> { typedef any_image_view
>::type> type; }; template
struct dynamic_xy_step_transposed_type
> { typedef any_image_view
>::type> type; }; } } // namespace boost::gil #endif
any_image_view.hpp
Page URL
File URL
Prev
3/10
Next
Download
( 5 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.