olena-2.0-112-gaf1e2e3 Replace remaining uses of mln::morpho::meyer_wst in Swilena.

* morpho.ixx: Here, by mln::morpho::watershed::flooding. * image2d_int_u8.i, * python/swilena.py, * python/morpho-segm.py: Adjust. --- swilena/ChangeLog | 10 ++++++++++ swilena/image2d_int_u8.i | 10 +++++----- swilena/morpho.ixx | 20 ++++++++++---------- swilena/python/morpho-segm.py | 6 +++--- swilena/python/swilena.py | 5 +++-- 5 files changed, 31 insertions(+), 20 deletions(-) diff --git a/swilena/ChangeLog b/swilena/ChangeLog index 7a0142c..b635467 100644 --- a/swilena/ChangeLog +++ b/swilena/ChangeLog @@ -1,3 +1,13 @@ +2013-03-05 Roland Levillain <roland@lrde.epita.fr> + + Replace remaining uses of mln::morpho::meyer_wst in Swilena. + + * morpho.ixx: Here, by mln::morpho::watershed::flooding. + * image2d_int_u8.i, + * python/swilena.py, + * python/morpho-segm.py: + Adjust. + 2012-10-05 Roland Levillain <roland@lrde.epita.fr> No longer wrap mln::value::int_u32. diff --git a/swilena/image2d_int_u8.i b/swilena/image2d_int_u8.i index 1bcb1d4..1a92443 100644 --- a/swilena/image2d_int_u8.i +++ b/swilena/image2d_int_u8.i @@ -1,5 +1,5 @@ // -*- C++ -*- -// Copyright (C) 2008, 2009, 2012 EPITA Research and Development +// Copyright (C) 2008, 2009, 2012, 2013 EPITA Research and Development // Laboratory (LRDE) // // This file is part of Olena. @@ -78,10 +78,10 @@ instantiate_morpho(mln::image2d< mln::value::int_u<8> >, | image2d<int_u8> and image2d<int_u24>. | `---------------------------------------*/ -instantiate_meyer_wst(meyer_wst24, - mln::value::int_u<24>, - mln::image2d< mln::value::int_u<8> >, - mln::neighb2d) +instantiate_watershed_flooding(watershed_flooding24, + mln::value::int_u<24>, + mln::image2d< mln::value::int_u<8> >, + mln::neighb2d) // FIXME: Rearrange and move this elsewhere. instantiate_image2d(image2d_int_u24, mln::value::int_u<24>) diff --git a/swilena/morpho.ixx b/swilena/morpho.ixx index 7807694..6a8c8b6 100644 --- a/swilena/morpho.ixx +++ b/swilena/morpho.ixx @@ -1,5 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2008, 2009, 2013 EPITA Research and Development +// Laboratory (LRDE) // // This file is part of Olena. // @@ -149,21 +150,20 @@ namespace mln %template(Name) mln::morpho::opening::area< I, N >; %enddef -/*------------------------------------. -| Meyer's Watershed Transform (WST). | -`------------------------------------*/ +/*----------------------------. +| Watershed Transform (WST). | +`----------------------------*/ %{ -#include "mln/morpho/meyer_wst.hh" +#include "mln/morpho/watershed/flooding.hh" %} -%include "mln/morpho/meyer_wst.hh" +%include "mln/morpho/watershed/flooding.hh" -// FIXME: Wrap mln::morpho::watershed::flooding instead. -%define instantiate_meyer_wst(Name, L, I, N) +%define instantiate_watershed_flooding(Name, L, I, N) // Explicit instantiation of this trait for the return type. %template() mln::trait::ch_value< I, L >; - %template(Name) mln::morpho::meyer_wst< L, I, N >; + %template(Name) mln::morpho::watershed::flooding< L, I, N >; %enddef /*-------------------------. @@ -184,5 +184,5 @@ namespace mln instantiate_closing_area(closing_area, I, N) instantiate_opening_area(opening_area, I, N) - instantiate_meyer_wst(meyer_wst, mln_value(I), I, N) + instantiate_watershed_flooding(watershed_flooding, mln_value(I), I, N) %enddef diff --git a/swilena/python/morpho-segm.py b/swilena/python/morpho-segm.py index 3ddf0a8..7d15ada 100644 --- a/swilena/python/morpho-segm.py +++ b/swilena/python/morpho-segm.py @@ -1,6 +1,6 @@ #! /usr/bin/env python -# Copyright (C) 2008, 2009, 2010 EPITA Research and Development +# Copyright (C) 2008, 2009, 2010, 2013 EPITA Research and Development # Laboratory (LRDE) # # This file is part of Olena. @@ -35,9 +35,9 @@ image.save(gradient, "morpho-segm-gradient.pgm") closed_gradient = image.closing_area(ima, c4(), 50) # Watershed transform. nbasins = int_u8(); -ws = image.meyer_wst (closed_gradient, c4(), nbasins) +ws = image.watershed_flooding(closed_gradient, c4(), nbasins) print nbasins image.save(ws, "morpho-segm-ws.pgm") # FIXME: Also re-enable the naive segmentation with no gradient -# simplification, and an output on an image2d<int_u32>. +# simplification, and an output on an image2d<int_u24>. diff --git a/swilena/python/swilena.py b/swilena/python/swilena.py index 8cb695a..4e0a0a9 100644 --- a/swilena/python/swilena.py +++ b/swilena/python/swilena.py @@ -1,6 +1,7 @@ #! /usr/bin/env python -# Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE) +# Copyright (C) 2008, 2009, 2013 EPITA Research and Development +# Laboratory (LRDE) # # This file is part of Olena. # @@ -30,7 +31,7 @@ from neighb2d import * from window2d import * from int_u8 import * -from int_u32 import * +from int_u24 import * import image2d_int import image2d_int_u8 -- 1.7.2.5
participants (1)
-
Roland Levillain