Subject: Re: [boost] [GIL] kth_channel_view
From: Christian Henning (chhenning_at_[hidden])
Date: 2010-08-03 17:51:53
Hi Fabien, I know it took a while but I've some time to see what's going on.
> Another interesting possibility is:
> typedef kth_channel_view_type< 0, const rgb8_view_t> KthChannelView;
> typename KthChannelView::type first = KthChannelView::make( const_view(img) );
This doesn't compile on my machine. VC10 is the compiler I'm using.
Stripping the const's helps me:
typedef kth_channel_view_type< 0, rgb8_view_t> KthChannelView;
KthChannelView::type first = KthChannelView::make( view( img ) );
Does it work on your machine?
> It can be a good thing to directly use channel type, like this:
> typedef channel_view_type< red_t, const rgb8_view_t>::type view_t;
> view_t first = channel_view<red_t>( const_view( img ));
Same here. This works:
typedef channel_view_type< red_t, rgb8_view_t>::type view_t;
view_t first_ = channel_view< red_t >( view( img ));
> I have written some code to do that, based on kth_channel_view_type. It's maybe intersting to include in gil.
Thanks! I have added this code to the toolbox extension. See here: