• KLOCZKO Thibaud's avatar
    Revert spurious dynamic_cast into different vtk types. · 16c38afd
    KLOCZKO Thibaud authored
    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.
    
    ```cpp
    vtkDataSet *data = vtkImageData::New();
    QVariant v = dtk::variantFromValue(data);
    QVERIFY(v.userType() == QMetaType::type("vtkImageData*"));
    ```
    16c38afd
Name
Last commit
Last update
..
dtkVisualizationViewer Loading commit data...
CMakeLists.txt Loading commit data...