45 mArgument.resize(descriptions.size());
46 mDescriptions = descriptions;
57 if (mArgument[index] == p)
62 disconnect(mArgument[index].
get(), SIGNAL(transformChanged()),
this, SIGNAL(
argumentsChanged()));
63 disconnect(mArgument[index].
get(), SIGNAL(propertiesChanged()),
this, SIGNAL(
argumentsChanged()));
70 connect(mArgument[index].
get(), SIGNAL(transformChanged()),
this, SIGNAL(
argumentsChanged()));
71 connect(mArgument[index].
get(), SIGNAL(propertiesChanged()),
this, SIGNAL(
argumentsChanged()));
79 return mArgument[index];
86 return mValidTypes.contains(p->getType());
91 return (
unsigned)mArgument.size();
96 return mDescriptions[index];
101 std::vector<Vector3D> p(this->
getCount());
102 for (
unsigned i = 0; i < p.size(); ++i)
106 return std::vector<Vector3D>();
114 std::vector<Transform3D> p(this->
getCount());
115 for (
unsigned i = 0; i < p.size(); ++i)
119 return std::vector<Transform3D>();
127 for (
unsigned i = 0; i < mArgument.size(); ++i)
130 dataNode.toElement().setAttribute(QString(
"p%1").arg(i), mArgument[i]->getUid());
136 for (
unsigned i = 0; i < mArgument.size(); ++i)
138 QString uid = dataNode.toElement().attribute(QString(
"p%1").arg(i),
"");
139 if (!data.count(uid))
141 this->
set(i, data.find(uid)->second);
148 for (
unsigned i = 0; i < mArgument.size(); ++i)
150 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
Base class for all Data Metrics.
virtual Vector3D getRefCoord() const =0
Namespace for all CustusX production code.