ITK  4.6.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 
104 
105  void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId);
106 
107 
108  virtual const ImageRegionSplitterBase* GetImageRegionSplitter(void) const;
109 
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
Base class for recursive convolution with a kernel.
const TInputImage * GetInputImage(void)
NumericTraits< InputPixelType >::RealType RealType
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId)
void EnlargeOutputRequestedRegion(DataObject *output)
NumericTraits< InputPixelType >::ScalarRealType ScalarRealType
void FilterDataArray(RealType *outs, const RealType *data, RealType *scratch, unsigned int ln)
Base class for all process objects that output image data.
void SetInputImage(const TInputImage *)
void PrintSelf(std::ostream &os, Indent indent) const
virtual void SetUp(ScalarRealType spacing)=0
Divide an image region into several pieces.
virtual const ImageRegionSplitterBase * GetImageRegionSplitter(void) const
Get the image splitter to split the image for multi-threading.
InPlaceImageFilter< TInputImage, TOutputImage > Superclass
ImageRegionSplitterDirection::Pointer m_ImageRegionSplitter
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Define additional traits for native types such as int or float.
Base class for filters that take an image as input and overwrite that image as the output...
Base class for all data objects in ITK.
unsigned int ThreadIdType
Definition: itkIntTypes.h:159