
https://svn.lrde.epita.fr/svn/oln/branches/cleanup-2008/milena Index: ChangeLog from Nicolas Ballas <ballas@lrde.epita.fr> Update documentation about image properties. * tests/level/median_.cc: Update. * tests/level/Makefile.am: Add the tests in the Makefile.am. * doc/technical/designs/properties/values.txt: Update. * mln/accu/histo.hh: Fix a compile mistake. doc/technical/designs/properties/values.txt | 86 +++++++++++++++++++++++++--- mln/accu/histo.hh | 2 tests/level/Makefile.am | 2 tests/level/median_.cc | 1 4 files changed, 81 insertions(+), 10 deletions(-) Index: tests/level/median_.cc --- tests/level/median_.cc (revision 2445) +++ tests/level/median_.cc (working copy) @@ -44,4 +44,5 @@ level::impl::median_(lena, rect, out); io::pgm::save(out, "out.pgm"); } + } Index: tests/level/Makefile.am --- tests/level/Makefile.am (revision 2445) +++ tests/level/Makefile.am (working copy) @@ -14,6 +14,7 @@ fill \ fill_with_value \ median \ + median_ \ median_dir \ median_fast \ median_hline2d \ @@ -36,6 +37,7 @@ fill_SOURCES = fill.cc fill_with_value_SOURCES = fill_with_value.cc median_SOURCES = median.cc +median__SOURCES = median_.cc median_dir_SOURCES = median_dir.cc median_fast_SOURCES = median_fast.cc median_hline2d_SOURCES = median_hline2d.cc Index: doc/technical/designs/properties/values.txt --- doc/technical/designs/properties/values.txt (revision 2445) +++ doc/technical/designs/properties/values.txt (working copy) @@ -14,8 +14,21 @@ | + -- direct | + + -- semi_direct + | + -- computed +=> Definition: This property indicates if the image value are stored in memory. + +- direct: Images store all their values in memory, we can take a reference +of the values. + +- semi-direct: Images store partially their value in memory, we can't take +a reference on them. For instance, images that compute a value at the first +access and store it in a buffer to speed up the next access, are semi-direct. + +- computed: All the image values are computed on the fly, at each access. + ** value_storage:/any/ | @@ -27,9 +40,54 @@ | | | + -- piecewise | - + -- disrupted + + -- none -=> Methods related: + +*** Definition: + Indicate how the value are stored in memory + +- singleton: The image has only one values, this values is store in memory. + 01 + -- +0 |ee| values in memory +1 |ee| ==========> [e] + -- + + + +- one_block: All the image values are stored in a buffer in memory. + + 01 + -- +0 |ef| values in memory +1 |ge| ==========> [e, f, g, e] + -- + +- piece_wise: The values are stored in several memory locations. + +example 1) RLE Image + + 013456 + ------ +0 |ee | values in memory +1 | fff | ==========> [e], [f], [g] +3 | ggg| +4 | | + ------ + +example 2) Sparse Image + + 013456 + ------ +0 |ef | values in memory +1 | faaff| ==========> [e, f], [f, a, a, f, f], [l, l, o, g, g] +3 | llogg| +4 | | + ------ + +- none: We don't have any information about the value storage. + +*** Methods related: value_storage == singleton => ima.value() -> return the image value @@ -67,6 +125,23 @@ method of value_wise property value + cell_wise property value +** site_wise_io:/any/ + | + + -- read_only + | + + -- read_write + +=> Definition: + Indicates the io permission for the site access. + It replaces the property value_access. + +- read_only: We can only read the image values. +- read_write: We can read and write the image values. + + **Note**: RLE images are read only for the access sites. + +FIXME: Do we need a value_wise_io + * Impact on the fill and paste algorithms @@ -158,10 +233,3 @@ r : (5,2), (4, 2), (6, 2) g : (5,4), (4, 4), (6, 3) b : (2,2), (1, 2), (3, 2) - --differentiate the localization of an image and its storage method. - -** Image related with 'special' values access - -*** Run Images (sparse, value_encoded) -*** Pkey Images Index: mln/accu/histo.hh --- mln/accu/histo.hh (revision 2445) +++ mln/accu/histo.hh (working copy) @@ -199,7 +199,7 @@ inline std::ostream& operator<<(std::ostream& ostr, const histo<V>& h) { - mln_viter(V) v(h.vset()); + mln_viter(value::set<V>) v(h.vset()); for_all(v) if (h(v) != 0) ostr << v << ':' << h(v) << ' ';