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

	Program:		Range Imaging Toolkit (RITK)
	Module:			ritkImageTypePlugin.h
	Version:		$Revision: 2774 $
	Date:			$Date: 2012-03-13 10:52:35 +0100 (Di, 13 Mrz 2012) $

	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 "ritkImageTypePlugin.h"


namespace ritk
{

//----------------------------------------------------------------------------
ImageTypePlugin::ImageTypePlugin()
{
}


//----------------------------------------------------------------------------
ImageTypePlugin::~ImageTypePlugin()
{
}


//----------------------------------------------------------------------------
bool
ImageTypePlugin::StartPlugin(void*)
{
	RImageIOManagerF2::RImageIOBaseType::Pointer Tmp = GetIOObject();

	if ( Tmp )
	{
		ritk::RImageIOManager<ritk::RImageF2>::GetInstance().RegisterIOObject(Tmp);
		return true;
	}
	return false;
}


//----------------------------------------------------------------------------
bool
ImageTypePlugin::StopPlugin()
{
	RImageIOManagerF2::RImageIOBaseType::Pointer Tmp = GetIOObject();

	if ( Tmp )
	{
		ritk::RImageIOManager<ritk::RImageF2>::GetInstance().UnRegisterIOObject(Tmp);
		return true;
	}
	return false;
}



}