Kornel Benko wrote: > --- snip --- > I tried, with "./configure --enable-image-cache=no", but it is not compilable
What a bummer! This could have been such a simple work-around. Anyway, I have added the missing template specializations in the following patch (which hopefully does not get mangled by the news software). Enblend compiles again when configured with "--enable-image-cache=no" and produces the same output as with enabled image cache after the patch has been applied (at least for me :-) HTH. /Chris --- a/include/vigra/cachedfileimage.hxx Mon Sep 29 09:38:54 2008 +0200 +++ b/include/vigra/cachedfileimage.hxx Mon Sep 29 15:52:50 2008 +0200 @@ -46,6 +46,7 @@ #include <boost/pool/pool.hpp> #include <vigra/error.hxx> +#include <vigra/imageiterator.hxx> #include <vigra/metaprogramming.hxx> #include <vigra/utilities.hxx> @@ -2137,6 +2138,66 @@ return std::make_pair(ConstStridedCachedFileImageIterator<PixelType>(image.first, xstride, ystride), image.second); }; + +//////////////////////////////////////////////////////////////////////// + + +template <typename PixelType, typename ImgAccessor, typename ImgIterator> +vigra::triple<StridedImageIterator<PixelType>, + StridedImageIterator<PixelType>, + ImgAccessor> +stride(int xstride, int ystride, + vigra::triple<BasicImageIterator<PixelType, ImgIterator>, + BasicImageIterator<PixelType, ImgIterator>, + ImgAccessor> image) { + Diff2D diff = image.second - image.first; + if (diff.x % xstride != 0) {diff.x += xstride - diff.x % xstride;} + if (diff.y % ystride != 0) {diff.y += ystride - diff.y % ystride;} + return vigra::make_triple( + StridedImageIterator<PixelType>(image.first, xstride, ystride), + StridedImageIterator<PixelType>(image.first + diff, xstride, ystride), + image.third); +} + + +template <typename PixelType, typename ImgAccessor, typename ImgIterator> +vigra::triple<ConstStridedImageIterator<PixelType>, + ConstStridedImageIterator<PixelType>, + ImgAccessor> +stride(int xstride, int ystride, + vigra::triple<ConstBasicImageIterator<PixelType, ImgIterator>, + ConstBasicImageIterator<PixelType, ImgIterator>, + ImgAccessor> image) { + Diff2D diff = image.second - image.first; + if (diff.x % xstride != 0) {diff.x += xstride - diff.x % xstride;} + if (diff.y % ystride != 0) {diff.y += ystride - diff.y % ystride;} + return vigra::make_triple( + ConstStridedImageIterator<PixelType>(image.first, xstride, ystride), + ConstStridedImageIterator<PixelType>(image.first + diff, xstride, ystride), + image.third); +} + + +template <typename PixelType, typename ImgAccessor, typename ImgIterator> +std::pair<StridedImageIterator<PixelType>, ImgAccessor> +stride(int xstride, int ystride, + std::pair<BasicImageIterator<PixelType, ImgIterator>, ImgAccessor> image) { + return std::make_pair( + StridedImageIterator<PixelType>(image.first, xstride, ystride), + image.second); +}; + + +template <typename PixelType, typename ImgAccessor, typename ImgIterator> +std::pair<ConstStridedImageIterator<PixelType>, ImgAccessor> +stride(int xstride, int ystride, + std::pair<ConstBasicImageIterator<PixelType, ImgIterator>, ImgAccessor> image) { + return std::make_pair( + ConstStridedImageIterator<PixelType>(image.first, xstride, ystride), + image.second); +}; + + } // namespace vigra #endif /* VIGRA_EXT_CACHEDFILEIMAGE_HXX */ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "hugin and other free panoramic software" group. A list of frequently asked questions is available at: http://wiki.panotools.org/Hugin_FAQ To post to this group, send email to hugin-ptx@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/hugin-ptx -~----------~----~----~----~------~----~------~--~---