]> Creatis software - clitk.git/blobdiff - tools/clitkCropImageGenericFilter.h
Remove sonarQube
[clitk.git] / tools / clitkCropImageGenericFilter.h
old mode 100755 (executable)
new mode 100644 (file)
index 29d7d5d..fef6103
@@ -3,7 +3,7 @@
 
   Authors belong to:
   - University of LYON              http://www.universite-lyon.fr/
-  - Léon Bérard cancer center       http://oncora1.lyon.fnclcc.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
@@ -14,7 +14,7 @@
 
   - BSD        See included LICENSE.txt file
   - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
-======================================================================-====*/
+===========================================================================**/
 
 #ifndef CLITKCROPIMAGEGENERICFILTER_H
 #define CLITKCROPIMAGEGENERICFILTER_H
@@ -60,6 +60,18 @@ namespace clitk
     void UpdateWithInputImageType();
 
   protected:
+    template <class ImageType>
+    class AutoCrop
+    {
+    public:
+      typedef typename ImageType::Pointer ImagePointer;
+      ImagePointer Do(args_info_type &, ImagePointer);
+    private:
+      template<unsigned int> struct PixelDimType {};
+      template<unsigned int Dim> ImagePointer Do(args_info_type &,ImagePointer, PixelDimType<Dim> *);
+      ImagePointer Do(args_info_type &, ImagePointer, PixelDimType<1> *);
+    };
+
     template<unsigned int Dim> void InitializeImageType();
     args_info_type mArgsInfo;
 
@@ -67,8 +79,4 @@ namespace clitk
   //--------------------------------------------------------------------
 } // end namespace clitk
 
-#ifndef ITK_MANUAL_INSTANTIATION
-#include "clitkCropImageGenericFilter.txx"
-#endif
-
 #endif // #define CLITKCROPIMAGEGENERICFILTER_H