41 : mPatientModelService(patientModelService)
42 , mCylinderText(
"Cylinder")
44 , mSphereText(
"Sphere")
51 for (
unsigned i=0; i<mProperties.size(); ++i)
53 XmlOptionItem item(mProperties[i]->getUid(), dataNode.toElement());
60 for (
unsigned i=0; i<mProperties.size(); ++i)
62 XmlOptionItem item(mProperties[i]->getUid(), dataNode.toElement());
63 QVariant orgval = mProperties[i]->getValueAsVariant();
64 mProperties[i]->setValueFromVariant(item.readVariant(orgval));
68 void MeshTextureData::addProperty(
PropertyPtr property)
70 mProperties.push_back(property);
74 void MeshTextureData::initialize()
77 mTextureImage->setValueName(
"Texture image");
78 mTextureImage->setHelp(
"Select an imported 2D image to use as texture.");
79 mTextureImage->setOnly2DImagesFilter(
true);
80 this->addProperty(mTextureImage);
83 "The texture is applied in predefined geometric shapes. Select the shape which gives the best fit to your mesh.",
89 this->addProperty(mTextureShape);
92 this->addProperty(mScaleX);
95 this->addProperty(mScaleY);
98 this->addProperty(mPositionX);
101 this->addProperty(mPositionY);
104 this->addProperty(mRepeat);
119 return mCylinderText;
154 return mTextureImage;
159 return mTextureShape;
static BoolPropertyPtr initialize(const QString &uid, QString name, QString help, bool value, QDomNode root=QDomNode())
void writeVariant(const QVariant &val)
void parseXml(QDomNode &dataNode)
Utility class for describing a bounded numeric range.
DoublePropertyPtr getPositionY() const
QString getPlaneText() const
DoublePropertyPtr getScaleX() const
StringPropertySelectImagePtr getTextureImage() const
Helper class for storing one string value in an xml document.
DoublePropertyPtr getPositionX() const
boost::shared_ptr< class StringProperty > StringPropertyPtr
QString getSphereText() const
boost::shared_ptr< class Property > PropertyPtr
BoolPropertyPtr getRepeat() const
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
boost::shared_ptr< class StringPropertySelectImage > StringPropertySelectImagePtr
void changed()
emit when the underlying data value is changed: The user interface will be updated.
static StringPropertyPtr initialize(const QString &uid, QString name, QString help, QString value, QStringList range, QDomNode root=QDomNode())
boost::shared_ptr< class DoubleProperty > DoublePropertyPtr
MeshTextureData(PatientModelServicePtr patientModelService)
std::vector< PropertyPtr > getProperties() const
DoublePropertyPtr getScaleY() const
QString getCylinderText() const
void addXml(QDomNode &dataNode)
static DoublePropertyPtr initialize(const QString &uid, QString name, QString help, double value, DoubleRange range, int decimals, QDomNode root=QDomNode())
static StringPropertySelectImagePtr New(PatientModelServicePtr patientModelService)
boost::shared_ptr< class BoolProperty > BoolPropertyPtr
StringPropertyPtr getTextureShape() const
Namespace for all CustusX production code.