void ossimIndexToRgbLutFilter::setProperty(ossimRefPtr<ossimProperty> property) { if(property.valid()) { ossimString value = property->valueToString(); value = value.trim(); if(property->getName() == "LUT file") { setLut(ossimFilename(property->valueToString())); } else { ossimImageSourceFilter::setProperty(property); } } }
void vtkDataMeshInteractor::setupParameters() { d->parameters << this->opacityParameter(); if(!(d->metaDataSet->GetType() != vtkMetaDataSet::VTK_META_SURFACE_MESH && d->metaDataSet->GetType() != vtkMetaDataSet::VTK_META_VOLUME_MESH)) { d->LUTParam = new medStringListParameter("LUT", this); d->LUTParam->addItem("Default"); // TODO some LUT are missing for some attribute - RDE connect(d->LUTParam, SIGNAL(valueChanged(QString)), this, SLOT(setLut(QString))); d->LUTParam->setValue("Default"); d->parameters << d->LUTParam; d->attributesParam = new medStringListParameter("Attributes", this); QStringList nameList("Default"); for (int i = 0; i < d->metaDataSet->GetDataSet()->GetPointData()->GetNumberOfArrays(); i++) nameList << QString::fromUtf8(d->metaDataSet->GetDataSet()->GetPointData()->GetArrayName(i)); for (int i = 0; i < d->metaDataSet->GetDataSet()->GetCellData()->GetNumberOfArrays(); i++) nameList << QString::fromUtf8(d->metaDataSet->GetDataSet()->GetCellData()->GetArrayName(i)); for (int i = 0; i < d->metaDataSet->GetDataSet()->GetFieldData()->GetNumberOfArrays(); i++) nameList << QString::fromUtf8(d->metaDataSet->GetDataSet()->GetFieldData()->GetArrayName(i)); foreach(QString name, nameList) d->attributesParam->addItem(name); connect(d->attributesParam, SIGNAL(valueChanged(QString)), this, SLOT(setAttribute(QString))); d->attributesParam->setValue("Default"); d->parameters << d->attributesParam; } d->edgeVisibleParam = new medBoolParameter("Edge Visible", this); connect(d->edgeVisibleParam, SIGNAL(valueChanged(bool)), this, SLOT(setEdgeVisibility(bool))); d->edgeVisibleParam->setValue(false); d->parameters << d->edgeVisibleParam; d->colorParam = new medStringListParameter("Color", this); QStringList colors; colors << "#FFFFFF"; colors << "#808080"; colors << "#800000"; colors << "#804040"; colors << "#FF8080"; colors << "#FF0000"; colors << "#FFFF80"; colors << "#FFFF00"; colors << "#FF8040"; colors << "#FF8000"; colors << "#80FF80"; colors << "#80FF00"; colors << "#00FF00"; colors << "#80FFFF"; colors << "#00FFFF"; colors << "#004080"; colors << "#0000FF"; colors << "#0080FF"; colors << "#0080C0"; foreach(QString color, colors) d->colorParam->addItem(color, medStringListParameter::createIconFromColor(color)); connect(d->colorParam, SIGNAL(valueChanged(QString)), this, SLOT(setColor(QString))); d->colorParam->setValue("#FFFFFF"); d->parameters << d->colorParam; d->renderingParam = new medStringListParameter("Rendering", this); d->renderingParam->addItem("WireFrame"); d->renderingParam->addItem("Surface"); d->renderingParam->addItem("Points"); connect(d->renderingParam, SIGNAL(valueChanged(QString)), this, SLOT(setRenderingType(QString))); d->renderingParam->setValue("Surface"); d->parameters << d->renderingParam; d->slicingParameter = new medIntParameter("Slicing", this); connect(d->slicingParameter, SIGNAL(valueChanged(int)), this, SLOT(moveToSlice(int))); connect(d->view->positionBeingViewedParameter(), SIGNAL(valueChanged(QVector3D)), this, SLOT(updateSlicingParam())); d->parameters << this->visibiltyParameter(); this->updateWidgets(); }