]> Creatis software - clitk.git/blobdiff - itk/RelativePositionPropImageFilter.txx
Ensure compatibility with ITK < 4.12 for throw exception
[clitk.git] / itk / RelativePositionPropImageFilter.txx
index 56a27d41cc60356d512238f9b467ad7aae80b919..c34c7c3f2241a1492fb014d71af8b00413b33144 100644 (file)
@@ -1,10 +1,27 @@
+/*=========================================================================
+  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 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
+===========================================================================*/
 /*=========================================================================
 
   Program:   Insight Segmentation & Registration Toolkit
   Module:    $RCSfile: RelativePositionPropImageFilter.txx,v $
   Language:  C++
-  Date:      $Date: 2010/06/30 05:58:56 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2010/07/12 06:57:25 $
+  Version:   $Revision: 1.2 $
 
   Copyright (c) Insight Software Consortium. All rights reserved.
   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
@@ -16,6 +33,7 @@
   =========================================================================*/
 #ifndef _RelativePositionPropImageFilter_txx
 #define _RelativePositionPropImageFilter_txx
+
 #include "RelativePositionPropImageFilter.h"
 
 #include "itkNeighborhoodOperatorImageFilter.h"
@@ -23,7 +41,6 @@
 #include "itkZeroFluxNeumannBoundaryCondition.h"
 #include "itkProgressAccumulator.h"
 #include "itkImageFileWriter.h"
-
 #include "itkSimpleContourExtractorImageFilter.h"
 #include "itkUnaryFunctorImageFilter.h"
 
@@ -33,7 +50,11 @@ namespace itk
   template <class TInputImage, class TOutputImage,class TtNorm>
   void 
   RelativePositionPropImageFilter<TInputImage,TOutputImage,TtNorm>
+#if ( ( ITK_VERSION_MAJOR == 4 ) && ( ITK_VERSION_MINOR > 12 ) || ( ITK_VERSION_MAJOR > 4 ))
+  ::GenerateInputRequestedRegion()
+#else
   ::GenerateInputRequestedRegion() throw (InvalidRequestedRegionError)
+#endif
   {
     // call the superclass' implementation of this method
     Superclass::GenerateInputRequestedRegion ();
@@ -69,8 +90,6 @@ namespace itk
   ::GenerateData()
   {
 
-    // std::cout <<"GenerateData" << std::endl;
-
     this->AllocateOutputs();
     computeDirection();
     typename InputImageType::ConstPointer input = this->GetInput();
@@ -114,7 +133,6 @@ namespace itk
   
     if(!m_Fast)
       {  
-        DD(m_Fast);
         for(int i=0;i<pow((double)2,(int)ImageDimension);i++)
           {
             int orient[ImageDimension];