]> Creatis software - clitk.git/blobdiff - filters/clitkImageArithmGenericFilter.cxx
Recorrected a windows compilation issue (was in version 1.2 but had been removed...
[clitk.git] / filters / clitkImageArithmGenericFilter.cxx
index 2683a9352ba344330688e3eff114c4f7598e4c86..59f0bc0f2fcee4ba43509242b75e3d3df4b50c9d 100644 (file)
@@ -1,18 +1,22 @@
 /*=========================================================================
+  Program:   vv                     http://www.creatis.insa-lyon.fr/rio/vv
 
-  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.
-                                                                             
-=========================================================================*/
+  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 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
+======================================================================-====*/
 #ifndef CLITKIMAGEARITHMGENERICFILTER_CXX
 #define CLITKIMAGEARITHMGENERICFILTER_CXX
-
 /**
  -------------------------------------------------------------------
  * @file   clitkImageArithmGenericFilter.cxx
 
 #include "clitkImageArithmGenericFilter.h"
 
-//--------------------------------------------------------------------
-clitk::ImageArithmGenericFilter::ImageArithmGenericFilter():mTypeOfOperation(0) {
-  mIsOperationUseASecondImage = false;
-}
-//--------------------------------------------------------------------
-
-//--------------------------------------------------------------------
-void clitk::ImageArithmGenericFilter::Update () {
-  
-  // Load image header
-  itk::ImageIOBase::Pointer header = clitk::readImageHeader(mInputFilenames[0]);
-  
-  // Determine dim, pixel type, number of components
-  mDim = header->GetNumberOfDimensions();
-  mPixelTypeName = header->GetComponentTypeAsString(header->GetComponentType());  
-  mNbOfComponents = header->GetNumberOfComponents();
-  
-  if (mInputFilenames.size() == 0) {
-    std::cerr << "ERROR : please provide at least a input filename." << std::endl;
-  }
-  if (mInputFilenames.size() == 1) {
-    mIsOperationUseASecondImage = false;
-  }
-  if (mInputFilenames.size() == 2) {
-    mIsOperationUseASecondImage = true;
-  }
-  if (mInputFilenames.size() > 2) {
-    std::cerr << "ERROR : please provide only 1 or 2 input filenames." << std::endl;
-  }
-
-  // Switch by dimension
-  if (mDim == 2) { Update_WithDim<2>(); return; }
-  if (mDim == 3) { Update_WithDim<3>(); return; }
-  if (mDim == 4) { Update_WithDim<4>(); return; }
-
-  std::cerr << "Error, dimension of input image is " << mDim << ", but I only work with 2,3." << std::endl;
-  exit(0);
-}
-//--------------------------------------------------------------------
 
 #endif //define CLITKIMAGEARITHMGENERICFILTER_CXX