]> Creatis software - clitk.git/blobdiff - tools/clitkSplitImage.cxx
Increase number of decimal for fusion and overlay
[clitk.git] / tools / clitkSplitImage.cxx
index 0f9275cdd6390e0aee7169c8b21c43951e979661..260e220a2ec126564fa14ffe87832dac154c4d65 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://www.centreleonberard.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
@@ -23,7 +28,8 @@
 #include "clitkIO.h"
 
 //--------------------------------------------------------------------
-int main(int argc, char * argv[]) {
+int main(int argc, char * argv[])
+{
 
   // Init command line
   GGO(clitkSplitImage, args_info);
@@ -31,13 +37,12 @@ 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);
+  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
   if (args_info.dimension_given >= dim) {
     std::cerr << "ERROR : image has " << dim << "dimensions, split dimension should be between 0 and " << dim-1 << "." << std::endl;
@@ -48,9 +53,11 @@ int main(int argc, char * argv[]) {
   filter.SetInputFilename(args_info.input_arg);
   filter.SetOutputFilename(args_info.output_arg);
   filter.SetSplitDimension(args_info.dimension_arg);
+  filter.SetPng(args_info.png_flag);
+  filter.SetWindowLevel(args_info.window_arg, args_info.level_arg);
   filter.SetVerbose(args_info.verbose_flag);
   filter.Update();
 
-  // this is the end my friend  
+  // this is the end my friend
   return 0;
 } // end main