]> Creatis software - clitk.git/blob - tools/clitkMergeSequenceGenericFilter.h
2e8b7414f618a898cd104bfec6247405fe23e5da
[clitk.git] / tools / clitkMergeSequenceGenericFilter.h
1 /*=========================================================================
2   Program:   vv                     http://www.creatis.insa-lyon.fr/rio/vv
3
4   Authors belong to: 
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
8
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.
12
13   It is distributed under dual licence
14
15   - BSD        See included LICENSE.txt file
16   - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ===========================================================================**/
18 #ifndef __clitkMergeSequenceGenericFilter_h
19 #define __clitkMergeSequenceGenericFilter_h
20 #include "clitkImageCommon.h"
21 #include "clitkImageCommon.h"
22
23 //itk include
24 #include "itkLightObject.h"
25 #include "itkImage.h"
26 #include "itkImageSeriesReader.h"
27
28
29 namespace clitk
30 {
31   
32   class ITK_EXPORT MergeSequenceGenericFilter : public itk::LightObject
33   
34   {
35   public:
36     typedef MergeSequenceGenericFilter     Self;
37     typedef itk::LightObject     Superclass;
38     typedef itk::SmartPointer<Self>            Pointer;
39     typedef itk::SmartPointer<const Self>      ConstPointer;
40    
41     /** Method for creation through the object factory. */
42     itkNewMacro(Self);  
43
44     //Set Methods (inline)
45     void SetInputs(const std::vector<std::string> m){m_InputNames=m;}
46     void SetSpacing(const double m){m_Spacing=m;}
47     void SetOutput(const std::string m){m_OutputName=m;}
48     void SetVerbose(const bool m){m_Verbose=m;}
49
50     //Update
51     void Update( );
52
53
54   protected:
55
56     MergeSequenceGenericFilter();
57     ~MergeSequenceGenericFilter() {};
58
59     //Templated members
60     template<unsigned int Dimension> void UpdateWithDim(std::string PixelType, unsigned int Components);
61     template<unsigned int Dimension, class PixelType> void UpdateWithDimAndPixelType(); 
62
63     std::vector<std::string> m_InputNames;
64     double  m_Spacing;
65     std::string m_OutputName;
66     bool m_Verbose;
67   
68 };
69
70
71 } // end namespace clitk
72 #ifndef ITK_MANUAL_INSTANTIATION
73 #include "clitkMergeSequenceGenericFilter.txx"
74 #endif
75
76 #endif // #define __clitkMergeSequenceGenericFilter_h