Mentions légales du service

Revert spurious dynamic_cast into different vtk types.

Merged KLOCZKO Thibaud requested to merge feature/vtk_in_qtmetatype into develop

In fact, cast operations on vtkDataSet subclasses contained in QVariant are OK provided that dtk::visualization::registerVTKToMetaType function is called before ask for conversions.

This function is embedded into the more generic dtk::visualization::initialize function that initializes the layer of visualization.

So for any application using dtkVisualization layer, one must initialize it using this function to ensure such cast operations.

Tests were added to check that the downcast from vtkDataSet to any subclasses is working even if a pointer of a vtkDataSet is given to the dtk::variantFromValue function.

vtkDataSet *data = vtkImageData::New();
QVariant v = dtk::variantFromValue(data);
QVERIFY(v.userType() == QMetaType::type("vtkImageData*"));

Merge request reports