Selaa lähdekoodia

Add ctkVTKSurfaceMaterialPropertyWidget

Control a vtkProperty object
Julien Finet 14 vuotta sitten
vanhempi
commit
6614302368

+ 3 - 0
Libs/Visualization/VTK/Widgets/CMakeLists.txt

@@ -32,6 +32,8 @@ SET(KIT_SRCS
   ctkVTKSliceView.cpp
   ctkVTKSliceView.h
   ctkVTKSliceView_p.h
+  ctkVTKSurfaceMaterialPropertyWidget.cpp
+  ctkVTKSurfaceMaterialPropertyWidget.h
   ctkVTKTextPropertyWidget.cpp
   ctkVTKTextPropertyWidget.h
   ctkVTKThumbnailView.cpp
@@ -47,6 +49,7 @@ SET(KIT_MOC_SRCS
   ctkVTKScalarBarWidget.h
   ctkVTKSliceView.h
   ctkVTKSliceView_p.h
+  ctkVTKSurfaceMaterialPropertyWidget.h
   ctkVTKTextPropertyWidget.h
   ctkVTKThumbnailView.h
   )

+ 3 - 0
Libs/Visualization/VTK/Widgets/Plugins/CMakeLists.txt

@@ -19,6 +19,8 @@ SET(PLUGIN_SRCS
   ctkVTKScalarBarWidgetPlugin.h
   ctkVTKSliceViewPlugin.cpp
   ctkVTKSliceViewPlugin.h
+  ctkVTKSurfaceMaterialPropertyWidgetPlugin.cpp
+  ctkVTKSurfaceMaterialPropertyWidgetPlugin.h
   ctkVTKTextPropertyWidgetPlugin.cpp
   ctkVTKTextPropertyWidgetPlugin.h
   )
@@ -30,6 +32,7 @@ SET(PLUGIN_MOC_SRCS
   ctkVTKRenderViewPlugin.h
   ctkVTKScalarBarWidgetPlugin.h
   ctkVTKSliceViewPlugin.h
+  ctkVTKSurfaceMaterialPropertyWidgetPlugin.h
   ctkVTKTextPropertyWidgetPlugin.h
   )
   

+ 62 - 0
Libs/Visualization/VTK/Widgets/Plugins/ctkVTKSurfaceMaterialPropertyWidgetPlugin.cpp

@@ -0,0 +1,62 @@
+/*=========================================================================
+
+  Library:   CTK
+
+  Copyright (c) Kitware Inc.
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.commontk.org/LICENSE
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+=========================================================================*/
+
+// CTK includes
+#include "ctkVTKSurfaceMaterialPropertyWidget.h"
+#include "ctkVTKSurfaceMaterialPropertyWidgetPlugin.h"
+
+//-----------------------------------------------------------------------------
+ctkVTKSurfaceMaterialPropertyWidgetPlugin::ctkVTKSurfaceMaterialPropertyWidgetPlugin(QObject *_parent):QObject(_parent)
+{
+}
+
+//-----------------------------------------------------------------------------
+QWidget *ctkVTKSurfaceMaterialPropertyWidgetPlugin::createWidget(QWidget *parentWidget)
+{
+  ctkVTKSurfaceMaterialPropertyWidget* newWidget =
+    new ctkVTKSurfaceMaterialPropertyWidget(parentWidget);
+  return newWidget;
+}
+
+//-----------------------------------------------------------------------------
+QString ctkVTKSurfaceMaterialPropertyWidgetPlugin::domXml() const
+{
+  return "<widget class=\"ctkVTKSurfaceMaterialPropertyWidget\" \
+          name=\"VTKTextProperty\">\n"
+          "</widget>\n";
+}
+
+//-----------------------------------------------------------------------------
+QString ctkVTKSurfaceMaterialPropertyWidgetPlugin::includeFile() const
+{
+  return "ctkVTKSurfaceMaterialPropertyWidget.h";
+}
+
+//-----------------------------------------------------------------------------
+bool ctkVTKSurfaceMaterialPropertyWidgetPlugin::isContainer() const
+{
+  return false;
+}
+
+//-----------------------------------------------------------------------------
+QString ctkVTKSurfaceMaterialPropertyWidgetPlugin::name() const
+{
+  return "ctkVTKSurfaceMaterialPropertyWidget";
+}

+ 43 - 0
Libs/Visualization/VTK/Widgets/Plugins/ctkVTKSurfaceMaterialPropertyWidgetPlugin.h

@@ -0,0 +1,43 @@
+/*=========================================================================
+
+  Library:   CTK
+
+  Copyright (c) Kitware Inc.
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.commontk.org/LICENSE
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+=========================================================================*/
+
+#ifndef __ctkVTKSurfaceMaterialPropertyWidgetPlugin_h
+#define __ctkVTKSurfaceMaterialPropertyWidgetPlugin_h
+
+// CTK includes
+#include "ctkVTKWidgetsAbstractPlugin.h"
+
+class CTK_VISUALIZATION_VTK_WIDGETS_PLUGINS_EXPORT ctkVTKSurfaceMaterialPropertyWidgetPlugin :
+  public QObject,
+  public ctkVTKWidgetsAbstractPlugin
+{
+  Q_OBJECT
+
+public:
+  ctkVTKSurfaceMaterialPropertyWidgetPlugin(QObject *_parent = 0);
+
+  QWidget *createWidget(QWidget *_parent);
+  QString domXml() const;
+  QString includeFile() const;
+  bool isContainer() const;
+  QString name() const;
+};
+
+#endif

+ 2 - 0
Libs/Visualization/VTK/Widgets/Plugins/ctkVTKWidgetsPlugins.h

@@ -32,6 +32,7 @@
 #include "ctkVTKScalarsToColorsViewPlugin.h"
 #endif
 #include "ctkVTKSliceViewPlugin.h"
+#include "ctkVTKSurfaceMaterialPropertyWidgetPlugin.h"
 #include "ctkVTKTextPropertyWidgetPlugin.h"
 
 /// \class Group the plugins in one library
@@ -52,6 +53,7 @@ public:
     plugins << new ctkVTKScalarsToColorsViewPlugin;
 #endif
     plugins << new ctkVTKSliceViewPlugin;
+    plugins << new ctkVTKSurfaceMaterialPropertyWidgetPlugin;
     plugins << new ctkVTKTextPropertyWidgetPlugin;
     return plugins;
     }

+ 2 - 0
Libs/Visualization/VTK/Widgets/Testing/Cpp/CMakeLists.txt

@@ -11,6 +11,7 @@ SET(TEST_SOURCES
   ctkTransferFunctionViewTest3.cpp
   ctkTransferFunctionViewTest4.cpp
   ctkTransferFunctionViewTest5.cpp
+  ctkVTKSurfaceMaterialPropertyWidgetTest1.cpp
   ctkVTKTextPropertyWidgetTest1.cpp
   ctkVTKThumbnailViewTest1.cpp
   )
@@ -75,6 +76,7 @@ IF (CTK_USE_CHARTS)
   SIMPLE_TEST( ctkVTKScalarsToColorsViewTest4 )
   SIMPLE_TEST( ctkVTKScalarsToColorsWidgetTest1 )
 ENDIF(CTK_USE_CHARTS)
+SIMPLE_TEST( ctkVTKSurfaceMaterialPropertyWidgetTest1 )
 SIMPLE_TEST( ctkVTKTextPropertyWidgetTest1 )
 SIMPLE_TEST( ctkVTKThumbnailViewTest1 )
 

+ 171 - 0
Libs/Visualization/VTK/Widgets/Testing/Cpp/ctkVTKSurfaceMaterialPropertyWidgetTest1.cpp

@@ -0,0 +1,171 @@
+/*=========================================================================
+
+  Library:   CTK
+
+  Copyright (c) Kitware Inc.
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.commontk.org/LICENSE
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+=========================================================================*/
+
+// Qt includes
+#include <QApplication>
+#include <QDebug>
+#include <QTimer>
+
+// CTK includes
+#include "ctkVTKSurfaceMaterialPropertyWidget.h"
+
+// VTK includes
+#include <vtkProperty.h>
+
+// STD includes
+#include <iostream>
+
+//-----------------------------------------------------------------------------
+int ctkVTKSurfaceMaterialPropertyWidgetTest1(int argc, char * argv [] )
+{
+  QApplication app(argc, argv);
+
+  ctkVTKSurfaceMaterialPropertyWidget propertyWidget(0);
+  
+  if (propertyWidget.isEnabled())
+    {
+    std::cerr << "No vtkProperty provided, should be disabled."
+              << std::endl;
+    return EXIT_FAILURE;
+    }
+  
+  vtkProperty* property = vtkProperty::New();
+  
+  double ambient = property->GetAmbient();
+  double diffuse = property->GetDiffuse();
+  double specular = property->GetSpecular();
+  double specularPower = property->GetSpecularPower();
+  
+  propertyWidget.setProperty(property);
+  property->Delete();
+  
+  if (propertyWidget.property() != property)
+    {
+    std::cerr << "ctkVTKSurfaceMaterialPropertyWidget::setProperty() failed."
+              << propertyWidget.property() << std::endl;
+    return EXIT_FAILURE;
+    }
+  
+  if (propertyWidget.ambient() != ambient)
+    {
+    std::cerr << "Wrong ambient: " << propertyWidget.ambient() << std::endl;
+    return EXIT_FAILURE;
+    }
+
+  if (propertyWidget.diffuse() != diffuse)
+    {
+    std::cerr << "Wrong diffuse: " << propertyWidget.diffuse() << std::endl;
+    return EXIT_FAILURE;
+    }
+
+  if (propertyWidget.specular() != specular)
+    {
+    std::cerr << "Wrong specular: " << propertyWidget.specular() << std::endl;
+    return EXIT_FAILURE;
+    }
+
+  if (propertyWidget.specularPower() != specularPower)
+    {
+    std::cerr << "Wrong specularPower: " << propertyWidget.specularPower() << std::endl;
+    return EXIT_FAILURE;
+    }
+
+  property->SetAmbient(0.5);
+
+  if (propertyWidget.ambient() != 0.5)
+    {
+    std::cerr << "vtkProperty::SetAmbient() failed: " << propertyWidget.ambient() << std::endl;
+    return EXIT_FAILURE;
+    }
+
+  // QColor handles floating points on 16bit integers
+  propertyWidget.setAmbient(0.8);
+  
+  if (property->GetAmbient() != 0.8)
+    {
+    std::cerr << "ctkVTKSurfaceMaterialPropertyWidget::setAmbient() failed: "
+              << property->GetAmbient() << std::endl;
+    return EXIT_FAILURE;
+    }
+
+  property->SetDiffuse(1.2);
+
+  if (propertyWidget.diffuse() != 1.)
+    {
+    std::cerr << "vtkProperty::SetDiffuse() failed: " << propertyWidget.diffuse() << std::endl;
+    return EXIT_FAILURE;
+    }
+
+  // QColor handles floating points on 16bit integers
+  propertyWidget.setDiffuse(0.3);
+  
+  if (property->GetDiffuse() != 0.3)
+    {
+    std::cerr << "ctkVTKSurfaceMaterialPropertyWidget::setDiffuse() failed: "
+              << property->GetDiffuse() << std::endl;
+    return EXIT_FAILURE;
+    }
+
+  property->SetSpecular(0.99);
+
+  if (propertyWidget.specular() != 0.99)
+    {
+    std::cerr << "vtkProperty::SetSpecular() failed: " << propertyWidget.specular() << std::endl;
+    return EXIT_FAILURE;
+    }
+
+  // QColor handles floating points on 16bit integers
+  propertyWidget.setSpecular(0.01);
+  
+  if (property->GetSpecular() != 0.01)
+    {
+    std::cerr << "ctkVTKSurfaceMaterialPropertyWidget::setSpecular() failed: "
+              << property->GetSpecular() << std::endl;
+    return EXIT_FAILURE;
+    }
+
+  property->SetSpecularPower(45);
+
+  if (propertyWidget.specularPower() != 45)
+    {
+    std::cerr << "vtkProperty::SetSpecularPower() failed: " << propertyWidget.specularPower() << std::endl;
+    return EXIT_FAILURE;
+    }
+
+  // QColor handles floating points on 16bit integers
+  propertyWidget.setSpecularPower(60);
+  
+  if (property->GetSpecularPower() != 50)
+    {
+    std::cerr << "ctkVTKSurfaceMaterialPropertyWidget::setSpecularPower() failed: "
+              << property->GetSpecularPower() << std::endl;
+    return EXIT_FAILURE;
+    }
+
+  propertyWidget.show();
+
+  if (argc < 2 || QString(argv[1]) != "-I" )
+    {
+    QTimer::singleShot(200, &app, SLOT(quit()));
+    }
+
+  return app.exec();
+}
+

+ 211 - 0
Libs/Visualization/VTK/Widgets/ctkVTKSurfaceMaterialPropertyWidget.cpp

@@ -0,0 +1,211 @@
+/*=========================================================================
+
+  Library:   CTK
+
+  Copyright (c) Kitware Inc.
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.commontk.org/LICENSE
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+=========================================================================*/
+
+// Qt includes
+#include <QDebug>
+
+// CTK includes
+#include "ctkVTKSurfaceMaterialPropertyWidget.h"
+
+// VTK includes
+#include <vtkSmartPointer.h>
+#include <vtkProperty.h>
+
+//-----------------------------------------------------------------------------
+class ctkVTKSurfaceMaterialPropertyWidgetPrivate
+{
+  Q_DECLARE_PUBLIC(ctkVTKSurfaceMaterialPropertyWidget);
+protected:
+  ctkVTKSurfaceMaterialPropertyWidget* const q_ptr;
+public:
+  ctkVTKSurfaceMaterialPropertyWidgetPrivate(ctkVTKSurfaceMaterialPropertyWidget& object);
+  vtkSmartPointer<vtkProperty> Property;
+  double                       SettingColor;
+};
+
+//-----------------------------------------------------------------------------
+ctkVTKSurfaceMaterialPropertyWidgetPrivate::ctkVTKSurfaceMaterialPropertyWidgetPrivate(ctkVTKSurfaceMaterialPropertyWidget& object)
+  :q_ptr(&object)
+{
+  this->SettingColor = false;
+}
+
+//-----------------------------------------------------------------------------
+ctkVTKSurfaceMaterialPropertyWidget::~ctkVTKSurfaceMaterialPropertyWidget()
+{
+}
+
+//-----------------------------------------------------------------------------
+ctkVTKSurfaceMaterialPropertyWidget::ctkVTKSurfaceMaterialPropertyWidget(QWidget* parentWidget)
+  : Superclass(parentWidget)
+  , d_ptr(new ctkVTKSurfaceMaterialPropertyWidgetPrivate(*this))
+{
+  this->updateFromProperty();
+}
+
+//-----------------------------------------------------------------------------
+ctkVTKSurfaceMaterialPropertyWidget::ctkVTKSurfaceMaterialPropertyWidget(vtkProperty* property, QWidget* parentWidget)
+  : Superclass(parentWidget)
+  , d_ptr(new ctkVTKSurfaceMaterialPropertyWidgetPrivate(*this))
+{
+  Q_D(ctkVTKSurfaceMaterialPropertyWidget);
+  this->setProperty(property);
+}
+
+//-----------------------------------------------------------------------------
+void ctkVTKSurfaceMaterialPropertyWidget::setProperty(vtkProperty* property)
+{
+  Q_D(ctkVTKSurfaceMaterialPropertyWidget);
+  if (d->Property.GetPointer() == property)
+    {
+    return;
+    }
+  qvtkReconnect(d->Property, property, vtkCommand::ModifiedEvent,
+                this, SLOT(updateFromProperty()));
+  d->Property = property;
+  this->updateFromProperty();
+}
+
+//-----------------------------------------------------------------------------
+vtkProperty* ctkVTKSurfaceMaterialPropertyWidget::property()const
+{
+  Q_D(const ctkVTKSurfaceMaterialPropertyWidget);
+  return d->Property.GetPointer();
+}
+
+//-----------------------------------------------------------------------------
+void ctkVTKSurfaceMaterialPropertyWidget::updateFromProperty()
+{
+  Q_D(ctkVTKSurfaceMaterialPropertyWidget);
+  this->setEnabled(d->Property.GetPointer() != 0);
+  if (d->Property.GetPointer() == 0 || d->SettingColor)
+    {
+    return;
+    }
+  double* c = d->Property->GetColor();
+  this->setColor(QColor::fromRgbF(qMin(c[0],1.), qMin(c[1], 1.), qMin(c[2],1.)));
+  this->setOpacity(d->Property->GetOpacity());
+  this->setAmbient(d->Property->GetAmbient());
+  this->setDiffuse(d->Property->GetDiffuse());
+  this->setSpecular(d->Property->GetSpecular());
+  this->setSpecularPower(d->Property->GetSpecularPower());
+}
+
+// --------------------------------------------------------------------------
+void ctkVTKSurfaceMaterialPropertyWidget::onColorChanged(const QColor& newColor)
+{
+  Q_D(ctkVTKSurfaceMaterialPropertyWidget);
+  this->Superclass::onColorChanged(newColor);
+  if (d->Property.GetPointer() != 0)
+    {
+    // the value might have changed since we fired the signal, use the current
+    // up-to-date value then.
+    const QColor c = this->color();
+    // Need to work around a VTK bug of SetColor() that fires event
+    // in an unstable state:
+    // d->Property->SetColor(c.redF(), c.greenF(), c.blueF());
+    d->SettingColor = true;
+    d->Property->SetAmbientColor(c.redF(), c.greenF(), c.blueF());
+    d->Property->SetDiffuseColor(c.redF(), c.greenF(), c.blueF());
+    d->Property->SetSpecularColor(c.redF(), c.greenF(), c.blueF());
+    d->SettingColor = false;
+    // update just in case something connected to the modified event of the
+    // vtkProperty modified any attribute
+    this->updateFromProperty();
+    }
+}
+
+// --------------------------------------------------------------------------
+void ctkVTKSurfaceMaterialPropertyWidget::onOpacityChanged(double newOpacity)
+{
+  Q_D(ctkVTKSurfaceMaterialPropertyWidget);
+  this->Superclass::onOpacityChanged(newOpacity);
+  if (d->Property.GetPointer() != 0)
+    {
+    // the value might have changed since we fired the signal, use the current
+    // up-to-date value then.
+    d->Property->SetOpacity(this->opacity());
+    }
+}
+
+// --------------------------------------------------------------------------
+void ctkVTKSurfaceMaterialPropertyWidget::onAmbientChanged(double newAmbient)
+{
+  Q_D(ctkVTKSurfaceMaterialPropertyWidget);
+  this->Superclass::onAmbientChanged(newAmbient);
+  if (d->Property.GetPointer() != 0)
+    {
+    // the value might have changed since we fired the signal, use the current
+    // up-to-date value then.
+    d->Property->SetAmbient(this->ambient());
+    }
+}
+
+// --------------------------------------------------------------------------
+void ctkVTKSurfaceMaterialPropertyWidget::onDiffuseChanged(double newDiffuse)
+{
+  Q_D(ctkVTKSurfaceMaterialPropertyWidget);
+  this->Superclass::onDiffuseChanged(newDiffuse);
+  if (d->Property.GetPointer() != 0)
+    {
+    // the value might have changed since we fired the signal, use the current
+    // up-to-date value then.
+    d->Property->SetDiffuse(this->diffuse());
+    }
+}
+
+// --------------------------------------------------------------------------
+void ctkVTKSurfaceMaterialPropertyWidget::onSpecularChanged(double newSpecular)
+{
+  Q_D(ctkVTKSurfaceMaterialPropertyWidget);
+  this->Superclass::onSpecularChanged(newSpecular);
+  if (d->Property.GetPointer() != 0)
+    {
+    // the value might have changed since we fired the signal, use the current
+    // up-to-date value then.
+    d->Property->SetSpecular(this->specular());
+    }
+}
+
+// --------------------------------------------------------------------------
+void ctkVTKSurfaceMaterialPropertyWidget::onSpecularPowerChanged(double newSpecularPower)
+{
+  Q_D(ctkVTKSurfaceMaterialPropertyWidget);
+  this->Superclass::onSpecularPowerChanged(newSpecularPower);
+  if (d->Property.GetPointer() != 0)
+    {
+    // the value might have changed since we fired the signal, use the current
+    // up-to-date value then.
+    d->Property->SetSpecularPower(this->specularPower());
+    }
+}
+
+// --------------------------------------------------------------------------
+void ctkVTKSurfaceMaterialPropertyWidget::onBackfaceCullingChanged(double newBackfaceCulling)
+{
+  Q_D(ctkVTKSurfaceMaterialPropertyWidget);
+  this->Superclass::onBackfaceCullingChanged(newBackfaceCulling);
+  if (d->Property.GetPointer() != 0)
+    {
+    // the value might have changed since we fired the signal, use the current
+    // up-to-date value then.
+    d->Property->SetBackfaceCulling(this->backfaceCulling());
+    }
+}

+ 69 - 0
Libs/Visualization/VTK/Widgets/ctkVTKSurfaceMaterialPropertyWidget.h

@@ -0,0 +1,69 @@
+/*=========================================================================
+
+  Library:   CTK
+
+  Copyright (c) Kitware Inc.
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.commontk.org/LICENSE
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+=========================================================================*/
+
+#ifndef __ctkVTKSurfaceMaterialPropertyWidget_h
+#define __ctkVTKSurfaceMaterialPropertyWidget_h
+
+// CTK includes
+#include <ctkMaterialPropertyWidget.h>
+#include "ctkVTKObject.h"
+#include "ctkVisualizationVTKWidgetsExport.h"
+
+class ctkVTKSurfaceMaterialPropertyWidgetPrivate;
+class vtkProperty;
+
+class CTK_VISUALIZATION_VTK_WIDGETS_EXPORT ctkVTKSurfaceMaterialPropertyWidget
+  : public ctkMaterialPropertyWidget
+{
+  Q_OBJECT;
+  QVTK_OBJECT;
+  typedef ctkMaterialPropertyWidget Superclass;
+
+public:
+  /// Constructors
+  ctkVTKSurfaceMaterialPropertyWidget(QWidget* parentWidget);
+  ctkVTKSurfaceMaterialPropertyWidget(vtkProperty* property, QWidget* parentWidget);
+  virtual ~ctkVTKSurfaceMaterialPropertyWidget();
+
+  vtkProperty* property()const;
+
+public slots:
+  void setProperty(vtkProperty* property);
+
+protected slots:
+  void updateFromProperty();
+
+protected:
+  QScopedPointer<ctkVTKSurfaceMaterialPropertyWidgetPrivate> d_ptr;
+
+  virtual void onColorChanged(const QColor& newColor);
+  virtual void onOpacityChanged(double newOpacity);
+  virtual void onAmbientChanged(double newAmbient);
+  virtual void onDiffuseChanged(double newDiffuse);
+  virtual void onSpecularChanged(double newSpecular);
+  virtual void onSpecularPowerChanged(double newSpecularPower);
+  virtual void onBackfaceCullingChanged(double newBackfaceCulling);
+
+private:
+  Q_DECLARE_PRIVATE(ctkVTKSurfaceMaterialPropertyWidget);
+  Q_DISABLE_COPY(ctkVTKSurfaceMaterialPropertyWidget);
+};
+
+#endif