#include "QuadVisualizationWidget.h"
#include "ritkDebugManager.h"


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

	m_RImageEntity0 = ritk::OpenGLRImageEntity::New();
	m_VisualizationUnit0->AddEntity(m_RImageEntity0);

	m_RImageEntity1 = ritk::OpenGLRImageEntity::New();
	m_VisualizationUnit1->AddEntity(m_RImageEntity1);

	m_RImageEntity2 = ritk::OpenGLRImageEntity::New();
	m_VisualizationUnit2->AddEntity(m_RImageEntity2);

	m_RImageEntity3 = ritk::OpenGLRImageEntity::New();
	m_VisualizationUnit3->AddEntity(m_RImageEntity3);
}


//----------------------------------------------------------------------------

QuadVisualizationWidget::~QuadVisualizationWidget()
{
}


//----------------------------------------------------------------------------

void QuadVisualizationWidget::UpdateGUI()
{	
}


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

	m_RImageEntity0->SetRangeData(Data);
	m_RImageEntity1->SetRangeData(Data);
	m_RImageEntity2->SetRangeData(Data);
	m_RImageEntity3->SetRangeData(Data);
	
	m_Mutex.unlock();
}
