selxItkSmoothingRecursiveGaussianImageFilterComponent.h 3.01 KB
Newer Older
Floris Berendsen's avatar
Floris Berendsen committed
1
2
/*=========================================================================
 *
3
 *  Copyright Leiden University Medical Center, Erasmus University Medical
Floris Berendsen's avatar
Floris Berendsen committed
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 *  Center and contributors
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0.txt
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 *=========================================================================*/

20
21
22
#ifndef selxItkSmoothingRecursiveGaussianImageFilterComponent_h
#define selxItkSmoothingRecursiveGaussianImageFilterComponent_h

23
#include "selxSuperElastixComponent.h"
24

25
26
27
#include "selxItkRegistrationMethodv4Interfaces.h"
#include "selxSinksAndSourcesInterfaces.h"

28
#include "itkSmoothingRecursiveGaussianImageFilter.h"
29
#include "itkImageSource.h"
30

31
32
namespace selx
{
33
34
35
template< int Dimensionality, class TPixel >
class ItkSmoothingRecursiveGaussianImageFilterComponent :
  public SuperElastixComponent<
36
37
  Accepting< itkImageInterface< Dimensionality, TPixel > >,
  Providing< itkImageInterface< Dimensionality, TPixel > >
38
39
40
  >
{
public:
41

42
  selxNewMacro( ItkSmoothingRecursiveGaussianImageFilterComponent, ComponentBase );
43

44
  // itkStaticConstMacro(Dimensionality, unsigned int, Dimensionality);
45

46
47
  ItkSmoothingRecursiveGaussianImageFilterComponent();
  virtual ~ItkSmoothingRecursiveGaussianImageFilterComponent();
48

49
50
  typedef TPixel PixelType;
  typedef itk::SmoothingRecursiveGaussianImageFilter< itk::Image< PixelType, Dimensionality >,
51
    itk::Image< PixelType, Dimensionality > > TheItkFilterType;
52
53
54
  typedef itk::Image< PixelType, Dimensionality > ItkImageType;
  typedef typename ItkImageType::Pointer
    ItkImagePointer;
55

56
  virtual int Set( itkImageInterface< Dimensionality, TPixel > * ) override;
57

58
  virtual ItkImagePointer GetItkImage() override;
59

60
61
62
63
64
65
66
67
  //virtual bool MeetsCriteria(const CriteriaType &criteria);
  virtual bool MeetsCriterion( const ComponentBase::CriterionType & criterion ) override;

  static const char * GetDescription() { return "ItkSmoothingRecursiveGaussianImageFilter Component"; }

private:

  typename TheItkFilterType::Pointer m_theItkFilter;
68

69
70
protected:

71
72
  // return the class name and the template arguments to uniquely identify this component.
  static inline const std::map< std::string, std::string > TemplateProperties()
73
  {
74
    return{ { keys::NameOfClass, "ItkSmoothingRecursiveGaussianImageFilterComponent" }, { keys::PixelType, PodString< TPixel >::Get() }, { keys::Dimensionality, std::to_string(Dimensionality) } };
75
  }
76
77
};

78
} //end namespace selx
79
80
81
#ifndef ITK_MANUAL_INSTANTIATION
#include "selxItkSmoothingRecursiveGaussianImageFilterComponent.hxx"
#endif
82
#endif // #define GDOptimizer3rdPartyComponent_h