]> Creatis software - clitk.git/blobdiff - itk/RelativePositionPropImageFilter.h
Ensure compatibility with ITK < 4.12 for throw exception
[clitk.git] / itk / RelativePositionPropImageFilter.h
index 05172245ba70114bcf5e696bcc6fdac1e58ed7d3..e876f9fd6e042ba29a134f1f9cb709fdbe09f891 100644 (file)
@@ -81,17 +81,10 @@ namespace itk
    *   This filter is implemented using the propagation algorithm
    */
 
-#if ITK_VERSION_MAJOR == 4
   template <class TInputImage, class TOutputImage, class TtNorm=Functor::Minimum<
                                                      typename TOutputImage::PixelType,
                                                      typename TOutputImage::PixelType,
                                                      typename TOutputImage::PixelType>  >
-#else
-  template <class TInputImage, class TOutputImage, class TtNorm=Function::Minimum<
-                                                     typename TOutputImage::PixelType,
-                                                     typename TOutputImage::PixelType,
-                                                     typename TOutputImage::PixelType>  >
-#endif
   class ITK_EXPORT RelativePositionPropImageFilter :
     public ImageToImageFilter< TInputImage, TOutputImage > 
   {
@@ -176,9 +169,12 @@ namespace itk
       }
     }
   
-
-    virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
-    void EnlargeOutputRequestedRegion (DataObject * output);
+#if ( ( ITK_VERSION_MAJOR == 4 ) && ( ITK_VERSION_MINOR > 12 ) || ( ITK_VERSION_MAJOR > 4 ))
+    virtual void GenerateInputRequestedRegion() ITK_OVERRIDE;
+#else
+   virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError) ITK_OVERRIDE;
+#endif
+    void EnlargeOutputRequestedRegion (DataObject * output) ITK_OVERRIDE;
 
   protected:
     RelativePositionPropImageFilter()
@@ -192,10 +188,10 @@ namespace itk
         m_VerboseProgress = false;
       }
     virtual ~RelativePositionPropImageFilter() {}
-    void PrintSelf(std::ostream& os, Indent indent) const;
+    void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE;
 
-    //void GenerateThreadedData(const typename TOutputImage::RegionType& outputRegionForThread, ThreadIdType threadId);
-    void GenerateData();
+    //void GenerateThreadedData(const typename TOutputImage::RegionType& outputRegionForThread, int threadId);
+    void GenerateData() ITK_OVERRIDE;
 
   private:
     RelativePositionPropImageFilter(const Self&); //purposely not implemented