* milena/tests/io/off/load_bin.cc,
* milena/tests/io/off/load_float.cc,
* milena/mln/io/fits/load.hh,
* milena/mln/io/off/save.hh,
* milena/mln/io/pfm/load.hh: update doc.
* milena/mln/io/pfm/save.hh: avoid a warning and update doc.
* milena/tests/io/off/load_float.cc: Fix test.
---
milena/ChangeLog | 14 +++++++++++++
milena/mln/io/fits/load.hh | 35 +++++++++++++++------------------
milena/mln/io/off/save.hh | 2 +-
milena/mln/io/pfm/load.hh | 35 +++++++++++++++------------------
milena/mln/io/pfm/save.hh | 31 ++++++++++++-----------------
milena/tests/io/off/load_bin.cc | 3 +-
milena/tests/io/off/load_float.cc | 6 +++-
milena/tests/io/off/load_save_bin.cc | 3 +-
8 files changed, 68 insertions(+), 61 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index e167114..495e558 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,17 @@
+2008-12-16 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Quick cleanup in io.
+
+ * milena/tests/io/off/load_bin.cc,
+ * milena/tests/io/off/load_float.cc,
+ * milena/mln/io/fits/load.hh,
+ * milena/mln/io/off/save.hh,
+ * milena/mln/io/pfm/load.hh: update doc.
+
+ * milena/mln/io/pfm/save.hh: avoid a warning and update doc.
+
+ * milena/tests/io/off/load_float.cc: Fix test.
+
2008-12-16 Alexandre Abraham <abraham(a)lrde.epita.fr>
Add functors and HSL color space.
diff --git a/milena/mln/io/fits/load.hh b/milena/mln/io/fits/load.hh
index c09536c..dbe533b 100644
--- a/milena/mln/io/fits/load.hh
+++ b/milena/mln/io/fits/load.hh
@@ -29,13 +29,10 @@
#ifndef MLN_IO_FITS_LOAD_HH
# define MLN_IO_FITS_LOAD_HH
-/*!
- * \file mln/io/fits/load.hh
- *
- * \brief Define a function which loads an image of kind fits with
- * given path.
- *
- */
+/// \file mln/io/fits/load.hh
+///
+/// Define a function which loads an image of kind fits with
+/// given path.
# include <iostream>
# include <fstream>
@@ -57,21 +54,21 @@ namespace mln
namespace fits
{
- /*! Load a fits image in a Milena image.
- *
- * \param[out] ima A reference to the image2d<float> which will receive
- * data.
- * \param[in] filename The source.
- */
+ /// Load a fits image in a Milena image.
+ ///
+ /// \param[out] ima A reference to the image2d<float> which will receive
+ /// data.
+ /// \param[in] filename The source.
+ ///
void load(image2d<float>& ima,
const std::string& filename);
- /*! Load a fits image in a image2d<float>.
- *
- * \param[in] filename The image source.
- *
- * \return An image2d<float> which contains loaded data.
- */
+ /// Load a fits image in a image2d<float>.
+ ///
+ /// \param[in] filename The image source.
+ ///
+ /// \return An image2d<float> which contains loaded data.
+ ///
image2d<float> load(const std::string& filename);
# ifndef MLN_INCLUDE_ONLY
diff --git a/milena/mln/io/off/save.hh b/milena/mln/io/off/save.hh
index 40f2e5a..7bb4292 100644
--- a/milena/mln/io/off/save.hh
+++ b/milena/mln/io/off/save.hh
@@ -29,7 +29,7 @@
# define MLN_IO_OFF_SAVE_HH
/// \file mln/io/off/save.hh
-/// \brief Input saving function for OFF files.
+/// Input saving function for OFF files.
///
/// \see
http://shape.cs.princeton.edu/benchmark/documentation/off_format.html
/// \see
https://people.scs.fsu.edu/~burkardt/html/off_format.html
diff --git a/milena/mln/io/pfm/load.hh b/milena/mln/io/pfm/load.hh
index 5ea3a23..ebf2f97 100644
--- a/milena/mln/io/pfm/load.hh
+++ b/milena/mln/io/pfm/load.hh
@@ -29,13 +29,10 @@
#ifndef MLN_IO_PFM_LOAD_HH
# define MLN_IO_PFM_LOAD_HH
-/*!
- * \file mln/io/pfm/load.hh
- *
- * \brief Define a function which loads an image of kind pfm with
- * given path.
- *
- */
+/// \file mln/io/pfm/load.hh
+///
+/// Define a function which loads an image of kind pfm with
+/// given path.
# include <iostream>
# include <fstream>
@@ -53,21 +50,21 @@ namespace mln
namespace pfm
{
- /*! Load a pfm image in a Milena image.
- *
- * \param[out] ima A reference to the image2d<float> which will receive
- * data.
- * \param[in] filename The source.
- */
+ /// Load a pfm image in a Milena image.
+ ///
+ /// \param[out] ima A reference to the image2d<float> which will receive
+ /// data.
+ /// \param[in] filename The source.
+ ///
void load(image2d<float>& ima,
const std::string& filename);
- /*! Load a pfm image in a image2d<float>.
- *
- * \param[in] filename The image source.
- *
- * \return An image2d<float> which contains loaded data.
- */
+ /// Load a pfm image in a image2d<float>.
+ ///
+ /// \param[in] filename The image source.
+ ///
+ /// \return An image2d<float> which contains loaded data.
+ ///
image2d<float> load(const std::string& filename);
# ifndef MLN_INCLUDE_ONLY
diff --git a/milena/mln/io/pfm/save.hh b/milena/mln/io/pfm/save.hh
index 1743e20..f9db876 100644
--- a/milena/mln/io/pfm/save.hh
+++ b/milena/mln/io/pfm/save.hh
@@ -29,13 +29,10 @@
#ifndef MLN_IO_PFM_SAVE_HH
# define MLN_IO_PFM_SAVE_HH
-/*!
- * \file mln/io/pfm/save.hh
- *
- * \brief Define a function which saves an image of kind pfm into
- * given path.
- *
- */
+/// \file mln/io/pfm/save.hh
+///
+/// Define a function which saves an image of kind pfm into
+/// given path.
# include <iostream>
# include <fstream>
@@ -55,11 +52,11 @@ namespace mln
namespace pfm
{
- /*! Save a Milena image as a pfm image.
- *
- * \param[in] ima The image to save.
- * \param[in,out] filename the destination.
- */
+ /// Save a Milena image as a pfm image.
+ ///
+ /// \param[in] ima The image to save.
+ /// \param[in,out] filename the destination.
+ ///
template <typename I>
void save(const Image<I>& ima, const std::string& filename);
@@ -68,11 +65,9 @@ namespace mln
namespace impl
{
- // FIXME: Argument FILENAME is not used; remove?
template <typename I>
inline
- void save_header_(const I& ima, const std::string& filename,
- std::ofstream& file)
+ void save_header_(const I& ima, std::ofstream& file)
{
file << geom::nrows(ima) << ' ' << geom::nrows(ima)
<< std::endl
<< "float" << std::endl;
@@ -83,11 +78,11 @@ namespace mln
void save_(const Image<I>& ima_, const std::string& filename)
{
const I& ima = exact(ima_);
+
std::ofstream file(filename.c_str());
- save_header_(ima, filename, file);
+ save_header_(ima, file);
- unsigned int
- ncols = geom::ncols(ima);
+ unsigned int ncols = geom::ncols(ima);
const mln_deduce(I, site, coord)
min_row = geom::min_row(ima),
diff --git a/milena/tests/io/off/load_bin.cc b/milena/tests/io/off/load_bin.cc
index 4474f6e..5cac72c 100644
--- a/milena/tests/io/off/load_bin.cc
+++ b/milena/tests/io/off/load_bin.cc
@@ -26,7 +26,8 @@
// Public License.
/// \file tests/io/off/load_bin.cc
-/// \brief Test mln::io::off::load with an mln::bin_2complex_image3df.
+///
+/// Test mln::io::off::load with an mln::bin_2complex_image3df.
#include <algorithm>
#include <iterator>
diff --git a/milena/tests/io/off/load_float.cc b/milena/tests/io/off/load_float.cc
index 7cbe625..06199e9 100644
--- a/milena/tests/io/off/load_float.cc
+++ b/milena/tests/io/off/load_float.cc
@@ -26,7 +26,8 @@
// Public License.
/// \file tests/io/off/load_float.cc
-/// \brief Test mln::io::off::load with an mln::float_2complex_image3df.
+///
+/// Test mln::io::off::load with an mln::float_2complex_image3df.
#include <algorithm>
#include <iterator>
@@ -36,6 +37,7 @@
#include "tests/data.hh"
+// FIXME: write a test!
int main()
{
@@ -43,7 +45,7 @@ int main()
typedef float_2complex_image3df ima_t;
ima_t ima;
- io::off::load(ima, MLN_MESH_DIR "/cone-curv.off");
+ io::off::load(ima, MLN_MESH_DIR "/cone-max-curv.off");
std::cout << ima.domain().cplx() << std::endl;
diff --git a/milena/tests/io/off/load_save_bin.cc b/milena/tests/io/off/load_save_bin.cc
index 2dbbdcb..2af3f9d 100644
--- a/milena/tests/io/off/load_save_bin.cc
+++ b/milena/tests/io/off/load_save_bin.cc
@@ -26,7 +26,8 @@
// Public License.
/// \file tests/io/off/load_save_bin.cc
-/// \brief Test mln::io::off::load with and mln::io::off::save with an
+///
+/// Test mln::io::off::load with and mln::io::off::save with an
/// mln::bin_2complex_image3df.
#include <algorithm>
--
1.5.6.5