27 #ifndef MLN_MAKE_IMAGE_HH
28 # define MLN_MAKE_IMAGE_HH
37 # include <mln/core/image/image1d.hh>
38 # include <mln/core/image/image2d.hh>
39 # include <mln/core/image/image3d.hh>
40 # include <mln/opt/at.hh>
56 template <
typename V,
unsigned L>
66 template <
typename V,
unsigned R,
unsigned C>
76 template <
typename V,
unsigned S,
unsigned R,
unsigned C>
81 # ifndef MLN_INCLUDE_ONLY
83 template <
typename V,
unsigned L>
87 mlc_bool(L != 0)::check();
91 tmp(
point1d(ind)) = values[ind];
95 template <
typename V,
unsigned R,
unsigned C>
97 image(V (&values)[R][C])
99 mlc_bool(R != 0 && C != 0)::check();
103 ncols = static_cast<def::coord>(C);
106 opt::at(tmp, row, col) = values[row][col];
110 template <
typename V,
unsigned S,
unsigned R,
unsigned C>
112 image(V (&values)[S][R][C])
114 mlc_bool(S != 0 && R != 0 && C != 0)::check();
118 nrows = static_cast<def::coord>(R),
123 opt::at(tmp, sli, row, col) = values[sli][row][col];
127 # endif // ! MLN_INCLUDE_ONLY
134 #endif // ! MLN_MAKE_IMAGE_HH