Commit a7ca2c92 authored by Nicolas Ballas's avatar Nicolas Ballas
Browse files

Replace some remaining .at by opt::at.

	* sandbox/aroumougame/skeleton/sedt.hh,
	* sandbox/dalila/demat.hh,
	* sandbox/abraham/mln/transform/fft.hh,
	* sandbox/ballas/color/min_tree_volume_filter.cc,
	* sandbox/ballas/color/reference.cc,
	* sandbox/ballas/color/min_tree_area_filter.cc,
	* sandbox/ballas/color/min_tree_height_filter.cc,
	* sandbox/ballas/color/min_tree_color.cc,
	* sandbox/ballas/color/reference2.cc,
	* sandbox/ballas/color/src/graph.hh,
	* sandbox/ballas/color/min_tree_color_v2.cc,
	* sandbox/geraud/wst_edge.cc,
	* sandbox/geraud/fllt.svg.6.cc,
	* sandbox/geraud/fllt/fllt.svg.2.cc,
	* sandbox/geraud/fllt/fllt.svg.3.cc,
	* sandbox/geraud/fllt/fllt.svg.4.cc,
	* sandbox/geraud/fllt/fllt.svg.5.cc,
	* sandbox/geraud/fllt/fllt.svg.6.cc: Update.


git-svn-id: https://svn.lrde.epita.fr/svn/oln/trunk@3065 4aad255d-cdde-0310-9447-f3009e2ae8c0
parent b7ae02c2
2008-12-18 Nicolas Ballas <ballas@lrde.epita.fr>
Replace some remaining .at by opt::at.
* sandbox/aroumougame/skeleton/sedt.hh,
* sandbox/dalila/demat.hh,
* sandbox/abraham/mln/transform/fft.hh,
* sandbox/ballas/color/min_tree_volume_filter.cc,
* sandbox/ballas/color/reference.cc,
* sandbox/ballas/color/min_tree_area_filter.cc,
* sandbox/ballas/color/min_tree_height_filter.cc,
* sandbox/ballas/color/min_tree_color.cc,
* sandbox/ballas/color/reference2.cc,
* sandbox/ballas/color/src/graph.hh,
* sandbox/ballas/color/min_tree_color_v2.cc,
* sandbox/geraud/wst_edge.cc,
* sandbox/geraud/fllt.svg.6.cc,
* sandbox/geraud/fllt/fllt.svg.2.cc,
* sandbox/geraud/fllt/fllt.svg.3.cc,
* sandbox/geraud/fllt/fllt.svg.4.cc,
* sandbox/geraud/fllt/fllt.svg.5.cc,
* sandbox/geraud/fllt/fllt.svg.6.cc: Update.
2008-12-18 Nicolas Ballas <ballas@lrde.epita.fr>
 
Replace calls of the method .at by the function opt::at.
......
......@@ -442,7 +442,7 @@ namespace mln {
}
for (unsigned row = 0; row < this->trans_im.nrows(); ++row)
for (unsigned col = this->trans_im.ncols() - 1; col > this->trans_im.ncols() / 2; --col)
this->trans_im.at(row, col) = opt::at(this->trans_im, this->trans_im.nrows() - row - 1,
at(this->trans_im, row, col) = opt::at(this->trans_im, this->trans_im.nrows() - row - 1,
this->trans_im.ncols() - col - 1);
return this->trans_im;
}
......
......@@ -92,7 +92,7 @@
}
else
{
v=1+(j*j-s[q]*s[q]+g.at(j,i)*g.at(j,i)-g.at(s[q],i)*opt::at(g, s[q],i))/(2*(j-s[q]));
v=1+(j*j-s[q]*s[q]+opt::at(g,j,i)*opt::at(g,j,i)-opt::at(g,s[q],i)*opt::at(g, s[q],i))/(2*(j-s[q]));
if(v<h)
{
q++;
......@@ -104,7 +104,7 @@
for(int j= h-1; j>=0; j--)
{
dt.at(j,i)= opt::at(g, s[q],i)*opt::at(g, s[q],i)+(j-s[q])*(j-s[q]);
opt::at(dt,j,i)= opt::at(g, s[q],i)*opt::at(g, s[q],i)+(j-s[q])*(j-s[q]);
if(j==t[q])
q--;
}
......@@ -184,7 +184,7 @@
{
for( int j=0; j<L; j++)
{
dt.at(i,j) = opt::at(DTg, i,j);
opt::at(dt,i,j) = opt::at(DTg, i,j);
}
}
return dt;
......
......@@ -364,7 +364,7 @@ image2cells(const mln::image2d<T>& input)
2 * input.ncols() - 1);
for (unsigned row = 0; row < input.nrows(); ++row)
for (unsigned col = 0; col < input.ncols(); ++col)
output.at(2 * row, 2 * col) = mln::opt::at(input, row, col);
mln::opt::at(output, 2 * row, 2 * col) = mln::opt::at(input, row, col);
return output;
}
......@@ -377,7 +377,7 @@ cells2image(const mln::image2d<T>& input)
(input.ncols() + 1) / 2);
for (unsigned row = 0; row < input.nrows(); row += 2)
for (unsigned col = 0; col < input.ncols(); col += 2)
output.at(row / 2, col / 2) = mln::opt::at(input, row, col);
mln::opt::at(output, row / 2, col / 2) = mln::opt::at(input, row, col);
return output;
}
......
......@@ -381,7 +381,8 @@ image2cells(const mln::image2d<T>& input)
2 * input.ncols() - 1);
for (unsigned row = 0; row < input.nrows(); ++row)
for (unsigned col = 0; col < input.ncols(); ++col)
output.at(2 * row, 2 * col) = mln::opt::at(input, row, col);
mln::opt::at(output, 2 * row, 2 * col) =
mln::opt::at(input, row, col);
return output;
}
......@@ -394,7 +395,8 @@ cells2image(const mln::image2d<T>& input)
(input.ncols() + 1) / 2);
for (unsigned row = 0; row < input.nrows(); row += 2)
for (unsigned col = 0; col < input.ncols(); col += 2)
output.at(row / 2, col / 2) = mln::opt::at(input, row, col);
mln::opt::at(output, row / 2, col / 2) =
mln::opt::at(input, row, col);
return output;
}
......
......@@ -370,7 +370,8 @@ image2cells(const mln::image2d<T>& input)
2 * input.ncols() - 1);
for (unsigned row = 0; row < input.nrows(); ++row)
for (unsigned col = 0; col < input.ncols(); ++col)
output.at(2 * row, 2 * col) = mln::opt::at(input, row, col);
mln::opt::at(output, 2 * row, 2 * col) =
mln::opt::at(input, row, col);
return output;
}
......@@ -383,7 +384,8 @@ cells2image(const mln::image2d<T>& input)
(input.ncols() + 1) / 2);
for (unsigned row = 0; row < input.nrows(); row += 2)
for (unsigned col = 0; col < input.ncols(); col += 2)
output.at(row / 2, col / 2) = mln::opt::at(input, row, col);
mln::opt::at(output, row / 2, col / 2) =
mln::opt::at(input, row, col);
return output;
}
......
......@@ -387,7 +387,8 @@ image2cells(const mln::image2d<T>& input)
2 * input.ncols() - 1);
for (unsigned row = 0; row < input.nrows(); ++row)
for (unsigned col = 0; col < input.ncols(); ++col)
output.at(2 * row, 2 * col) = mln::opt::at(input, row, col);
mln::opt::at(output, 2 * row, 2 * col) =
mln::opt::at(input, row, col);
return output;
}
......@@ -400,7 +401,8 @@ cells2image(const mln::image2d<T>& input)
(input.ncols() + 1) / 2);
for (unsigned row = 0; row < input.nrows(); row += 2)
for (unsigned col = 0; col < input.ncols(); col += 2)
output.at(row / 2, col / 2) = mln::opt::at(input, row, col);
mln::opt::at(output, row / 2, col / 2) =
mln::opt::at(input, row, col);
return output;
}
......
......@@ -387,7 +387,7 @@ image2cells(const mln::image2d<T>& input)
2 * input.ncols() - 1);
for (unsigned row = 0; row < input.nrows(); ++row)
for (unsigned col = 0; col < input.ncols(); ++col)
output.at(2 * row, 2 * col) = mln::opt::at(input, row, col);
mln::opt::at(output, 2 * row, 2 * col) = mln::opt::at(input, row, col);
return output;
}
......@@ -400,7 +400,7 @@ cells2image(const mln::image2d<T>& input)
(input.ncols() + 1) / 2);
for (unsigned row = 0; row < input.nrows(); row += 2)
for (unsigned col = 0; col < input.ncols(); col += 2)
output.at(row / 2, col / 2) = mln::opt::at(input, row, col);
mln::opt::at(output, row / 2, col / 2) = mln::opt::at(input, row, col);
return output;
}
......
......@@ -351,7 +351,7 @@ image2cells(const mln::image2d<T>& input)
2 * input.ncols() - 1);
for (int row = 0; row < input.nrows(); ++row)
for (int col = 0; col < input.ncols(); ++col)
output.at(2 * row, 2 * col) = mln::opt::at(input, row, col);
mln::opt::at(output, 2 * row, 2 * col) = mln::opt::at(input, row, col);
return output;
}
......@@ -417,7 +417,7 @@ cells2image(const mln::image2d<T>& input)
(input.ncols() + 1) / 2);
for (int row = 0; row < input.nrows(); row += 2)
for (int col = 0; col < input.ncols(); col += 2)
output.at(row / 2, col / 2) = mln::opt::at(input, row, col);
mln::opt::at(output, row / 2, col / 2) = mln::opt::at(input, row, col);
return output;
}
......
......@@ -295,7 +295,7 @@ image2cells(const mln::image2d<T>& input)
2 * input.ncols() - 1);
for (int row = 0; row < input.nrows(); ++row)
for (int col = 0; col < input.ncols(); ++col)
output.at(2 * row, 2 * col) = mln::opt::at(input, row, col);
mln::opt::at(output, 2 * row, 2 * col) = mln::opt::at(input, row, col);
return output;
}
......@@ -308,7 +308,7 @@ cells2image(const mln::image2d<T>& input)
(input.ncols() + 1) / 2);
for (int row = 0; row < input.nrows(); row += 2)
for (int col = 0; col < input.ncols(); col += 2)
output.at(row / 2, col / 2) = mln::opt::at(input, row, col);
mln::opt::at(output, row / 2, col / 2) = mln::opt::at(input, row, col);
return output;
}
......
......@@ -10,6 +10,7 @@
# include <mln/value/rgb8.hh>
# include <mln/level/fill.hh>
# include <mln/opt/at.hh>
# include <mln/core/image/image2d.hh>
......@@ -54,7 +55,7 @@ create_graph(const I& ima, I& graph, mln_value(I) val)
mln_piter(I) p(ima.domain());
for_all(p)
graph.at(p.row() * 2, p.col() * 2) = ima(p);
mln::opt::at(graph, p.row() * 2, p.col() * 2) = ima(p);
}
......
......@@ -45,6 +45,8 @@
# include <mln/core/site_set/p_vaccess.hh>
# include <mln/core/site_set/p_set.hh>
# include <mln/opt/at.hh>
# include <mln/accu/bbox.hh>
# include <mln/accu/count.hh>
......@@ -199,16 +201,16 @@ namespace scribo
for (unsigned i = 1; i < tboxes.first.nelements(); ++i)
{
++vend.at(tboxes.first[i].pmin().row());
++vend.at(tboxes.first[i].pmax().row());
++vcol.at(tboxes.first[i].center().col());
opt::at(++vend, tboxes.first[i].pmin().row());
opt::at(++vend, tboxes.first[i].pmax().row());
opt::at(++vcol, tboxes.first[i].center().col());
}
for (unsigned i = 1; i < tboxes.second.nelements(); ++i)
{
++hend.at(tboxes.second[i].pmin().col());
++hend.at(tboxes.second[i].pmax().col());
++hrow.at(tboxes.second[i].center().row());
opt::at(++hend, tboxes.second[i].pmin().col());
opt::at(++hend, tboxes.second[i].pmax().col());
opt::at(++hrow, tboxes.second[i].center().row());
}
#ifndef NOUT
......@@ -217,17 +219,17 @@ namespace scribo
for (unsigned i = 1; i < in.ncols(); ++i)
{
if (hend.at(i) > 0)
if (opt::at(hend, i) > 0)
draw_col(tmp, i, literal::orange);
if (vcol.at(i) > 0)
if (opt::at(vcol, i) > 0)
draw_col(tmp, i, literal::orange);
}
for (unsigned i = 1; i < in.nrows(); ++i)
{
if (hrow.at(i) > 0)
if (opt::at(hrow, i) > 0)
draw_row(tmp, i, literal::magenta);
if (vend.at(i) > 0)
if (opt::at(vend, i) > 0)
draw_row(tmp, i, literal::magenta);
}
......
......@@ -179,7 +179,8 @@ namespace mln
image2d<T> output(nrows_, ncols_);
for (int row = 0; row < nrows_; ++row)
for (int col = 0; col < ncols_; ++col)
output.at(row, col) = mln::opt::at(input, row / coef, col / coef);
mln::opt::at(output, row, col) =
mln::opt::at(input, row / coef, col / coef);
return output;
}
......
......@@ -102,7 +102,8 @@ namespace mln
image2d<T> output(nrows_, ncols_);
for (int row = 0; row < nrows_; ++row)
for (int col = 0; col < ncols_; ++col)
output.at(row, col) = mln::opt::at(input, row / coef, col / coef);
opt::at(output, row, col) =
mln::opt::at(input, row / coef, col / coef);
return output;
}
......
......@@ -103,7 +103,8 @@ namespace mln
image2d<T> output(nrows_, ncols_);
for (int row = 0; row < nrows_; ++row)
for (int col = 0; col < ncols_; ++col)
output.at(row, col) = mln::opt::at(input, row / coef, col / coef);
mln::opt::at(output, row, col) =
mln::opt::at(input, row / coef, col / coef);
return output;
}
......
......@@ -105,7 +105,8 @@ namespace mln
image2d<T> output(nrows_, ncols_);
for (int row = 0; row < nrows_; ++row)
for (int col = 0; col < ncols_; ++col)
output.at(row, col) = mln::opt::at(input, row / coef, col / coef);
mln::opt::at(output, row, col) =
mln::opt::at(input, row / coef, col / coef);
return output;
}
......
......@@ -105,7 +105,8 @@ namespace mln
image2d<T> output(nrows_, ncols_);
for (int row = 0; row < nrows_; ++row)
for (int col = 0; col < ncols_; ++col)
output.at(row, col) = mln::opt::at(input, row / coef, col / coef);
opt::at(output, row, col) =
mln::opt::at(input, row / coef, col / coef);
return output;
}
......
......@@ -177,7 +177,7 @@ namespace mln
image2d<T> output(nrows_, ncols_);
for (int row = 0; row < nrows_; ++row)
for (int col = 0; col < ncols_; ++col)
output.at(row, col) = input.at(row / coef, col / coef);
opt::at(output, row, col) = opt::at(input, row / coef, col / coef);
return output;
}
......
......@@ -242,7 +242,7 @@ image2cells(const mln::image2d<T>& input)
2 * input.ncols() - 1);
for (int row = 0; row < input.nrows(); ++row)
for (int col = 0; col < input.ncols(); ++col)
output.at(2 * row, 2 * col) = mln::opt::at(input, row, col);
mln::opt::at(output, 2 * row, 2 * col) = mln::opt::at(input, row, col);
return output;
}
......@@ -255,7 +255,8 @@ cells2image(const mln::image2d<T>& input)
(input.ncols() + 1) / 2);
for (int row = 0; row < input.nrows(); row += 2)
for (int col = 0; col < input.ncols(); col += 2)
output.at(row / 2, col / 2) = mln::opt::at(input, row, col);
mln::opt::at(output, row / 2, col / 2) =
mln::opt::at(input, row, col);
return output;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment