#include "VisualizationWidget.h"
#include "ritkOpenGLPointPickerLinearEntity.h"
#include "ritkOpenGLPointPickerPolygonEntity.h"
#include "ritkDebugManager.h"

//----------------------------------------------------------------------------
VisualizationWidget::VisualizationWidget()
{
	setupUi(this);

	m_RImageEntity = ritk::OpenGLRImageEntity::New();
	m_VisualizationUnit->SetPrimaryEntity(m_RImageEntity);
	m_PointPickerEntity = ritk::OpenGLPointPickerLinearEntity::New();
	m_VisualizationUnit->AddEntity(m_PointPickerEntity);
}


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


//----------------------------------------------------------------------------
void 
VisualizationWidget::UpdateGUI()
{	
}


//----------------------------------------------------------------------------
void 
VisualizationWidget::SetRangeData(ritk::RImageF2::ConstPointer Data)
{
	m_Mutex.lock();

	m_RImageEntity->SetRangeData(Data);
	
	m_Mutex.unlock();
}
