]> Creatis software - clitk.git/blobdiff - tools/clitkSplitImage.cxx
added the new headers
[clitk.git] / tools / clitkSplitImage.cxx
index 8a935e072f78a9c2278ac6260b15b60c5bf68282..ba30592fea8268c710d612e2060a621837e0dc84 100644 (file)
@@ -1,15 +1,20 @@
-/*------------------------------------------------------------------------=
-                                                                                
-  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.
-                                                                                
+/*=========================================================================
+  Program:   vv                     http://www.creatis.insa-lyon.fr/rio/vv
+
+  Authors belong 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 above copyright notices for more information.
-                                                                             
-  ------------------------------------------------------------------------=*/
+  PURPOSE.  See the copyright notices for more information.
 
+  It is distributed under dual licence
+
+  - BSD        See included LICENSE.txt file
+  - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+======================================================================-====*/
 /**
    ------------------------------------------------=
    * @file   clitkSplitImage.cxx
@@ -31,6 +36,11 @@ int main(int argc, char * argv[]) {
 
   // Read image dimension
   itk::ImageIOBase::Pointer header = clitk::readImageHeader(args_info.input_arg);
+  if (header.IsNull())
+  {
+      std::cerr << "Unable to read image file " << args_info.input_arg << std::endl;
+      std::exit(1);
+  }
   unsigned int dim = header->GetNumberOfDimensions();
   
   // Check parameters