18 #ifndef itkRecursiveSeparableImageFilter_h
19 #define itkRecursiveSeparableImageFilter_h
51 template<
typename TInputImage,
typename TOutputImage = TInputImage >
87 itkGetConstMacro(Direction,
unsigned int);
90 itkSetMacro(Direction,
unsigned int);
93 void SetInputImage(
const TInputImage *);
96 const TInputImage * GetInputImage();
101 void PrintSelf(std::ostream & os,
Indent indent)
const ITK_OVERRIDE;
104 void BeforeThreadedGenerateData() ITK_OVERRIDE;
106 void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread,
ThreadIdType threadId) ITK_OVERRIDE;
119 void EnlargeOutputRequestedRegion(
DataObject *output) ITK_OVERRIDE;
125 virtual
void SetUp(ScalarRealType spacing) = 0;
133 void FilterDataArray(RealType *outs, const RealType *data, RealType *scratch,
170 template <typename T1, typename T2>
171 inline
void MathEMAMAMAM(T1 &out,
172 const T1 &a1, const T2 &b1,
173 const T1 &a2, const T2 &b2,
174 const T1 &a3, const T2 &b3,
175 const T1 &a4, const T2 &b4 )
177 out = a1*b1 + a2*b2 + a3*b3 + a4*b4;
181 template <
typename T1,
typename T2>
188 const unsigned int sz = a1.
GetSize();
193 for (
unsigned int i = 0; i < sz; ++i)
195 out[i] = a1[i]*b1 + a2[i]*b2 + a3[i]*b3 + a4[i]*b4;
199 template <
typename T1,
typename T2>
201 const T1 &a1,
const T2 &b1,
202 const T1 &a2,
const T2 &b2,
203 const T1 &a3,
const T2 &b3,
204 const T1 &a4,
const T2 &b4 )
206 out -= a1*b1 + a2*b2 + a3*b3 + a4*b4;
209 template <
typename T1,
typename T2>
216 const unsigned int sz = a1.
GetSize();
221 for (
unsigned int i = 0; i < sz; ++i)
223 out[i] -= a1[i]*b1 + a2[i]*b2 + a3[i]*b3 + a4[i]*b4;
238 #ifndef ITK_MANUAL_INSTANTIATION
239 #include "itkRecursiveSeparableImageFilter.hxx"
TOutputImage OutputImageType
Base class for recursive convolution with a kernel.
void MathSMAMAMAM(VariableLengthVector< T1 > &out, const VariableLengthVector< T1 > &a1, const T2 &b1, const VariableLengthVector< T1 > &a2, const T2 &b2, const VariableLengthVector< T1 > &a3, const T2 &b3, const VariableLengthVector< T1 > &a4, const T2 &b4)
NumericTraits< InputPixelType >::RealType RealType
SmartPointer< const Self > ConstPointer
RecursiveSeparableImageFilter Self
TInputImage::ConstPointer InputImageConstPointer
NumericTraits< InputPixelType >::ScalarRealType ScalarRealType
SmartPointer< Self > Pointer
virtual ~RecursiveSeparableImageFilter() override
unsigned long SizeValueType
unsigned int GetSize(void) const
void MathSMAMAMAM(T1 &out, const T1 &a1, const T2 &b1, const T1 &a2, const T2 &b2, const T1 &a3, const T2 &b3, const T1 &a4, const T2 &b4)
Represents an array whose length can be defined at run-time.
TInputImage InputImageType
Divide an image region into several pieces.
InPlaceImageFilter< TInputImage, TOutputImage > Superclass
TInputImage::PixelType InputPixelType
unsigned int ThreadIdType
ImageRegionSplitterDirection::Pointer m_ImageRegionSplitter
void MathEMAMAMAM(VariableLengthVector< T1 > &out, const VariableLengthVector< T1 > &a1, const T2 &b1, const VariableLengthVector< T1 > &a2, const T2 &b2, const VariableLengthVector< T1 > &a3, const T2 &b3, const VariableLengthVector< T1 > &a4, const T2 &b4)
TInputImage::Pointer InputImagePointer
Control indentation during Print() invocation.
Define additional traits for native types such as int or float.
void SetSize(unsigned int sz, TReallocatePolicy reallocatePolicy, TKeepValuesPolicy keepValues)
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.
TOutputImage::RegionType OutputImageRegionType