Newer
Older
#include "MantidVatesAPI/vtkDataSetToGeometry.h"
#include "MantidVatesAPI/FieldDataToMetadata.h"
#include "MantidVatesAPI/VatesXMLDefinitions.h"
#include<algorithm>
namespace Mantid
{
namespace VATES
{
/**
Peforms the processing associated with these transformations.
*/
void vtkDataSetToGeometry::execute()
{
FieldDataToMetadata convert;
Owen Arnold
committed
m_xmlToProcess = convert(m_dataSet->GetFieldData(), XMLDefinitions::metaDataId());
}
/**
Constructor
@param dataSet : vtkDataSet to process
*/
Owen Arnold
committed
vtkDataSetToGeometry::vtkDataSetToGeometry(vtkDataSet* dataSet) : m_dataSet(dataSet)
{
Owen Arnold
committed
//Format is to have DimensionSet as a nested element below MDInstructions.
SetRootNodeCheck(Mantid::Geometry::MDGeometryXMLDefinitions::workspaceGeometryElementName());
}
/**
Owen Arnold
committed
Destructor
*/
vtkDataSetToGeometry::~vtkDataSetToGeometry()
{
}
Owen Arnold
committed
/**
Copy constructor
*/
vtkDataSetToGeometry::vtkDataSetToGeometry(const vtkDataSetToGeometry& other) : MDGeometryXMLParser(other)
Owen Arnold
committed
,m_dataSet(other.m_dataSet)
{
}
/**
Assignment operator
@return ref to assigned object.
*/
vtkDataSetToGeometry& vtkDataSetToGeometry::operator=(const vtkDataSetToGeometry& other)
{
if(this != &other)
{
Owen Arnold
committed
m_dataSet = other.m_dataSet;
}
return *this;
}
}