24 mArgument.resize(descriptions.size());
25 mDescriptions = descriptions;
36 if (mArgument[index] == p)
41 disconnect(mArgument[index].
get(), SIGNAL(transformChanged()),
this, SIGNAL(
argumentsChanged()));
42 disconnect(mArgument[index].
get(), SIGNAL(propertiesChanged()),
this, SIGNAL(
argumentsChanged()));
49 connect(mArgument[index].
get(), SIGNAL(transformChanged()),
this, SIGNAL(
argumentsChanged()));
50 connect(mArgument[index].
get(), SIGNAL(propertiesChanged()),
this, SIGNAL(
argumentsChanged()));
58 return mArgument[index];
65 return mValidTypes.contains(p->getType());
70 return (
unsigned)mArgument.size();
75 return mDescriptions[index];
80 std::vector<Vector3D> p(this->
getCount());
81 for (
unsigned i = 0; i < p.size(); ++i)
85 return std::vector<Vector3D>();
93 std::vector<Transform3D> p(this->
getCount());
94 for (
unsigned i = 0; i < p.size(); ++i)
98 return std::vector<Transform3D>();
106 for (
unsigned i = 0; i < mArgument.size(); ++i)
109 dataNode.toElement().setAttribute(QString(
"p%1").arg(i), mArgument[i]->getUid());
115 for (
unsigned i = 0; i < mArgument.size(); ++i)
117 QString uid = dataNode.toElement().attribute(QString(
"p%1").arg(i),
"");
118 if (!data.count(uid))
120 this->
set(i, data.find(uid)->second);
127 for (
unsigned i = 0; i < mArgument.size(); ++i)
129 retval += mArgument[i]->getUid();
QString getAsSingleLineString() const
boost::shared_ptr< DataMetric > DataMetricPtr
virtual void parseXml(QDomNode &dataNode, const std::map< QString, DataPtr > &data)
std::vector< Transform3D > getRefFrames() const
bool validArgument(DataPtr p) const
virtual void addXml(QDomNode &dataNode)
boost::shared_ptr< class Data > DataPtr
QString getDescription(int index) const
void set(int index, DataPtr p)
void setValidArgumentTypes(QStringList types)
std::vector< Vector3D > getRefCoords() const
virtual Transform3D getRefFrame() const
MetricReferenceArgumentList(QStringList descriptions)
unsigned getCount() const
static QString getTypeName()
Base class for all Data Metrics.
virtual Vector3D getRefCoord() const =0
Namespace for all CustusX production code.