ITK  4.4.0
Insight Segmentation and Registration Toolkit
itkRecursiveSeparableImageFilter.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 __itkRecursiveSeparableImageFilter_h
19 #define __itkRecursiveSeparableImageFilter_h
20 
21 #include "itkInPlaceImageFilter.h"
22 #include "itkNumericTraits.h"
24 
25 namespace itk
26 {
50 template< typename TInputImage, typename TOutputImage = TInputImage >
52  public InPlaceImageFilter< TInputImage, TOutputImage >
53 {
54 public:
60 
63 
65  typedef typename TInputImage::Pointer InputImagePointer;
66  typedef typename TInputImage::ConstPointer InputImageConstPointer;
67 
73  typedef typename TInputImage::PixelType InputPixelType;
76 
77  typedef typename TOutputImage::RegionType OutputImageRegionType;
78 
80  typedef TInputImage InputImageType;
81 
83  typedef TOutputImage OutputImageType;
84 
86  itkGetConstMacro(Direction, unsigned int);
87 
89  itkSetMacro(Direction, unsigned int);
90 
92  void SetInputImage(const TInputImage *);
93 
95  const TInputImage * GetInputImage(void);
96 
97 protected:
100  void PrintSelf(std::ostream & os, Indent indent) const;
101 
103  void BeforeThreadedGenerateData();
104 
105  void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId);
106 
107 
108  virtual const ImageRegionSplitterBase* GetImageRegionSplitter(void) const;
109 
118  void EnlargeOutputRequestedRegion(DataObject *output);
119 
124  virtual void SetUp(ScalarRealType spacing) = 0;
125 
132  void FilterDataArray(RealType *outs, const RealType *data, RealType *scratch,
133  unsigned int ln);
134 
135 protected:
141 
149 
155 
162 
167 
168 private:
169  RecursiveSeparableImageFilter(const Self &); //purposely not implemented
170  void operator=(const Self &); //purposely not implemented
171 
174  unsigned int m_Direction;
175 
177 };
178 } // end namespace itk
179 
180 #ifndef ITK_MANUAL_INSTANTIATION
181 #include "itkRecursiveSeparableImageFilter.hxx"
182 #endif
183 
184 #endif
185