Seems more generic to have  >> be templated by any model of CImage ? 
You could check the type using boost concept and get the Domain/Value from model inner type. 
what do you think?