Hi Mark,
Luminosity is a single channel, and single-channel images in GIL are specified using a gray_layout_t layout. It doesn't make sense to keep the layout of the destination view; in fact you should require that the destination view is a single channel view (i.e. has a gray_layout_t layout)
Lubomir
On Nov 16, 2011, at 2:35 PM, Sapp, Mark wrote:
Hi All,
The following code is straight out of the tutorial about making function generic. Can anyone suggest how I might determine the layout of DstView here so that I can build an image of the same layout? In this example they hardcode gray_layout_t and I’m not seeing any metafunctions that return the layout.
template
void x_luminosity_gradient(const SrcView& src, const DstView& dst) {
typedef typename channel_type<DstView>::type d_channel_t;
typedef typename channel_convert_to_unsigned::type channel_t;
typedef typename image_type::type gray_image_t;
typedef typename gray_image_t::value_type gray_pixel_t;
gray_image_t ccv_image(src.dimensions());
copy_and_convert_pixels(src, view(ccv_image));
x_gradient(const_view(ccv_image), dst);
}
Thanks,
Mark
Notice: This e-mail is intended solely for use of the individual or entity to which it is
addressed and may contain information that is proprietary, privileged, company confidential
and/or exempt from disclosure under applicable law. If the reader is not the intended
recipient or agent responsible for delivering the message to the intended recipient, you are
hereby notified that any dissemination, distribution or copying of this communication is
strictly prohibited. If this communication has been transmitted from a U.S. location it may
also contain data subject to the International Traffic in Arms Regulations or U.S. Export
Administration Regulations and cannot be disseminated, distributed or copied to foreign
nationals, residing in the U.S. or abroad, without the prior approval of the U.S. Department
of State or appropriate export licensing authority. If you have received this communication
in error, please notify the sender by reply e-mail or collect telephone call and delete or
destroy all copies of this e-mail message, any physical copies made of this e-mail message
and/or any file attachment(s).
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.orgmailto:Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users