-
Notifications
You must be signed in to change notification settings - Fork 122
/
vtkDataSetToGeometry.cpp
64 lines (57 loc) · 1.65 KB
/
vtkDataSetToGeometry.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#include "MantidVatesAPI/vtkDataSetToGeometry.h"
#include "MantidVatesAPI/FieldDataToMetadata.h"
#include "MantidVatesAPI/VatesXMLDefinitions.h"
#include "MantidGeometry/MDGeometry/MDGeometryXMLDefinitions.h"
#include "vtkDataSet.h"
#include<algorithm>
using namespace Mantid::Geometry;
namespace Mantid
{
namespace VATES
{
/**
Peforms the processing associated with these transformations.
*/
void vtkDataSetToGeometry::execute()
{
FieldDataToMetadata convert;
m_xmlToProcess = convert(m_dataSet->GetFieldData(), XMLDefinitions::metaDataId());
return MDGeometryXMLParser::execute();
}
/**
Constructor
@param dataSet : vtkDataSet to process
*/
vtkDataSetToGeometry::vtkDataSetToGeometry(vtkDataSet* dataSet) : m_dataSet(dataSet)
{
//Format is to have DimensionSet as a nested element below MDInstructions.
SetRootNodeCheck(Mantid::Geometry::MDGeometryXMLDefinitions::workspaceGeometryElementName());
}
/**
Destructor
*/
vtkDataSetToGeometry::~vtkDataSetToGeometry()
{
}
/**
Copy constructor
*/
vtkDataSetToGeometry::vtkDataSetToGeometry(const vtkDataSetToGeometry& other) : MDGeometryXMLParser(other)
,m_dataSet(other.m_dataSet)
{
}
/**
Assignment operator
@return ref to assigned object.
*/
vtkDataSetToGeometry& vtkDataSetToGeometry::operator=(const vtkDataSetToGeometry& other)
{
if(this != &other)
{
MDGeometryXMLParser::operator=(other);
m_dataSet = other.m_dataSet;
}
return *this;
}
}
}