00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include <mln/core/image/image2d.hh>
00027
00028 #include <mln/data/paste_without_localization.hh>
00029 #include <mln/data/compare.hh>
00030
00031 #include <mln/debug/iota.hh>
00032 #include <mln/debug/println.hh>
00033
00034
00035 int main()
00036 {
00037 using namespace mln;
00038
00039 box2d b(point2d(1,2), point2d(6,8));
00040 image2d<unsigned> ima(b, 3);
00041 debug::iota(ima);
00042
00043 image2d<unsigned> tmp(6, 7, 3);
00044 image2d<unsigned> ref(6, 7, 3);
00045 debug::iota(ref);
00046
00047
00048
00049 {
00050 data::impl::paste_without_localization_lines(ima, tmp);
00051 mln_assertion(tmp == ref);
00052 }
00053
00054
00055
00056 {
00057 data::impl::paste_without_localization_fastest(ima, tmp);
00058 mln_assertion(tmp == ref);
00059 }
00060
00061
00062 {
00063 data::impl::paste_without_localization_fast(ima, tmp);
00064 mln_assertion(tmp == ref);
00065 }
00066
00067
00068 {
00069 data::impl::generic::paste_without_localization(ima, tmp);
00070 mln_assertion(tmp == ref);
00071 }
00072
00073
00074
00075 {
00076 data::paste_without_localization(ima, tmp);
00077 mln_assertion(tmp == ref);
00078 }
00079
00080
00081 }