cio.hpp

00001 // This file is part of the imaging2 class library.
00002 //
00003 // University of Innsbruck, Infmath Imaging, 2009.
00004 // http://infmath.uibk.ac.at
00005 //
00006 // All rights reserved.
00007 
00008 
00009 #ifndef IMAGE_CIO_H
00010 #define IMAGE_CIO_H
00011 
00012 
00013 #include <image/ImageInterface.hpp>
00014 #include <image/GrayValue.hpp>
00015 #include <image/Color.hpp>
00016 
00017 
00018 namespace imaging
00019 {
00023   template <size_t N, class DATA_t>
00024   std::ostream & operator<<(std::ostream & out, const ImageInterface<N, DATA_t> & image)
00025   {
00026     out << "Image: " << image.size()(0);
00027     
00028     for(size_t i = 1; i < ImageInterface<N, DATA_t>::dimension; ++i)
00029       out << " x " << image.size()(i);
00030       
00031     out << std::endl;
00032       
00033     return out;
00034   }
00035  
00039   std::ostream & operator<<(std::ostream & out, const GrayValue value);
00040   
00044   std::ostream & operator<<(std::ostream & out, const Color & value);
00045 
00049   std::istream & operator>>(std::istream & in, GrayValue & value);
00050   
00054   std::istream & operator>>(std::istream & in, Color & value);
00055 }
00056 
00057 
00058 
00059 #endif

Generated on Tue Feb 10 10:01:29 2009 for imaging2 by  doxygen 1.5.5