19 #include <dtkCoreSupport/dtkAbstractData.h>
20 #include <dtkCoreSupport/dtkAbstractDataFactory.h>
38 return "axlFieldParametricVolumeWriter";
43 return "axlFieldParametricVolumeWriter";
48 return QStringList() <<
"axlFieldParametricVolume";
67 return !this->
accept(data);
74 QDomElement fieldElement = doc->createElement(
"field");
77 fieldElement.setAttribute(
"type", field->
identifier());
81 fieldElement.setAttribute(
"valueType",
"int");
83 fieldElement.setAttribute(
"valueType",
"float");
85 fieldElement.setAttribute(
"valueType",
"double");
91 fieldElement.setAttribute(
"support",
"point");
93 fieldElement.setAttribute(
"support",
"cell");
95 fieldElement.setAttribute(
"support",
"custom");
100 fieldElement.setAttribute(
"kind",
"scalar");
102 fieldElement.setAttribute(
"kind",
"vector");
104 fieldElement.setAttribute(
"kind",
"tensor");
109 qDebug() << Q_FUNC_INFO << field->
getFunction()->identifier();
111 qDebug() << Q_FUNC_INFO <<
"writer found for function";
112 QDomElement functionElement = function_writer->
write(doc, field->
getFunction());
113 fieldElement.appendChild(functionElement);
122 QDomElement axlFieldParametricVolumeWriter::elementByWriter(
axlAbstractDataWriter *axl_writer, QDomDocument *doc, dtkAbstractData *data)
129 if(!axl_writer->
accept(data))
132 element = axl_writer->
write(doc, data);
virtual QString identifier(void) const
Returns the identifier of the field "axlFieldParametricVolume".
QString identifier(void) const
virtual bool accept(dtkAbstractData *data)=0
axlFieldParametricVolumeWriter(void)
static bool registered(void)
QStringList handled(void) const
virtual Support support(void)
QDomElement write(QDomDocument *doc, dtkAbstractData *data)
~axlFieldParametricVolumeWriter(void)
bool reject(dtkAbstractData *data)
bool accept(dtkAbstractData *data)
virtual QDomElement write(QDomDocument *doc, dtkAbstractData *data)=0
Class axlFieldParametricVolume defines an API for field which owns a BSpline Volume.
axlAbstractData * getFunction(void)
Returns the Bspline function which determines the values of the parametric field. ...
QString description(void) const
dtkAbstractDataWriter * createaxlFieldParametricVolumeWriter(void)