18#include <vtkProperty.h>
19#include <vtkTexture.h>
46 for (
auto& row :
_lut)
55 const QString& array_name)
57 auto it =
_lut.find(array_name);
68 auto it =
_lut.find(array_name);
81 if (array_name.length() > 0)
84 _lut.insert(std::pair<QString, vtkLookupTable*>(array_name, lut));
90 const QString& filename)
100 ERR(
"Error reading color look-up table.");
116 ERR(
"Not a valid property: {:s}", name.toStdString());
128 ERR(
"Not a valid property: {:s}", name.toStdString());
129 return QList<QVariant>();
134 if (name.contains(
"Solid Color") || name.contains(
"P-TextureCoordinates"))
void ERR(fmt::format_string< Args... > fmt, Args &&... args)
Definition of the VtkAlgorithmProperties class.
Definition of the VtkColorLookupTable class.
Definition of the XmlLutReader class.
static bool readFromFile(const QString &fileName, DataHolderLib::ColorLookupTable &lut)
vtkLookupTable * GetLookupTable(const QString &array_name)
Returns the colour lookup table (if one has been assigned).
QMap< QString, QList< QVariant > > * _algorithmUserVectorProperties
void ScalarVisibilityChanged(bool on)
void SetActiveAttribute(QString name)
Set the active attribute.
void SetScalarVisibility(bool on)
Sets the scalar visibility.
void SetLookUpTable(const QString &array_name, vtkLookupTable *lut)
Sets a colour lookup table for the given scalar array of the VtkVisPipelineItem.
std::map< QString, vtkLookupTable * > _lut
QVariant GetUserProperty(QString name) const
Returns the value of a user property.
QString _activeAttributeName
void RemoveLookupTable(const QString &array_name)
Removes the lookup table for the given scalar.
QList< QVariant > GetUserVectorProperty(QString name) const
Returns a list of values of a vector user property.
VtkAlgorithmProperties(QObject *parent=nullptr)
Constructor (sets default values)
QMap< QString, QVariant > * _algorithmUserProperties
~VtkAlgorithmProperties() override
Calculates and stores a colour lookup table.
void setLookupTable(DataHolderLib::ColorLookupTable const &lut)
Imports settings of OGS lookup table class.
static VtkColorLookupTable * New()
Create new objects with New() because of VTKs object reference counting.