int main(int argc, char* argv[]) { boost::fusion::vector<int, std::string> vec(1, "one"); auto idx0 = dynamic_at_c(vec, 0); auto idx1 = dynamic_at_c(vec, 1); boost::apply_visitor(printer(), idx0); boost::apply_visitor(printer(), idx1); return 0; }
void remove_channel( const RGB_VIEW& src , unsigned int c ) { typedef typename channel_type< RGB_VIEW >::type channel_t; channel_t min_value = channel_traits<channel_t>::min_value(); for( int y = 0; y < src.dimensions().y; ++y ) { typename RGB_VIEW::x_iterator src_it = src.row_begin( y ); for( int x = 0; x < src.dimensions().x; ++x ) { dynamic_at_c( src_it[x], c ) = min_value; } } }
typename channel_traits<channel_t>::const_reference operator[](std::size_t i) const { return dynamic_at_c(*this,i); }
typename detail::channel_pointer_type<HomogeneousView>::type planar_view_get_raw_data(const HomogeneousView& view, int plane_index) { BOOST_STATIC_ASSERT((is_planar<HomogeneousView>::value && view_is_basic<HomogeneousView>::value)); return dynamic_at_c(view.row_begin(0),plane_index); }