---
milena/ChangeLog | 4 ++++
milena/mln/geom/rotate.hh | 15 +++++++--------
2 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index bc1d723..07e590c 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,7 @@
+2009-07-03 Guillaume Lazzara <guillaume.lazzara(a)lrde.epita.fr>
+
+ * mln/geom/rotate.hh: use accu::bbox to compute the rotated bbox.
+
2009-07-01 Guillaume Lazzara <guillaume.lazzara(a)lrde.epita.fr>
* mln/debug/filename.hh: Allow to force the file id.
diff --git a/milena/mln/geom/rotate.hh b/milena/mln/geom/rotate.hh
index 34f9e9b..12793c0 100644
--- a/milena/mln/geom/rotate.hh
+++ b/milena/mln/geom/rotate.hh
@@ -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
--
1.5.6.5