#include "ritkCore.h"

#include "CUDATemporalAveragingRImageFilter.txx"
#include "CUDATemporalAveragingImageFilter.txx"



// CUDA interface for element-wise addition: Accu[i] += Data[i]
//----------------------------------------------------------------------------
void AddData(float3 *Accu, uchar3 *Data, unsigned long Num);
void AddData(itk::Vector<float,3> *Accu, itk::Vector<unsigned char,3> *Data, unsigned long Num)
{
	AddData((float3*)Accu, (uchar3*)Data, Num);
}

// CUDA interface for element-wise subtraction: Accu[i] -= Data[i]
//----------------------------------------------------------------------------
void SubData(float3 *Accu, uchar3 *Data, unsigned long Num);
void SubData(itk::Vector<float,3> *Accu, itk::Vector<unsigned char,3> *Data, unsigned long Num)
{
	SubData((float3*)Accu, (uchar3*)Data, Num);
}

// CUDA interface for scalar multiplication: Output[i] = Scalar*Input[i]
//----------------------------------------------------------------------------
void ScalarMulData(uchar3 *Output, float3 *Input, float Scalar, unsigned long Num);
void ScalarMulData(itk::Vector<unsigned char,3> *Output, itk::Vector<float,3> *Input, float Scalar, unsigned long Num)
{
	ScalarMulData((uchar3*)Output, (float3*)Input, Scalar, Num);
}

// CUDA interface for the recursive implementation
//----------------------------------------------------------------------------
void SlidingWindowTemporalAveraging(uchar3 *Output, float3 *Accu, uchar3 *AddData, uchar3 *SubData, float Scale, unsigned long Num);
void SlidingWindowTemporalAveraging(itk::Vector<unsigned char,3> *Output, itk::Vector<float,3> *Accu, itk::Vector<unsigned char,3> *AddData, itk::Vector<unsigned char,3> *SubData, float Scale, unsigned long Num)
{
	SlidingWindowTemporalAveraging((uchar3*)Output, (float3*)Accu, (uchar3*)AddData, (uchar3*)SubData, Scale, Num);
}



template class Q_DECL_EXPORT CUDATemporalAveragingRImageFilter<ritk::RImageF2, ritk::RGBRImageUCF2>;
template class Q_DECL_EXPORT CUDATemporalAveragingImageFilter<ritk::RImageF2::RangeImageType>;
template class Q_DECL_EXPORT CUDATemporalAveragingImageFilter<ritk::RGBRImageUCF2::RGBImageType, ritk::RGBRImageUCF2::RGBImageType, itk::Image<itk::Vector<float,3>,2> >;
