Commit 852fd7f7 authored by Guillaume Lazzara's avatar Guillaume Lazzara
Browse files

Rename image3d<>::nslices to image3d<>::nslis.

	* mln/core/image/image3d.hh,
	* mln/debug/slices_2d.hh,
	* tests/io/pbms/load.cc,
	* tests/io/pgms/load.cc,
	* tests/io/ppms/load.cc: Rename nslices to nslis.
parent 749308a7
2010-02-16 Guillaume Lazzara <z@lrde.epita.fr>
Rename image3d<>::nslices to image3d<>::nslis.
* mln/core/image/image3d.hh,
* mln/debug/slices_2d.hh,
* tests/io/pbms/load.cc,
* tests/io/pgms/load.cc,
* tests/io/ppms/load.cc: Rename nslices to nslis.
2010-02-16 Guillaume Lazzara <z@lrde.epita.fr> 2010-02-16 Guillaume Lazzara <z@lrde.epita.fr>
   
Various small fixes. Various small fixes.
// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE) // Copyright (C) 2007, 2008, 2009 EPITA Research and Development
// Laboratory (LRDE)
// //
// This file is part of Olena. // This file is part of Olena.
// //
...@@ -208,7 +209,7 @@ namespace mln ...@@ -208,7 +209,7 @@ namespace mln
/// Give the number of slices. /// Give the number of slices.
unsigned nslices() const; unsigned nslis() const;
/// Give the number of rows. /// Give the number of rows.
unsigned nrows() const; unsigned nrows() const;
...@@ -511,7 +512,7 @@ namespace mln ...@@ -511,7 +512,7 @@ namespace mln
template <typename T> template <typename T>
inline inline
unsigned unsigned
image3d<T>::nslices() const image3d<T>::nslis() const
{ {
mln_precondition(this->is_valid()); mln_precondition(this->is_valid());
return this->data_->b_.len(0); return this->data_->b_.len(0);
......
// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE) // Copyright (C) 2008, 2009, 2010 EPITA Research and Development
// Laboratory (LRDE)
// //
// This file is part of Olena. // This file is part of Olena.
// //
...@@ -86,11 +87,11 @@ namespace mln ...@@ -86,11 +87,11 @@ namespace mln
mln_precondition(input.is_valid()); mln_precondition(input.is_valid());
mln_precondition(n_horizontal > 0 && n_vertical > 0); mln_precondition(n_horizontal > 0 && n_vertical > 0);
mln_precondition(input.nslices() <= n_horizontal * n_vertical); mln_precondition(input.nslis() <= n_horizontal * n_vertical);
image2d<mln_value(I)> output(input.nrows() * n_vertical, image2d<mln_value(I)> output(input.nrows() * n_vertical,
input.ncols() * n_horizontal); input.ncols() * n_horizontal);
if (input.nslices() != n_horizontal * n_vertical) if (input.nslis() != n_horizontal * n_vertical)
data::fill(output, bg); data::fill(output, bg);
const point3d& p_min = input.domain().pmin(); const point3d& p_min = input.domain().pmin();
...@@ -170,10 +171,10 @@ namespace mln ...@@ -170,10 +171,10 @@ namespace mln
mln_precondition(ratio_hv > 0.f); mln_precondition(ratio_hv > 0.f);
unsigned n_horizontal, n_vertical; unsigned n_horizontal, n_vertical;
internal::slices2d_helper(input.nslices(), input.nrows(), input.ncols(), internal::slices2d_helper(input.nslis(), input.nrows(), input.ncols(),
ratio_hv, ratio_hv,
n_horizontal, n_vertical); n_horizontal, n_vertical);
mln_assertion(n_horizontal * n_vertical >= input.nslices()); mln_assertion(n_horizontal * n_vertical >= input.nslis());
image2d<mln_value(I)> output = slices_2d(input, n_horizontal, n_vertical, bg); image2d<mln_value(I)> output = slices_2d(input, n_horizontal, n_vertical, bg);
......
...@@ -54,7 +54,7 @@ int main() ...@@ -54,7 +54,7 @@ int main()
image3d<bool> ima3d; image3d<bool> ima3d;
io::pbms::load(ima3d, files); io::pbms::load(ima3d, files);
mln_assertion(ima3d.nslices() == 2); mln_assertion(ima3d.nslis() == 2);
mln_assertion(slice(ima3d, 0) == pic); mln_assertion(slice(ima3d, 0) == pic);
mln_assertion(slice(ima3d, 1) == pic2); mln_assertion(slice(ima3d, 1) == pic2);
......
...@@ -61,7 +61,7 @@ int main() ...@@ -61,7 +61,7 @@ int main()
image3d<int_u8> ima3d; image3d<int_u8> ima3d;
io::pgms::load(ima3d, files); io::pgms::load(ima3d, files);
mln_assertion(ima3d.nslices() == 2); mln_assertion(ima3d.nslis() == 2);
mln_assertion(slice(ima3d, 0) == lena); mln_assertion(slice(ima3d, 0) == lena);
mln_assertion(slice(ima3d, 1) == lena2); mln_assertion(slice(ima3d, 1) == lena2);
} }
......
...@@ -63,7 +63,7 @@ int main() ...@@ -63,7 +63,7 @@ int main()
image3d<rgb8> ima3d; image3d<rgb8> ima3d;
io::ppms::load(ima3d, files); io::ppms::load(ima3d, files);
mln_assertion(ima3d.nslices() == 2); mln_assertion(ima3d.nslis() == 2);
mln_assertion(slice(ima3d, 0) == ima); mln_assertion(slice(ima3d, 0) == ima);
mln_assertion(slice(ima3d, 1) == ima2); mln_assertion(slice(ima3d, 1) == ima2);
} }
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