#ifdef HAVE_XCF #ifndef ICL_XCF_UTILS_H #define ICL_XCF_UTILS_H #include #include #include #include #include #include #include #include #include namespace icl{ class XCFUtils{ public: static const std::string &createEmptyXMLDoc(); static xmltio::Location createXMLDoc(const ImgBase* image, const std::string& uri, const std::string& bayerPattern = ""); /* static xmltio::Location createXMLDoc(const std::vector images, const std::vector &uris, const std::vector &bayerPatterns); */ static void CTUtoImage(const XCF::CTUPtr ctu, const xmltio::Location& l, ImgBase** ppoImage); static XCF::Binary::TransportUnitPtr ImageToCTU(const ImgBase* image, XCF::Binary::TransportUnitPtr btu); static void createOutputImage(const xmltio::Location& l, ImgBase *poSrc, ImgBase *poOutput, ImgBase **poBayerBuffer, BayerConverter *poBC, Converter *poConv); static void getImage(memory::interface::MemoryPtr &mem, const std::string &xmlDoc, ImgBase **dst, memory::interface::Attachments *reusableAttachment=0, const std::string &xpath="//IMAGE"); static void attachImage(memory::interface::MemoryPtr &mem, xmltio::Location &anchor, const std::string &imageURI, const ImgBase *image, memory::interface::Attachments *reusableAttachment=0, bool insertInsteadOfReplace=true); struct ImageDescription{ std::string uri; Size size; depth imagedepth; int channels; format imageformat; Rect roi; Time time; void show(); }; static ImageDescription getImageDescription(const xmltio::Location &l); static void serialize(const ImgBase *image, std::vector &dst); static void unserialize(const std::vector &src, const ImageDescription &descr, ImgBase **dst); }; } #endif // ICL_XCF_UTILS_H #endif // HAVE_XCF