* python/morpho-fun.py, * python/morpho-segm.py: Add the name of the test as prefix of its output file names. * python/Makefile.am (CLEANFILES): Adjust. Add morpho-segm-gradient.pgm. Rename as... (MOSTLYCLEANFILES): ...this. --- swilena/ChangeLog | 12 ++++++++++++ swilena/python/Makefile.am | 26 ++++++++++++++------------ swilena/python/morpho-fun.py | 23 +++++++++++++---------- swilena/python/morpho-segm.py | 7 ++++--- 4 files changed, 43 insertions(+), 25 deletions(-)
diff --git a/swilena/ChangeLog b/swilena/ChangeLog index efa4e9b..55237de 100644 --- a/swilena/ChangeLog +++ b/swilena/ChangeLog @@ -1,3 +1,15 @@ +2010-04-26 Roland Levillain roland@lrde.epita.fr + + Canonize Swilena's tests' output file names to support parallel tests. + + * python/morpho-fun.py, + * python/morpho-segm.py: + Add the name of the test as prefix of its output file names. + * python/Makefile.am (CLEANFILES): Adjust. + Add morpho-segm-gradient.pgm. + Rename as... + (MOSTLYCLEANFILES): ...this. + 2009-09-12 Roland Levillain roland@lrde.epita.fr
* neighb2d.i: Aesthetic changes. diff --git a/swilena/python/Makefile.am b/swilena/python/Makefile.am index aec8a05..cc4a70f 100644 --- a/swilena/python/Makefile.am +++ b/swilena/python/Makefile.am @@ -1,4 +1,5 @@ -# 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. # @@ -238,14 +239,15 @@ TESTS = \ EXTRA_DIST += $(TESTS)
# Images generated by tests. -CLEANFILES += \ - closing.pgm \ - closing_area.pgm \ - dilation.pgm \ - erosion.pgm \ - gradient.pgm \ - gradient_external.pgm \ - gradient_internal.pgm \ - opening.pgm \ - opening_area.pgm \ - segm.pgm +MOSTLYCLEANFILES = \ + morpho-fun-closing.pgm \ + morpho-fun-closing_area.pgm \ + morpho-fun-dilation.pgm \ + morpho-fun-erosion.pgm \ + morpho-fun-gradient.pgm \ + morpho-fun-gradient_external.pgm \ + morpho-fun-gradient_internal.pgm \ + morpho-fun-opening.pgm \ + morpho-fun-opening_area.pgm \ + morpho-segm-gradient.pgm \ + morpho-segm-ws.pgm diff --git a/swilena/python/morpho-fun.py b/swilena/python/morpho-fun.py index fd55202..6bcc6fc 100644 --- a/swilena/python/morpho-fun.py +++ b/swilena/python/morpho-fun.py @@ -1,6 +1,7 @@ #! /usr/bin/env python
-# 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. # @@ -28,17 +29,19 @@ image = image2d_int_u8 ima = image.load(data.lena)
dilated = image.dilation(ima, win_c4p()) -image.save(dilated, "dilation.pgm") +image.save(dilated, "morpho-fun-dilation.pgm")
eroded = image.erosion(ima, win_c4p()) -image.save(eroded, "erosion.pgm") +image.save(eroded, "morpho-fun-erosion.pgm")
-image.save(image.opening(ima, c4()), "opening.pgm") -image.save(image.closing(ima, c4()), "closing.pgm") +image.save(image.opening(ima, c4()), "morpho-fun-opening.pgm") +image.save(image.closing(ima, c4()), "morpho-fun-closing.pgm")
-image.save(image.gradient(ima, win_c4p()), "gradient.pgm") -image.save(image.gradient_internal(ima, win_c4p()), "gradient_internal.pgm") -image.save(image.gradient_external(ima, win_c4p()), "gradient_external.pgm") +image.save(image.gradient(ima, win_c4p()), "morpho-fun-gradient.pgm") +image.save(image.gradient_internal(ima, win_c4p()), + "morpho-fun-gradient_internal.pgm") +image.save(image.gradient_external(ima, win_c4p()), + "morpho-fun-gradient_external.pgm")
-image.save(image.closing_area(ima, c4(), 50), "closing_area.pgm") -image.save(image.closing_area(ima, c4(), 50), "opening_area.pgm") +image.save(image.closing_area(ima, c4(), 50), "morpho-fun-closing_area.pgm") +image.save(image.closing_area(ima, c4(), 50), "morpho-fun-opening_area.pgm") diff --git a/swilena/python/morpho-segm.py b/swilena/python/morpho-segm.py index 021f91a..3ddf0a8 100644 --- a/swilena/python/morpho-segm.py +++ b/swilena/python/morpho-segm.py @@ -1,6 +1,7 @@ #! /usr/bin/env python
-# 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. # @@ -29,14 +30,14 @@ ima = image.load(data.lena)
# Gradient. gradient = image.gradient(ima, win_c4p()) -image.save(gradient, "gradient.pgm") +image.save(gradient, "morpho-segm-gradient.pgm") # Area closing of the gradient. closed_gradient = image.closing_area(ima, c4(), 50) # Watershed transform. nbasins = int_u8(); ws = image.meyer_wst (closed_gradient, c4(), nbasins) print nbasins -image.save(ws, "segm.pgm") +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>.