#ifndef	CUDAMEDIANIMAGEFILTERPLUGIN_H__
#define CUDAMEDIANIMAGEFILTERPLUGIN_H__

#include "ritkFilterPlugin.h"

#include "RangeCUDAMedianImageFilter.h"
#include "CUDAMedianFilterWidget.h"

#include <QMutex>

/**	@class	CUDAMedianImageFilterPlugin
 *	@author	Jakob Wasza
 *	@brief	Plugin that provides a median filter using CUDA for range images
 *
 *	@details
 *	This class provides a median filter using CUDA for range images.
 */
class CUDAMedianImageFilterPlugin : public ritk::FilterPlugin
{
	Q_OBJECT

public:
	/// Constructor
	CUDAMedianImageFilterPlugin();
	/// Destructor
	~CUDAMedianImageFilterPlugin();

	/// Return the description for this plugin
	QString GetDescription();

	/// Return the GUI for this plugin @sa PluginBase::GetPluginGUI()
	QWidget *GetPluginGUI();

protected:
	/// Needs to be implemented: Returns the filter
	FilterPointer GetFilter();

protected slots:
	/// Set the radius of the filter
	void SetRadius(unsigned int Radius);


protected:
	/// The kernel radius
	unsigned int m_Radius;

	/**	@name	The actual filter */
	//@{
	typedef RangeCUDAMedianImageFilter<ritk::RImageF2> CUDAMedianFilterType;
	typedef CUDAMedianFilterType::Pointer CUDAMedianFilterPointer;
	/// The filter
	CUDAMedianFilterPointer m_Filter;
	//@}

	/// The widget
	CUDAMedianFilterWidget *m_Widget;
};




#endif // CUDAMEDIANIMAGEFILTERPLUGIN_H__
