From 4297b237d3010e089a89e0242d4151168553778f Mon Sep 17 00:00:00 2001 From: jpr Date: Thu, 3 Nov 2005 14:17:24 +0000 Subject: [PATCH] Add TestValidate, to be used as stand alone exec. --- Example/TestValidate.cxx | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 Example/TestValidate.cxx diff --git a/Example/TestValidate.cxx b/Example/TestValidate.cxx new file mode 100755 index 00000000..8df1960c --- /dev/null +++ b/Example/TestValidate.cxx @@ -0,0 +1,40 @@ +/*========================================================================= + + Program: gdcm + Module: $RCSfile: TestValidate.cxx,v $ + Language: C++ + Date: $Date: 2005/11/03 14:17:24 $ + Version: $Revision: 1.1 $ + + Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de + l'Image). All rights reserved. See Doc/License.txt or + http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "gdcmFile.h" +#include "gdcmValidator.h" + + +int main(int argc, char *argv[]) +{ + if( argc < 2 ) + { + std::cerr << "ouh les cornes / shame on you" << std::endl; + return 1; + } + + const char *filename = argv[1]; + + gdcm::File *input = gdcm::File::New( ); + input->SetFileName(filename); + input->Load(); + gdcm::Validator *v = new gdcm::Validator(); + v->SetInput( input ); + + return 0; +} + -- 2.48.1