24 #include <dtkCoreSupport/dtkAbstractData.h>
25 #include <dtkCoreSupport/dtkAbstractDataFactory.h>
26 #include <dtkCoreSupport/dtkAbstractProcessFactory.h>
45 return "axlFieldSpatialPointDistanceReader";
50 return "axlFieldSpatialPointDistanceReader";
55 return QStringList() <<
"axlAbstractField" <<
"axlFieldSpatialPointDistance";
65 QDomElement element = node.toElement();
67 if(element.tagName() !=
"field")
75 return !this->
accept(node);
83 QDomElement element = node.toElement();
87 QString type = element.attribute(
"type");
94 QString name = element.attribute(
"name");
97 field->setObjectName(name);
102 QDomNode child = element.elementsByTagName(
"input").at(0);
103 if(child.isElement() ){
108 QString xcoordinate = child.toElement().attribute(
"xcoordinate");
109 if(!xcoordinate.isEmpty()){
110 x = xcoordinate.toDouble();
113 QString ycoordinate = child.toElement().attribute(
"ycoordinate");
114 if(!ycoordinate.isEmpty()){
115 y = ycoordinate.toDouble();
118 QString zcoordinate = child.toElement().attribute(
"zcoordinate");
119 if(!zcoordinate.isEmpty()){
120 z = zcoordinate.toDouble();
139 if(!axl_reader->
accept(node))
142 axl_reader->dtkAbstractDataReader::read(this->file());
144 if(dtkAbstractData *data = axl_reader->
read(node))
virtual void update(void)
QStringList handled(void) const
static bool registered(void)
bool reject(const QDomNode &node)
axlAbstractData * read(const QDomNode &node)
dtkAbstractDataReader * createaxlFieldSpatialPointDistanceReader(void)
QString identifier(void) const
axlFieldSpatialPointDistanceReader(void)
virtual axlAbstractData * read(const QDomNode &node)=0
QString description(void) const
~axlFieldSpatialPointDistanceReader(void)
Class axlFieldSpatialPointDistance defines an API for spatial field.
virtual bool accept(const QDomNode &node)=0
dtkAbstractData * dataByReader(axlAbstractDataReader *axl_reader, const QDomNode &node)
void setParameter(double data, int channel)
Sets the reference point.
Class axlAbstractData defines an API for all type of axel data.
bool accept(const QDomNode &node)