21 #include <dtkCoreSupport/dtkAbstractData.h>
22 #include <dtkCoreSupport/dtkAbstractDataFactory.h>
23 #include <dtkCoreSupport/dtkAbstractProcessFactory.h>
41 return "axlFieldParametricVolumeTangentVectorReader";
46 return "axlFieldParametricVolumeTangentVectorReader";
51 return QStringList() <<
"axlFieldParametricVolumeTangentVector";
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);
98 int number = node.childNodes().
size();
99 for(
int i = 0;i < number; i++){
100 QDomNode child = node.childNodes().at(i);
101 if(child.isElement() ){
105 if(!child.toElement().attribute(
"channel").isEmpty())
106 channel = child.toElement().attribute(
"channel").toInt();
108 if(!child.toElement().attribute(
"value").isEmpty())
109 value = child.toElement().attribute(
"value").toDouble();
111 qDebug() << Q_FUNC_INFO << channel << value;
128 if(!axl_reader->
accept(node))
131 axl_reader->dtkAbstractDataReader::read(this->file());
133 if(dtkAbstractData *data = axl_reader->
read(node))
dtkAbstractDataReader * createaxlFieldParametricVolumeTangentVectorReader(void)
virtual void update(void)
dtkAbstractData * dataByReader(axlAbstractDataReader *axl_reader, const QDomNode &node)
void setParameter(double parameter, int channel)
Sets the direction parameter for the tangentVector.
~axlFieldParametricVolumeTangentVectorReader(void)
int size(void)
Returns the number of values evaluated for this BSpline field on each samples of the input BSpline...
axlAbstractData * read(const QDomNode &node)
bool accept(const QDomNode &node)
virtual axlAbstractData * read(const QDomNode &node)=0
QString identifier(void) const
QString description(void) const
virtual bool accept(const QDomNode &node)=0
static bool registered(void)
QStringList handled(void) const
axlFieldParametricVolumeTangentVectorReader(void)
bool reject(const QDomNode &node)
Class axlAbstractData defines an API for all type of axel data.
Class axlFieldParametricVolumeTangentVector defines an API for field which owns a BSpline Surface as ...