ITK  4.2.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"
23 
24 namespace itk
25 {
49 template< typename TInputImage, typename TOutputImage = TInputImage >
51  public InPlaceImageFilter< TInputImage, TOutputImage >
52 {
53 public:
59 
62 
64  typedef typename TInputImage::Pointer InputImagePointer;
65  typedef typename TInputImage::ConstPointer InputImageConstPointer;
66 
72  typedef typename TInputImage::PixelType InputPixelType;
75 
76  typedef typename TOutputImage::RegionType OutputImageRegionType;
77 
79  typedef TInputImage InputImageType;
80 
82  typedef TOutputImage OutputImageType;
83 
85  itkGetConstMacro(Direction, unsigned int);
86 
88  itkSetMacro(Direction, unsigned int);
89 
91  void SetInputImage(const TInputImage *);
92 
94  const TInputImage * GetInputImage(void);
95 
96 protected:
99  void PrintSelf(std::ostream & os, Indent indent) const;
100 
102  void BeforeThreadedGenerateData();
103 
104  void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId);
105 
106  unsigned int SplitRequestedRegion(unsigned int i, unsigned int num, OutputImageRegionType & splitRegion);
107 
116  void EnlargeOutputRequestedRegion(DataObject *output);
117 
122  virtual void SetUp(ScalarRealType spacing) = 0;
123 
130  void FilterDataArray(RealType *outs, const RealType *data, RealType *scratch,
131  unsigned int ln);
132 
133 protected:
139 
147 
153 
160 
165 private:
166  RecursiveSeparableImageFilter(const Self &); //purposely not implemented
167  void operator=(const Self &); //purposely not implemented
168 
171  unsigned int m_Direction;
172 };
173 } // end namespace itk
174 
175 #ifndef ITK_MANUAL_INSTANTIATION
176 #include "itkRecursiveSeparableImageFilter.hxx"
177 #endif
178 
179 #endif
180