21 #include <dtkCoreSupport/dtkAbstractData.h>
22 #include <dtkCoreSupport/dtkAbstractDataFactory.h>
23 #include <dtkCoreSupport/dtkAbstractProcessFactory.h>
41 return "axlFieldParametricSurfaceTangentVectorReader";
46 return "axlFieldParametricSurfaceTangentVectorReader";
51 return QStringList() <<
"axlFieldParametricSurfaceTangentVector";
61 QDomElement element = node.toElement();
63 if(element.tagName() !=
"field")
71 return !this->
accept(node);
79 QDomElement element = node.toElement();
83 QString type = element.attribute(
"type");
90 QString name = element.attribute(
"name");
93 field->setObjectName(name);
97 int number = node.childNodes().
size();
98 for(
int i = 0;i < number; i++){
99 QDomNode child = node.childNodes().at(i);
100 if(child.isElement() ){
104 if(!child.toElement().attribute(
"channel").isEmpty())
105 channel = child.toElement().attribute(
"channel").toInt();
107 if(!child.toElement().attribute(
"value").isEmpty())
108 value = child.toElement().attribute(
"value").toDouble();
110 qDebug() << Q_FUNC_INFO << channel << value;
127 if(!axl_reader->
accept(node))
130 axl_reader->dtkAbstractDataReader::read(this->file());
132 if(dtkAbstractData *data = axl_reader->
read(node))
dtkAbstractDataReader * createaxlFieldParametricSurfaceTangentVectorReader(void)
dtkAbstractData * dataByReader(axlAbstractDataReader *axl_reader, const QDomNode &node)
QString identifier(void) const
virtual void update(void)
static bool registered(void)
QStringList handled(void) const
virtual axlAbstractData * read(const QDomNode &node)=0
bool reject(const QDomNode &node)
QString description(void) const
bool accept(const QDomNode &node)
int size(void)
Returns the number of values evaluated for this BSpline field on each samples of the input BSpline...
Class axlFieldParametricSurfaceTangentVector defines an API for field which owns a BSpline Surface as...
void setParameter(double parameter, int channel)
Sets the direction parameter for the tangentVector.
axlAbstractData * read(const QDomNode &node)
virtual bool accept(const QDomNode &node)=0
axlFieldParametricSurfaceTangentVectorReader(void)
~axlFieldParametricSurfaceTangentVectorReader(void)
Class axlAbstractData defines an API for all type of axel data.