1 /*=========================================================================
2 Program: vv http://www.creatis.insa-lyon.fr/rio/vv
5 - University of LYON http://www.universite-lyon.fr/
6 - Léon Bérard cancer center http://www.centreleonberard.fr
7 - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the copyright notices for more information.
13 It is distributed under dual licence
15 - BSD See included LICENSE.txt file
16 - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ===========================================================================**/
19 #ifndef CLITKCROPIMAGEGENERICFILTER_H
20 #define CLITKCROPIMAGEGENERICFILTER_H
24 #include "clitkImageToImageGenericFilter.h"
25 #include "clitkCropLikeImageFilter.h"
26 #include "clitkAutoCropFilter.h"
27 #include "clitkCropImage_ggo.h"
30 #include <itkCropImageFilter.h>
32 //--------------------------------------------------------------------
36 class ITK_EXPORT CropImageGenericFilter:
37 public ImageToImageGenericFilter<CropImageGenericFilter>
40 //--------------------------------------------------------------------
41 CropImageGenericFilter();
43 //--------------------------------------------------------------------
44 typedef CropImageGenericFilter Self;
45 typedef ImageToImageGenericFilter<CropImageGenericFilter> Superclass;
46 typedef itk::SmartPointer<Self> Pointer;
47 typedef itk::SmartPointer<const Self> ConstPointer;
48 typedef args_info_clitkCropImage args_info_type;
50 //--------------------------------------------------------------------
52 itkTypeMacro( CropImageGenericFilter, LightObject );
54 //--------------------------------------------------------------------
55 void SetArgsInfo(const args_info_type& a);
57 //--------------------------------------------------------------------
58 // Main function called each time the filter is updated
59 template<class ImageType>
60 void UpdateWithInputImageType();
63 template <class ImageType>
67 typedef typename ImageType::Pointer ImagePointer;
68 ImagePointer Do(args_info_type &, ImagePointer);
70 template<unsigned int> struct PixelDimType {};
71 template<unsigned int Dim> ImagePointer Do(args_info_type &,ImagePointer, PixelDimType<Dim> *);
72 ImagePointer Do(args_info_type &, ImagePointer, PixelDimType<1> *);
75 template<unsigned int Dim> void InitializeImageType();
76 args_info_type mArgsInfo;
79 //--------------------------------------------------------------------
80 } // end namespace clitk
82 #endif // #define CLITKCROPIMAGEGENERICFILTER_H