Commit 4f63d8d4 authored by Guillaume Lazzara's avatar Guillaume Lazzara
Browse files

mln/geom/rotate.hh: use accu::bbox to compute the rotated bbox.

git-svn-id: https://svn.lrde.epita.fr/svn/oln/trunk@4236 4aad255d-cdde-0310-9447-f3009e2ae8c0
parent 755eda93
2009-07-03 Guillaume Lazzara <guillaume.lazzara@lrde.epita.fr>
* mln/geom/rotate.hh: use accu::bbox to compute the rotated bbox.
2009-07-01 Guillaume Lazzara <guillaume.lazzara@lrde.epita.fr>
 
* mln/debug/filename.hh: Allow to force the file id.
......@@ -38,6 +38,8 @@
# include <mln/core/image/imorph/tr_image.hh>
# include <mln/accu/bbox.hh>
# include <mln/data/paste.hh>
# include <mln/geom/bbox.hh>
......@@ -132,16 +134,13 @@ namespace mln
// Automatically adjusting the output domain if needed.
if (!output_domain.is_valid())
{
typedef mln_site(I) P;
P
rpmin = P(comp_transf(input.domain().pmin().to_vec())),
rpmax = P(comp_transf(input.domain().pmax().to_vec()));
accu::bbox<mln_site(I)> accu;
for (unsigned i = 0; i < mln_site_(I)::dim; ++i)
if (rpmax[i] < rpmin[i])
std::swap(rpmax[i], rpmin[i]);
typedef mln_site(I) P;
accu.take(P(comp_transf(input.domain().pmin().to_vec())));
accu.take(P(comp_transf(input.domain().pmax().to_vec())));
b = mln_box(I)(rpmin, rpmax);
b = accu.to_result();
}
typedef
......
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