From: dsarrut Date: Tue, 30 Mar 2010 14:04:01 +0000 (+0000) Subject: - merger for gate X-Git-Tag: v1.4.0~164^2~36 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=2760571a0d2cf7d45fdcb943ffe1738d101c3fb9;p=clitk.git - merger for gate --- diff --git a/tests_dav/clitkMergeAsciiDoseActor.cxx b/tests_dav/clitkMergeAsciiDoseActor.cxx new file mode 100644 index 0000000..4b1f861 --- /dev/null +++ b/tests_dav/clitkMergeAsciiDoseActor.cxx @@ -0,0 +1,64 @@ +/*========================================================================= + Program: vv http://www.creatis.insa-lyon.fr/rio/vv + Main authors : XX XX XX + + Authors belongs to: + - University of LYON http://www.universite-lyon.fr/ + - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr + - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the copyright notices for more information. + + It is distributed under dual licence + - BSD http://www.opensource.org/licenses/bsd-license.php + - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html + + =========================================================================*/ + +#include +#include "clitkCommon.h" +#include "clitkMergeAsciiDoseActor_ggo.h" + +//-------------------------------------------------------------------- +int main(int argc, char * argv[]) { + + // Init command line + GGO(clitkMergeAsciiDoseActor, args_info); + + // Read input 1 + std::vector input1; + clitk::readDoubleFromFile(args_info.input1_arg, input1); + DD(input1.size()); + + // Read input 2 + std::vector input2; + clitk::readDoubleFromFile(args_info.input2_arg, input2); + DD(input2.size()); + + // Check + if (input1.size() != input2.size()) { + std::cerr << "Error. Please provide input file with the same number of values. Read " + << input1.size() << " in " << args_info.input1_arg + << " and " << input2.size() << " in " << args_info.input2_arg << std::endl; + exit(0); + } + + // Add + for(unsigned int i=0; i