
* mln/core/image/image1d.hh, * mln/core/image/image2d.hh, * mln/core/image/image3d.hh: Here. --- milena/ChangeLog | 8 ++++++++ milena/mln/core/image/image1d.hh | 15 ++++++++++++++- milena/mln/core/image/image2d.hh | 15 ++++++++++++++- milena/mln/core/image/image3d.hh | 12 ++++++++++++ 4 files changed, 48 insertions(+), 2 deletions(-) diff --git a/milena/ChangeLog b/milena/ChangeLog index 77e5081..0814f80 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,5 +1,13 @@ 2011-09-02 Guillaume Lazzara <z@lrde.epita.fr> + Add vbbox() method. + + * mln/core/image/image1d.hh, + * mln/core/image/image2d.hh, + * mln/core/image/image3d.hh: Here. + +2011-09-02 Guillaume Lazzara <z@lrde.epita.fr> + Rename back nslices to nslis. * mln/core/image/image3d.hh, diff --git a/milena/mln/core/image/image1d.hh b/milena/mln/core/image/image1d.hh index 89e93e7..6d10aa5 100644 --- a/milena/mln/core/image/image1d.hh +++ b/milena/mln/core/image/image1d.hh @@ -1,4 +1,5 @@ -// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development +// Laboratory (LRDE) // // This file is part of Olena. // @@ -193,6 +194,9 @@ namespace mln /// Give the bounding box domain. const box1d& bbox() const; + /// virtual box, i.e., box including the virtual border + const box1d& vbbox() const; + /// Give the border thickness. unsigned border() const; @@ -412,6 +416,15 @@ namespace mln template <typename T> inline + const box1d& + image1d<T>::vbbox() const + { + mln_precondition(this->is_valid()); + return this->data_->vb_; + } + + template <typename T> + inline unsigned image1d<T>::border() const { diff --git a/milena/mln/core/image/image2d.hh b/milena/mln/core/image/image2d.hh index d2a3e0f..cdb460a 100644 --- a/milena/mln/core/image/image2d.hh +++ b/milena/mln/core/image/image2d.hh @@ -1,4 +1,5 @@ -// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development +// Laboratory (LRDE) // // This file is part of Olena. // @@ -176,6 +177,9 @@ namespace mln /// Give the bounding box domain. const box2d& bbox() const; + // virtual box, i.e., box including the virtual border + const box2d& vbbox() const; + /// Read-only access to the image value located at point \p p. const T& operator()(const point2d& p) const; @@ -434,6 +438,15 @@ namespace mln template <typename T> inline + const box2d& + image2d<T>::vbbox() const + { + mln_precondition(this->is_valid()); + return this->data_->vb_; + } + + template <typename T> + inline bool image2d<T>::has(const point2d& p) const { diff --git a/milena/mln/core/image/image3d.hh b/milena/mln/core/image/image3d.hh index 86c8f23..59d6908 100644 --- a/milena/mln/core/image/image3d.hh +++ b/milena/mln/core/image/image3d.hh @@ -181,6 +181,9 @@ namespace mln /// Give the bounding box domain. const box3d& bbox() const; + /// virtual box, i.e., box including the virtual border + const box3d& vbbox() const; + /// Give the border thickness. unsigned border() const; @@ -430,6 +433,15 @@ namespace mln template <typename T> inline + const box3d& + image3d<T>::vbbox() const + { + mln_precondition(this->is_valid()); + return data_->vb_; + } + + template <typename T> + inline unsigned image3d<T>::border() const { -- 1.7.2.5
participants (1)
-
Guillaume Lazzara