From 8640df0fbf1f5502b9ced73a40110691018343bc Mon Sep 17 00:00:00 2001
From: Lars Bilke <lars.bilke@ufz.de>
Date: Thu, 2 Jun 2016 08:38:15 +0200
Subject: [PATCH] Removed obsolete VtkOsgConverter functionality.

---
 .gitmodules                                   |   2 +-
 Applications/DataExplorer/CMakeLists.txt      |   5 -
 Applications/DataExplorer/DataExplorer.cmake  |   7 -
 .../DataExplorer/DataView/CMakeLists.txt      |   4 -
 Applications/DataExplorer/DataView/MshView.h  |   2 +-
 .../DataExplorer/VtkVis/CMakeLists.txt        |   9 +-
 .../DataExplorer/VtkVis/VtkVisImageItem.h     |   3 -
 .../VtkVis/VtkVisPipelineItem.cpp             |  28 +--
 .../DataExplorer/VtkVis/VtkVisPipelineItem.h  |   3 -
 .../VtkVis/VtkVisPipelineView.cpp             |  19 --
 .../DataExplorer/VtkVis/VtkVisPipelineView.h  |   3 -
 .../DataExplorer/VtkVis/VtkVisPointSetItem.h  |   3 -
 Applications/DataExplorer/main.cpp            |   9 -
 Applications/DataExplorer/mainwindow.cpp      |  47 +---
 Applications/DataExplorer/mainwindow.h        |   1 -
 Applications/DataExplorer/mainwindow.ui       |   9 -
 .../Utils/FileConverter/ConvertVtkToOsg.cpp   | 206 ------------------
 ThirdParty/CMakeLists.txt                     |   6 -
 ThirdParty/VtkFbxConverter                    |   2 +-
 19 files changed, 6 insertions(+), 362 deletions(-)
 delete mode 100644 Applications/Utils/FileConverter/ConvertVtkToOsg.cpp

diff --git a/.gitmodules b/.gitmodules
index 1c31abd911c..243111fedb5 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,6 +1,6 @@
 [submodule "ThirdParty/VtkFbxConverter"]
 	path = ThirdParty/VtkFbxConverter
-	url = git://github.com/ufz-vislab/VtkFbxConverter.git
+	url = https://github.com/ufz-vislab/VtkFbxConverter.git
 [submodule "ThirdParty/tetgen"]
 	path = ThirdParty/tetgen
 	url = https://github.com/ufz/tetgen.git
diff --git a/Applications/DataExplorer/CMakeLists.txt b/Applications/DataExplorer/CMakeLists.txt
index f50a780e5e1..4d04c84c450 100644
--- a/Applications/DataExplorer/CMakeLists.txt
+++ b/Applications/DataExplorer/CMakeLists.txt
@@ -7,11 +7,6 @@ if(VTKFBXCONVERTER_FOUND)
     include_directories(${VTKFBXCONVERTER_INCLUDE_DIRS})
 endif()
 
-if(VTKOSGCONVERTER_FOUND)
-    add_definitions(-DVTKOSGCONVERTER_FOUND)
-    include_directories(${VTKOSGCONVERTER_INCLUDE_DIRS})
-endif()
-
 set(CMAKE_AUTOMOC TRUE)
 set(CMAKE_AUTOUIC TRUE)
 set(CMAKE_AUTORCC TRUE)
diff --git a/Applications/DataExplorer/DataExplorer.cmake b/Applications/DataExplorer/DataExplorer.cmake
index e1f69fb7874..074582ca08d 100644
--- a/Applications/DataExplorer/DataExplorer.cmake
+++ b/Applications/DataExplorer/DataExplorer.cmake
@@ -93,13 +93,6 @@ if(MSVC)
     target_link_libraries(DataExplorer winmm)
 endif()
 
-### OpenSG support ###
-if (VTKOSGCONVERTER_FOUND)
-    USE_OPENSG(DataExplorer)
-    include_directories(${VTKOSGCONVERTER_INCLUDE_DIRS})
-    target_link_libraries(DataExplorer ${VTKOSGCONVERTER_LIBRARIES})
-endif ()
-
 if(VTKFBXCONVERTER_FOUND)
     target_link_libraries(DataExplorer ${VTKFBXCONVERTER_LIBRARIES})
 endif()
diff --git a/Applications/DataExplorer/DataView/CMakeLists.txt b/Applications/DataExplorer/DataView/CMakeLists.txt
index 31f5a0932b7..714b20455dd 100644
--- a/Applications/DataExplorer/DataView/CMakeLists.txt
+++ b/Applications/DataExplorer/DataView/CMakeLists.txt
@@ -117,10 +117,6 @@ include_directories(
     ${GUI_SOURCE_DIR_REL}/VtkVis
 )
 
-if(VTKOSGCONVERTER_FOUND)
-    include_directories(${VTKOSGCONVERTER_INCLUDE_DIRS})
-endif()
-
 if(GEOTIFF_FOUND)
     include_directories(${GEOTIFF_INCLUDE_DIRS})
 endif() # GEOTIFF_FOUND
diff --git a/Applications/DataExplorer/DataView/MshView.h b/Applications/DataExplorer/DataView/MshView.h
index 22f8631199a..4ca6e407952 100644
--- a/Applications/DataExplorer/DataView/MshView.h
+++ b/Applications/DataExplorer/DataView/MshView.h
@@ -31,7 +31,7 @@ namespace InSituLib {
 
 /**
  *    The DataView is table view which acts as a base class for displaying
- *  several OSG data formats.
+ *  several OGS data formats.
  */
 class MshView : public QTreeView
 {
diff --git a/Applications/DataExplorer/VtkVis/CMakeLists.txt b/Applications/DataExplorer/VtkVis/CMakeLists.txt
index e0a717103df..28dff79f988 100644
--- a/Applications/DataExplorer/VtkVis/CMakeLists.txt
+++ b/Applications/DataExplorer/VtkVis/CMakeLists.txt
@@ -127,12 +127,5 @@ if(GEOTIFF_FOUND)
     target_link_libraries(VtkVis ${GEOTIFF_LIBRARIES})
 endif() # GEOTIFF_FOUND
 
-target_link_libraries(VtkVis Qt4::QtGui QtDataView)
-target_link_libraries(VtkVis VtkAct)
-
-if(VTKOSGCONVERTER_FOUND)
-    USE_OPENSG(VtkVis)
-    include_directories(${VTKOSGCONVERTER_INCLUDE_DIRS})
-endif()
-
+target_link_libraries(VtkVis Qt4::QtGui QtDataView VtkAct)
 set_property(TARGET VtkVis PROPERTY FOLDER "DataExplorer")
diff --git a/Applications/DataExplorer/VtkVis/VtkVisImageItem.h b/Applications/DataExplorer/VtkVis/VtkVisImageItem.h
index cbf864c22b9..c7653707b0d 100644
--- a/Applications/DataExplorer/VtkVis/VtkVisImageItem.h
+++ b/Applications/DataExplorer/VtkVis/VtkVisImageItem.h
@@ -24,8 +24,6 @@ class vtkPointSet;
 class vtkProp3D;
 class vtkRenderer;
 
-class vtkOsgActor;
-
 class VtkAlgorithmProperties;
 class VtkCompositeFilter;
 
@@ -68,4 +66,3 @@ private:
 };
 
 #endif // VTKVISIMAGEITEM_H
-
diff --git a/Applications/DataExplorer/VtkVis/VtkVisPipelineItem.cpp b/Applications/DataExplorer/VtkVis/VtkVisPipelineItem.cpp
index c05580d91e9..10ddee626f7 100644
--- a/Applications/DataExplorer/VtkVis/VtkVisPipelineItem.cpp
+++ b/Applications/DataExplorer/VtkVis/VtkVisPipelineItem.cpp
@@ -34,11 +34,6 @@
 
 #include <QMessageBox>
 
-#ifdef VTKOSGCONVERTER_FOUND
-#include "vtkOsgConverter.h"
-#include <OpenSG/OSGSceneFileHandler.h>
-#endif
-
 #ifdef VTKFBXCONVERTER_FOUND
 #include "ThirdParty/VtkFbxConverter/VtkFbxConverter.h"
 #include "Common.h"
@@ -119,29 +114,8 @@ int VtkVisPipelineItem::writeToFile(const std::string &filename) const
 {
     if (!filename.empty())
     {
-        if (filename.substr(filename.size() - 4).find("os") != std::string::npos)
-        {
-#ifdef VTKOSGCONVERTER_FOUND
-            if(!dynamic_cast<vtkImageActor*>(_actor))
-            {
-                vtkOsgConverter osgConverter(static_cast<vtkActor*>(_actor));
-                if(osgConverter.convert())
-                    OSG::SceneFileHandler::the().write(
-                            osgConverter.getNode(), filename.c_str());
-            }
-            else
-                QMessageBox::warning(NULL, "Conversion to OpenSG not possible",
-                    "It is not possible to convert an vtkImageData based object\nto OpenSG. If you want to convert raster data import it via \" File / Import / Raster Files as PolyData\"!");
-#else
-            QMessageBox::warning(
-                NULL,
-                "Functionality not implemented",
-                "Sorry but this program was not compiled with OpenSG support.");
-#endif
-            return 0;
-        }
 #ifdef VTKFBXCONVERTER_FOUND
-        else if (filename.substr(filename.size() - 4).find("fbx") != std::string::npos)
+        if (filename.substr(filename.size() - 4).find("fbx") != std::string::npos)
         {
             if(!dynamic_cast<vtkImageActor*>(_actor))
             {
diff --git a/Applications/DataExplorer/VtkVis/VtkVisPipelineItem.h b/Applications/DataExplorer/VtkVis/VtkVisPipelineItem.h
index 51af7a8e684..49bf3d9acf3 100644
--- a/Applications/DataExplorer/VtkVis/VtkVisPipelineItem.h
+++ b/Applications/DataExplorer/VtkVis/VtkVisPipelineItem.h
@@ -34,8 +34,6 @@ class vtkRenderer;
 class vtkTransformFilter;
 class QVtkDataSetMapper;
 
-class vtkOsgActor;
-
 class VtkAlgorithmProperties;
 class VtkCompositeFilter;
 
@@ -151,4 +149,3 @@ private:
 };
 
 #endif // VTKVISPIPELINEITEM_H
-
diff --git a/Applications/DataExplorer/VtkVis/VtkVisPipelineView.cpp b/Applications/DataExplorer/VtkVis/VtkVisPipelineView.cpp
index a91f020e881..909874d4180 100644
--- a/Applications/DataExplorer/VtkVis/VtkVisPipelineView.cpp
+++ b/Applications/DataExplorer/VtkVis/VtkVisPipelineView.cpp
@@ -110,7 +110,6 @@ void VtkVisPipelineView::contextMenuEvent( QContextMenuEvent* event )
         }
         menu.addSeparator();
         QAction* exportVtkAction = menu.addAction("Export as VTK");
-        QAction* exportOsgAction = menu.addAction("Export as OpenSG");
 #ifdef VTKFBXCONVERTER_FOUND
         QAction* exportFbxAction = menu.addAction("Export as Fbx");
 #endif
@@ -126,8 +125,6 @@ void VtkVisPipelineView::contextMenuEvent( QContextMenuEvent* event )
         connect(addFilterAction, SIGNAL(triggered()), this, SLOT(addPipelineFilterItem()));
         connect(exportVtkAction, SIGNAL(triggered()), this,
                 SLOT(exportSelectedPipelineItemAsVtk()));
-        connect(exportOsgAction, SIGNAL(triggered()), this,
-                SLOT(exportSelectedPipelineItemAsOsg()));
 #ifdef VTKFBXCONVERTER_FOUND
         connect(exportFbxAction, SIGNAL(triggered()), this,
                 SLOT(exportSelectedPipelineItemAsFbx()));
@@ -153,22 +150,6 @@ void VtkVisPipelineView::exportSelectedPipelineItemAsVtk()
     }
 }
 
-void VtkVisPipelineView::exportSelectedPipelineItemAsOsg()
-{
-    QSettings settings;
-    QModelIndex idx = this->selectionModel()->currentIndex();
-    QString filename = QFileDialog::getSaveFileName(this, "Export object to OpenSG file",
-                                                    settings.value("lastExportedFileDirectory").
-                                                    toString(), "OpenSG file (*.osb)");
-    if (!filename.isEmpty())
-    {
-        static_cast<VtkVisPipelineItem*>(static_cast<VtkVisPipeline*>(this->model())->
-                                         getItem(idx))->writeToFile(filename.toStdString());
-        QDir dir = QDir(filename);
-        settings.setValue("lastExportedFileDirectory", dir.absolutePath());
-    }
-}
-
 void VtkVisPipelineView::exportSelectedPipelineItemAsFbx()
 {
     QSettings settings;
diff --git a/Applications/DataExplorer/VtkVis/VtkVisPipelineView.h b/Applications/DataExplorer/VtkVis/VtkVisPipelineView.h
index 8eadc901db4..9942daad72a 100644
--- a/Applications/DataExplorer/VtkVis/VtkVisPipelineView.h
+++ b/Applications/DataExplorer/VtkVis/VtkVisPipelineView.h
@@ -63,9 +63,6 @@ private slots:
     /// Exports the currently selected item as a VTK file
     void exportSelectedPipelineItemAsVtk();
 
-    /// Exports the currently selected item as an OpenSG file
-    void exportSelectedPipelineItemAsOsg();
-
     /// Exports the currently selected item as a Fbx file.
     void exportSelectedPipelineItemAsFbx();
 
diff --git a/Applications/DataExplorer/VtkVis/VtkVisPointSetItem.h b/Applications/DataExplorer/VtkVis/VtkVisPointSetItem.h
index 78b93d928a4..754703ca109 100644
--- a/Applications/DataExplorer/VtkVis/VtkVisPointSetItem.h
+++ b/Applications/DataExplorer/VtkVis/VtkVisPointSetItem.h
@@ -26,8 +26,6 @@ class vtkRenderer;
 class vtkTransformFilter;
 class QVtkDataSetMapper;
 
-class vtkOsgActor;
-
 class VtkAlgorithmProperties;
 class VtkCompositeFilter;
 
@@ -99,4 +97,3 @@ private:
 };
 
 #endif // VTKVISPOINTSETITEM_H
-
diff --git a/Applications/DataExplorer/main.cpp b/Applications/DataExplorer/main.cpp
index 5844e10a93c..2f8d2f5f533 100644
--- a/Applications/DataExplorer/main.cpp
+++ b/Applications/DataExplorer/main.cpp
@@ -2,9 +2,6 @@
 
 #include <memory>
 #include <QtGui/QApplication>
-#ifdef VTKOSGCONVERTER_FOUND
-#include <OpenSG/OSGBaseFunctions.h>
-#endif
 #include "logog/include/logog.hpp"
 #include "LogogSimpleFormatter.h"
 #ifdef VTKFBXCONVERTER_FOUND
@@ -21,9 +18,6 @@ FbxScene* lScene = NULL;
 
 int main(int argc, char* argv[])
 {
-#ifdef VTKOSGCONVERTER_FOUND
-    OSG::osgInit(argc, argv);
-#endif
 #ifdef VTKFBXCONVERTER_FOUND
     InitializeSdkObjects(lSdkManager, lScene);
 #endif
@@ -57,9 +51,6 @@ int main(int argc, char* argv[])
 #ifdef VTKFBXCONVERTER_FOUND
     DestroySdkObjects(lSdkManager, true);
 #endif
-#ifdef VTKOSGCONVERTER_FOUND
-    OSG::osgExit();
-#endif
 
     return returncode;
 }
diff --git a/Applications/DataExplorer/mainwindow.cpp b/Applications/DataExplorer/mainwindow.cpp
index 892f39d5e97..74130561417 100644
--- a/Applications/DataExplorer/mainwindow.cpp
+++ b/Applications/DataExplorer/mainwindow.cpp
@@ -96,13 +96,6 @@
 
 #include "Applications/Utils/OGSFileConverter/OGSFileConverter.h"
 
-#ifdef VTKOSGCONVERTER_FOUND
-#include "vtkOsgConverter.h"
-#include <OpenSG/OSGCoredNodePtr.h>
-#include <OpenSG/OSGGroup.h>
-#include <OpenSG/OSGSceneFileHandler.h>
-#endif
-
 #include "BaseLib/BuildInfo.h"
 
 using namespace FileIO;
@@ -721,7 +714,7 @@ QMenu* MainWindow::createImportFilesMenu()
     QAction* rasterFiles = importFiles->addAction("&Raster Files...");
     connect(rasterFiles, SIGNAL(triggered()), signal_mapper, SLOT(map()));
     signal_mapper->setMapping(rasterFiles, ImportFileType::RASTER);
-#if defined VTKOSGCONVERTER_FOUND || defined VTKFBXCONVERTER_FOUND
+#if defined VTKFBXCONVERTER_FOUND
     QAction* rasterPolyFiles = importFiles->addAction("R&aster Files as PolyData...");
     connect(rasterPolyFiles, SIGNAL(triggered()), this, SLOT(map()));
     _signal_mapper->setMapping(rasterPolyFiles, ImportFileType::POLYRASTER);
@@ -1181,43 +1174,6 @@ void MainWindow::on_actionExportObj_triggered(bool checked /*= false*/)
     }
 }
 
-void MainWindow::on_actionExportOpenSG_triggered(bool checked /*= false*/)
-{
-    Q_UNUSED(checked)
-#ifdef VTKOSGCONVERTER_FOUND
-    QSettings settings;
-    QString filename = QFileDialog::getSaveFileName(
-            this, "Export scene to OpenSG binary file", settings.value(
-                    "lastExportedFileDirectory").toString(), "OpenSG files (*.osb);;");
-    if (!filename.isEmpty())
-    {
-        QDir dir = QDir(filename);
-        settings.setValue("lastExportedFileDirectory", dir.absolutePath());
-
-        TreeModelIterator it(_vtkVisPipeline);
-        ++it;
-        OSG::NodePtr root = OSG::makeCoredNode<OSG::Group>();
-        while(*it)
-        {
-            VtkVisPipelineItem* item = static_cast<VtkVisPipelineItem*>(*it);
-            vtkOsgConverter converter(static_cast<vtkActor*>(item->actor()));
-            if(converter.convert())
-            {
-                beginEditCP(root);
-                root->addChild(converter.getNode());
-                endEditCP(root);
-            }
-            ++it;
-        }
-
-        OSG::SceneFileHandler::the().write(root, filename.toStdString().c_str());
-    }
-#else // ifdef VTKOSGCONVERTER_FOUND
-    QMessageBox::warning(this, "Functionality not implemented",
-                         "Sorry but this progam was not compiled with OpenSG support.");
-#endif
-}
-
 void MainWindow::createPresentationMenu()
 {
     QMenu* menu = static_cast<QMenu*> (QObject::sender());
@@ -1305,4 +1261,3 @@ QString MainWindow::getLastUsedDir()
     else
         return QDir::homePath();
 }
-
diff --git a/Applications/DataExplorer/mainwindow.h b/Applications/DataExplorer/mainwindow.h
index fb9d3cb9fdb..24b1c4da557 100644
--- a/Applications/DataExplorer/mainwindow.h
+++ b/Applications/DataExplorer/mainwindow.h
@@ -113,7 +113,6 @@ protected slots:
     void on_actionExportVTK_triggered(bool checked = false);
     void on_actionExportVRML2_triggered(bool checked = false);
     void on_actionExportObj_triggered(bool checked = false);
-    void on_actionExportOpenSG_triggered(bool checked = false);
 
     void createPresentationMenu();
     void startPresentationMode();
diff --git a/Applications/DataExplorer/mainwindow.ui b/Applications/DataExplorer/mainwindow.ui
index 2851991b2f3..2a2284a03ad 100644
--- a/Applications/DataExplorer/mainwindow.ui
+++ b/Applications/DataExplorer/mainwindow.ui
@@ -98,7 +98,6 @@
      <addaction name="actionExportVRML2"/>
      <addaction name="actionExportVTK"/>
      <addaction name="actionExportObj"/>
-     <addaction name="actionExportOpenSG"/>
     </widget>
     <addaction name="action_Open"/>
     <addaction name="actionSave_As"/>
@@ -367,14 +366,6 @@
     <string>VTK</string>
    </property>
   </action>
-  <action name="actionExportOpenSG">
-   <property name="text">
-    <string>OpenSG</string>
-   </property>
-   <property name="toolTip">
-    <string>Export to OpenSG binary format</string>
-   </property>
-  </action>
   <action name="actionMesh_Generation">
    <property name="text">
     <string>Create Mesh From Input Data...</string>
diff --git a/Applications/Utils/FileConverter/ConvertVtkToOsg.cpp b/Applications/Utils/FileConverter/ConvertVtkToOsg.cpp
deleted file mode 100644
index aa0856da995..00000000000
--- a/Applications/Utils/FileConverter/ConvertVtkToOsg.cpp
+++ /dev/null
@@ -1,206 +0,0 @@
-/**
- * \file
- * \author Lars Bilke
- * \date   2010-10-25
- * \brief  Implementation of the vtk to osg converter tool.
- *
- * \copyright
- * Copyright (c) 2012-2016, OpenGeoSys Community (http://www.opengeosys.org)
- *            Distributed under a Modified BSD License.
- *              See accompanying file LICENSE.txt or
- *              http://www.opengeosys.org/project/license
- *
- */
-
-// ** INCLUDES **
-#include "VtkOsgConverter.h"
-
-#include <vtkActor.h>
-#include <vtkDataSetMapper.h>
-#include <vtkGenericDataObjectReader.h>
-#include <vtkGeometryFilter.h>
-#include <vtkImageDataGeometryFilter.h>
-#include <vtkImageMapper.h>
-#include <vtkPolyDataMapper.h>
-#include <vtkPolyDataNormals.h>
-#include <vtkSmartPointer.h>
-#include <vtkXMLImageDataReader.h>
-#include <vtkXMLPolyDataReader.h>
-#include <vtkXMLRectilinearGridReader.h>
-#include <vtkXMLStructuredGridReader.h>
-#include <vtkXMLUnstructuredGridReader.h>
-
-#include <OpenSG/OSGSceneFileHandler.h>
-#include <OpenSG/OSGSwitch.h>
-
-#include <boost/filesystem/operations.hpp>
-#include <boost/regex.hpp>
-#include <vector>
-using namespace boost::filesystem;
-using namespace std;
-
-// Replace file extension
-void replaceExt(string& s, const string& newExt)
-{
-    string::size_type i = s.rfind('.', s.length());
-    if (i != string::npos)
-        s.replace(i + 1, newExt.length(), newExt);
-}
-
-// Get file extension
-string getFileExt(const string& s)
-{
-    std::size_t i = s.rfind('.', s.length());
-    if (i != string::npos)
-        return s.substr(i + 1, s.length() - i);
-    return "";
-}
-
-// No arguments: batch convert all vt* files
-// switch argument: batch convert all vt* files into one osb file with a switch
-// file argument: convert only the specified file
-int main (int argc, char const* argv[])
-{
-    vector<string> filenames;
-    bool useSwitch = false;
-    if (argc == 2)
-    {
-        if (string(argv[1]).find("switch") != string::npos)
-            useSwitch = true;
-        else
-            filenames.push_back(string(argv[1]));
-    }
-
-    if (useSwitch || filenames.empty())
-    {
-        const boost::regex e(".+\\.vt[a-z]");
-        directory_iterator end;
-        for (directory_iterator it("./"); it != end; ++it)
-        {
-            string curFile = it->path().filename().string();
-            if (regex_match(curFile, e))
-                filenames.push_back(curFile);
-        }
-    }
-
-    OSG::osgInit(0, NULL);
-
-    vtkPolyDataMapper* mapper = vtkPolyDataMapper::New();
-    OSG::NodePtr switchNode = OSG::Node::create();
-    OSG::SwitchPtr switchCore = OSG::Switch::create();
-    beginEditCP(switchCore);
-    switchCore->setChoice(0);
-    endEditCP(switchCore);
-    beginEditCP(switchNode);
-    switchNode->setCore(switchCore);
-    endEditCP(switchNode);
-
-    for (vector<string>::const_iterator it = filenames.begin(); it != filenames.end(); ++it)
-    {
-        string filename(*it);
-        INFO("Opening file %s", filename.c_str());
-        string fileExt = getFileExt(filename);
-
-        vtkXMLDataReader* reader = NULL;
-        vtkGenericDataObjectReader* oldStyleReader = NULL;
-        if (fileExt.find("vti") != string::npos)
-        {
-            reader = vtkXMLImageDataReader::New();
-            vtkSmartPointer<vtkImageDataGeometryFilter> geoFilter =
-                    vtkSmartPointer<vtkImageDataGeometryFilter>::New();
-            geoFilter->SetInputConnection(reader->GetOutputPort());
-            mapper->SetInputConnection(geoFilter->GetOutputPort());
-        }
-        if (fileExt.find("vtr") != string::npos)
-        {
-            reader = vtkXMLRectilinearGridReader::New();
-            vtkSmartPointer<vtkGeometryFilter> geoFilter =
-                    vtkSmartPointer<vtkGeometryFilter>::New();
-            geoFilter->SetInputConnection(reader->GetOutputPort());
-            mapper->SetInputConnection(geoFilter->GetOutputPort());
-        }
-        else if (fileExt.find("vts") != string::npos)
-        {
-            reader = vtkXMLStructuredGridReader::New();
-            vtkSmartPointer<vtkGeometryFilter> geoFilter =
-                    vtkSmartPointer<vtkGeometryFilter>::New();
-            geoFilter->SetInputConnection(reader->GetOutputPort());
-            mapper->SetInputConnection(geoFilter->GetOutputPort());
-        }
-        else if (fileExt.find("vtp") != string::npos)
-        {
-            reader = vtkXMLPolyDataReader::New();
-            mapper->SetInputConnection(reader->GetOutputPort());
-        }
-        else if (fileExt.find("vtu") != string::npos)
-        {
-            reader = vtkXMLUnstructuredGridReader::New();
-            vtkSmartPointer<vtkGeometryFilter> geoFilter =
-                    vtkSmartPointer<vtkGeometryFilter>::New();
-            geoFilter->SetInputConnection(reader->GetOutputPort());
-            mapper->SetInputConnection(geoFilter->GetOutputPort());
-        }
-        else if (fileExt.find("vtk") != string::npos)
-        {
-            oldStyleReader = vtkGenericDataObjectReader::New();
-            oldStyleReader->SetFileName(filename.c_str());
-            oldStyleReader->Update();
-            if(oldStyleReader->IsFilePolyData())
-                mapper->SetInputConnection(oldStyleReader->GetOutputPort());
-            else
-            {
-                vtkSmartPointer<vtkGeometryFilter> geoFilter =
-                        vtkSmartPointer<vtkGeometryFilter>::New();
-                geoFilter->SetInputConnection(oldStyleReader->GetOutputPort());
-                mapper->SetInputConnection(geoFilter->GetOutputPort());
-            }
-        }
-        else
-        {
-            ERR("Not a valid vtk file ending (vti, vtr, vts, vtp, vtu, vtk)");
-            return 1;
-        }
-
-        if (fileExt.find("vtk") == string::npos)
-        {
-            reader->SetFileName(filename.c_str());
-            reader->Update();
-        }
-
-        vtkActor* actor = vtkActor::New();
-        actor->SetMapper(mapper);
-
-        vtkOsgConverter converter(actor);
-        converter.SetVerbose(true);
-        //converter->SetMapper(mapper);
-        converter.WriteAnActor();
-        OSG::NodePtr node = converter.GetOsgNode();
-        replaceExt(filename, "osb");
-        if (useSwitch)
-        {
-            beginEditCP(switchNode);
-            switchNode->addChild(node);
-            endEditCP(switchNode);
-        }
-        else
-            OSG::SceneFileHandler::the().write(node, filename.c_str());
-
-        if (reader)
-            reader->Delete();
-        if (oldStyleReader)
-            oldStyleReader->Delete();
-    }
-    if (useSwitch)
-    {
-        string filename(filenames[0]);
-        replaceExt(filename, "osb");
-        OSG::SceneFileHandler::the().write(switchNode, filename.c_str());
-    }
-    //mapper->Delete(); // TODO crashes
-
-    OSG::osgExit();
-
-    INFO("File conversion finished");
-
-    return 0;
-}
diff --git a/ThirdParty/CMakeLists.txt b/ThirdParty/CMakeLists.txt
index a374541fbbd..049268fa81a 100644
--- a/ThirdParty/CMakeLists.txt
+++ b/ThirdParty/CMakeLists.txt
@@ -25,12 +25,6 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/VtkFbxConverter/CMakeLists.txt
     add_subdirectory(VtkFbxConverter)
 endif()
 
-# VtkOsgConverter
-if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/VtkOsgConverter/CMakeLists.txt
-    AND OGS_USE_OPTIONAL_SUBMODULES)
-    add_subdirectory(VtkOsgConverter)
-endif()
-
 # tetgen
 if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/tetgen/CMakeLists.txt)
     add_subdirectory(tetgen)
diff --git a/ThirdParty/VtkFbxConverter b/ThirdParty/VtkFbxConverter
index 24466ad32ac..191bcfcfa62 160000
--- a/ThirdParty/VtkFbxConverter
+++ b/ThirdParty/VtkFbxConverter
@@ -1 +1 @@
-Subproject commit 24466ad32ac78efc84637afce6e8afcb3cf50e91
+Subproject commit 191bcfcfa62358be98e450e8f745a144a975f73a
-- 
GitLab