From 5dd8e75c306a251b2887081aa0e6992d183acc8a Mon Sep 17 00:00:00 2001 From: stefan <stefan@5a81b35b-ba03-0410-adc8-b2c5c5119f08> Date: Tue, 2 Mar 2010 10:49:23 +0000 Subject: [PATCH] Fixed img Tests git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@1750 5a81b35b-ba03-0410-adc8-b2c5c5119f08 --- modules/img/alg/tests/CMakeLists.txt | 1 - modules/img/alg/tests/test_circular_mask.cc | 73 --------------------- modules/img/alg/tests/tests.cc | 6 +- 3 files changed, 2 insertions(+), 78 deletions(-) delete mode 100644 modules/img/alg/tests/test_circular_mask.cc diff --git a/modules/img/alg/tests/CMakeLists.txt b/modules/img/alg/tests/CMakeLists.txt index 38decfcb4..4ebb0fe48 100644 --- a/modules/img/alg/tests/CMakeLists.txt +++ b/modules/img/alg/tests/CMakeLists.txt @@ -1,5 +1,4 @@ set(IPLT_ALG_UNIT_TESTS -test_circular_mask.cc test_clear.cc test_conj.cc test_convolute.cc diff --git a/modules/img/alg/tests/test_circular_mask.cc b/modules/img/alg/tests/test_circular_mask.cc deleted file mode 100644 index 85bae5f44..000000000 --- a/modules/img/alg/tests/test_circular_mask.cc +++ /dev/null @@ -1,73 +0,0 @@ -//------------------------------------------------------------------------------ -// This file is part of the OpenStructure project <www.openstructure.org> -// -// Copyright (C) 2008-2010 by the OpenStructure authors -// Copyright (C) 2003-2010 by the IPLT authors -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License as published by the Free -// Software Foundation; either version 3.0 of the License, or (at your option) -// any later version. -// This library is distributed in the hope that it will be useful, but WITHOUT -// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more -// details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with this library; if not, write to the Free Software Foundation, Inc., -// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -//------------------------------------------------------------------------------ - -/* - Author: Valerio Mariani -*/ - -#include <iostream> - -#include "tests.hh" - -#include <ost/img/image.hh> -#include <ost/img/alg/circular_mask.hh> -#include <ost/img/alg/randomize.hh> - -namespace { - -using namespace ost::img; -using namespace ost::img::alg; - -void test() -{ - - ImageHandle im = CreateImage(Size(400,400),REAL,SPATIAL); - im.ApplyIP(Randomize()); - CircularMask cm; - cm.SetMaskCenterOffset(::geom::Vec2(100,100)); - cm.SetFillValue(0.0); - im.ApplyIP(cm); - - ImageHandle im2 = CreateImage(Size(400,400),REAL,SPATIAL); - im2.ApplyIP(Randomize()); - im2.SetSpatialOrigin(Point(100,100)); - cm.SetRadius(10); - im2.ApplyIP(cm); - - - ImageHandle im3 = CreateImage(Size(400,400),REAL,SPATIAL); - im3.ApplyIP(Randomize()); - cm.SetMaskCenterOffsetToDefault(); - cm.SetRadiusToDefault(); - cm.SetFillValueToDefault(); - cm.SetSigma(6.0); - im3.ApplyIP(cm); -} - -} // ns - -test_suite* CreateCircularMaskTest() -{ - test_suite* ts=BOOST_TEST_SUITE("Circular Mask Test"); - - ts->add(BOOST_TEST_CASE(&test)); - - return ts; -} diff --git a/modules/img/alg/tests/tests.cc b/modules/img/alg/tests/tests.cc index 7e7c89479..096f981cd 100644 --- a/modules/img/alg/tests/tests.cc +++ b/modules/img/alg/tests/tests.cc @@ -36,7 +36,6 @@ extern test_suite* CreateMirrorTest(); extern test_suite* CreateTransformTest(); extern test_suite* CreateDiscreteShrinkTest(); extern test_suite* CreateFillTest(); -extern test_suite* CreatePeakSearchTest(); extern test_suite* CreateStatTest(); extern test_suite* CreateClearTest(); extern test_suite* CreateFFTTest(); @@ -49,8 +48,7 @@ bool init_ost_img_alg_unit_tests() { framework::master_test_suite().add(CreateMirrorTest()); framework::master_test_suite().add(CreateTransformTest()); framework::master_test_suite().add(CreateDiscreteShrinkTest()); - framework::master_test_suite().add(CreateFillTest()); - framework::master_test_suite().add(CreatePeakSearchTest()); + framework::master_test_suite().add(CreateFillTest()); framework::master_test_suite().add(CreateStatTest()); framework::master_test_suite().add(CreateConjugateTest()); framework::master_test_suite().add(CreateClearTest()); @@ -67,4 +65,4 @@ int main(int argc, char** argv) { return boost::unit_test::unit_test_main(init_ost_img_alg_unit_tests, argc, argv); -} \ No newline at end of file +} -- GitLab