I cant find the correct way to extract the pixel or channel type from an image view. I'm looking to define pod_t below to be 'unsigned char' in the case of gray8_view_t. There is no simple ViewType::pixel_t. What is the proper definition of this type in function PixelFoo?
template<class ViewType>
void PixelFoo(ViewType v)
{
typedef typename ViewType::x_iterator::value_type::channel_t pod_t;
pod_t maxVal = channel_traits<pod_t>::max_value();
pod_t podVal = v(0, 0); //expect error with emptyView
}
void PixelBar()
{
gray8_view_t emptyView;
PixelFoo(emptyView);
}