/*======================================================================================

	Program:		Range Imaging Toolkit (RITK)
	Module:			ritkRImageSource.txx
	Version:		$Revision: 1761 $
	Date:			$Date: 2011-09-23 17:25:41 +0200 (Fr, 23 Sep 2011) $

	Copyright (c) 2010-2011
	Pattern Recognition Lab, 
    University Erlangen-Nuremberg, Germany
    All rights reserved.

	This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
	See RITKCopyright.txt for more information.

	http://www5.informatik.uni-erlangen.de/research/software/ritk

========================================================================================*/

#include "ritkRImageSource.h"


namespace ritk
{


//----------------------------------------------------------------------------
template<class TRImage>
RImageSource<TRImage>
::RImageSource()
{
	// We need no input
	this->SetNumberOfRequiredInputs(0);

	// We average over 10 passes
	SetNumberOfPassesToAverageRuntime(10);
}


//----------------------------------------------------------------------------
template<class TRImage>
RImageSource<TRImage>
::~RImageSource()
{
}


//----------------------------------------------------------------------------
template<class TRImage>
void
RImageSource<TRImage>
::GenerateOutputInformation()
{
	Superclass::GenerateOutputInformation();
}


//----------------------------------------------------------------------------
template<class TRImage>
void
RImageSource<TRImage>
::GenerateData()
{
	// Start timer
	StartTimer();

	// Allocate output
	this->GetOutput()->Allocate();

	// Call the creation routine
	GenerateRImage();

	// Stop timer
	StopTimer();
}

} // end namespace ritk
