Boost logo

Boost :

Subject: Re: [boost] [GIL] locator and cached_location_t
From: Lubomir Bourdev (lbourdev_at_[hidden])
Date: 2010-12-14 13:36:03


Hi Fabien,

To answer both of your questions, I don't see any particular obstacle to adding those APIs to image_view, but we didn't add them because that will be a lot of methods for something that is advanced and not frequently used (cached_location). Not to mention it doesn't make sense to use for all image views, but only "memory-based" ones, as opposed to virtual ones, for example.

Lubomir

On Dec 12, 2010, at 11:37 AM, fabien wrote:

I have 2 questions:
1) Why can't we directly get a cached_location from a view (without
using a locator) ? We have all informations in the view to build it,
isn't it ?
typename SLocator::cached_location_t LT( srcView.cache_location(-1,-1) );

2) Is there a good reason to not allows to get a locator from another
locator using cached_location ?

DLocator func( const SLocator& src )
{
// we can do this
return src.xy_at(-1, -1); // return a new locator

// we can't do the same thing with cached_location
return src.xy_at(LT); //< it can be interesting to do this !
}

Same remark to get an x_iterator from a locator:
src.x_at(-1, -1); //< we can do this
src.x_at(LT); //< we can't do this

Best regards,
Fabien Castan
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk