ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkMiniPipelineSeparableImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkMiniPipelineSeparableImageFilter_h
19 #define itkMiniPipelineSeparableImageFilter_h
20 
21 #include "itkBoxImageFilter.h"
22 
23 namespace itk
24 {
49 template< typename TInputImage, typename TOutputImage, typename TFilter >
50 class ITK_TEMPLATE_EXPORT MiniPipelineSeparableImageFilter:
51  public BoxImageFilter< TInputImage, TOutputImage >
52 {
53 public:
59 
61  itkNewMacro(Self);
62 
66 
68  typedef TInputImage InputImageType;
69  typedef typename TInputImage::RegionType RegionType;
70  typedef typename TInputImage::SizeType SizeType;
72  typedef typename TInputImage::PixelType PixelType;
73  typedef typename TInputImage::OffsetType OffsetType;
74 
75  typedef TOutputImage OutputImageType;
76  typedef typename TOutputImage::PixelType OutputPixelType;
77 
78  typedef TFilter FilterType;
80 
82  itkStaticConstMacro(ImageDimension, unsigned int, TInputImage::ImageDimension);
83 
86 
87  virtual void SetRadius(const RadiusType &) ITK_OVERRIDE;
88 
89  virtual void SetRadius(const SizeValueType & radius) ITK_OVERRIDE
90  {
91  // needed because of the overloading of the method
92  Superclass::SetRadius(radius);
93  }
94 
95  virtual void Modified() const ITK_OVERRIDE;
96 
97  virtual void SetNumberOfThreads(ThreadIdType nb) ITK_OVERRIDE;
98 
99 protected:
101  ~MiniPipelineSeparableImageFilter() {}
102 
103  void GenerateData() ITK_OVERRIDE;
104 
105  typename FilterType::Pointer m_Filters[ImageDimension];
106  typename CastType::Pointer m_Cast;
107 
108 private:
109  ITK_DISALLOW_COPY_AND_ASSIGN(MiniPipelineSeparableImageFilter);
110 };
111 }
112 
113 #ifndef ITK_MANUAL_INSTANTIATION
114 #include "itkMiniPipelineSeparableImageFilter.hxx"
115 #endif
116 
117 #endif
Rank filter of a greyscale image.
Base class for all process objects that output image data.
unsigned long SizeValueType
Definition: itkIntTypes.h:143
CastImageFilter< InputImageType, OutputImageType > CastType
A base class for all the filters working on a box neighborhood.
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
TInputImage::SizeType RadiusType
BoxImageFilter< TInputImage, TOutputImage > Superclass
A separable filter for filter which are using radius.
Casts input pixels to output pixel type.