diff --git a/Applications/DataExplorer/Base/Color.cpp b/Applications/DataExplorer/Base/Color.cpp index 86ef374203aa42084a7be21ee847ba31015b4bab..8b3f89261e292058f44004438c5d9aba441cb8f8 100644 --- a/Applications/DataExplorer/Base/Color.cpp +++ b/Applications/DataExplorer/Base/Color.cpp @@ -23,18 +23,17 @@ namespace GeoLib { -Color* getRandomColor() +Color getRandomColor() { - std::array<unsigned char, 3> col; + Color col; col[0] = static_cast<unsigned char>((rand()%5)*50); col[1] = static_cast<unsigned char>((rand()%5)*50); col[2] = static_cast<unsigned char>((rand()%5)*50); - return new Color(col); + return col; } -int readColorLookupTable(std::map<std::string, Color*> &colors, const std::string &filename) +int readColorLookupTable(std::map<std::string, Color> &colors, const std::string &filename) { - std::ifstream in( filename.c_str() ); if (!in) @@ -50,39 +49,32 @@ int readColorLookupTable(std::map<std::string, Color*> &colors, const std::strin if (fields.size()>=4) { - Color *c = new Color(); + Color c; id = fields.front(); fields.pop_front(); - (*c)[0] = std::atoi(fields.front().c_str()); + c[0] = std::atoi(fields.front().c_str()); fields.pop_front(); - (*c)[1] = std::atoi(fields.front().c_str()); + c[1] = std::atoi(fields.front().c_str()); fields.pop_front(); - (*c)[2] = std::atoi(fields.front().c_str()); - colors.insert(std::pair<std::string, Color*>(id, c)); + c[2] = std::atoi(fields.front().c_str()); + colors.insert(std::pair<std::string, Color>(id, c)); } } return 1; } -const Color* getColor(const std::string &id, std::map<std::string, Color*> &colors) +Color const getColor(const std::string &id, std::map<std::string, Color> &colors) { - for (std::map<std::string, Color*>::const_iterator it=colors.begin(); it !=colors.end(); ++it) + for (std::map<std::string, Color>::const_iterator it=colors.begin(); it !=colors.end(); ++it) { if (id.compare(it->first) == 0) return it->second; } WARN("Key \"%s\" not found in color lookup table.", id.c_str()); - Color* c = getRandomColor(); - colors.insert(std::pair<std::string, Color*>(id, c)); + Color c = getRandomColor(); + colors.insert(std::pair<std::string, Color>(id, c)); return c; } -const Color* getColor(double id, std::map<std::string, GeoLib::Color*> &colors) -{ - std::ostringstream stream; - stream << id; - return getColor(stream.str(), colors); -} - } diff --git a/Applications/DataExplorer/Base/Color.h b/Applications/DataExplorer/Base/Color.h index deeac095ec1a66b540e291daa0774701f2447454..aa68db857888e5aafb14eedd8d28c83ebcd30dfa 100644 --- a/Applications/DataExplorer/Base/Color.h +++ b/Applications/DataExplorer/Base/Color.h @@ -25,17 +25,17 @@ namespace GeoLib using Color = std::array<unsigned char, 3>; /// Returns a random RGB colour. -Color* getRandomColor(); +Color getRandomColor(); /// Reads a color-lookup-table from a file and writes it to a map. -int readColorLookupTable(std::map<std::string, GeoLib::Color*> &colors, const std::string &filename); +int readColorLookupTable(std::map<std::string, GeoLib::Color> &colors, const std::string &filename); /// Uses a color-lookup-table (in form of a map) to return a colour for a specified name. If the name is not /// in the colortable a new entry is created with the new name and a random colour. -const Color* getColor(const std::string &id, std::map<std::string, GeoLib::Color*> &colors); +Color const getColor(const std::string &id, std::map<std::string, GeoLib::Color> &colors); /// Convenience function to use the getColor method with numbers as identifiers. -const Color* getColor(double id, std::map<std::string, GeoLib::Color*> &colors); +Color const getColor(double id, std::map<std::string, GeoLib::Color> &colors); } // namespace #endif /* COLOR_H_ */ diff --git a/Applications/DataExplorer/DataView/DiagramView/DetailWindow.cpp b/Applications/DataExplorer/DataView/DiagramView/DetailWindow.cpp index 05919a7db7fd1b727d96335a61cfb69c52f0bc0b..f452966ac3b68d550809d9dba6e9fdebaf7e41bc 100644 --- a/Applications/DataExplorer/DataView/DiagramView/DetailWindow.cpp +++ b/Applications/DataExplorer/DataView/DiagramView/DetailWindow.cpp @@ -124,9 +124,8 @@ void DetailWindow::resizeWindow() void DetailWindow::addList(DiagramList* list) { - GeoLib::Color* c = GeoLib::getRandomColor(); - QColor colour((*c)[0], (*c)[1], (*c)[2]); - delete c; + GeoLib::Color const c = GeoLib::getRandomColor(); + QColor colour(c[0], c[1], c[2]); this->addList(list, colour); resizeWindow(); } diff --git a/Applications/DataExplorer/DataView/StationTreeView.cpp b/Applications/DataExplorer/DataView/StationTreeView.cpp index a1530d17b8f13face7882235995d23d29e77d6a8..25ffcb9a777d2651e5a851d7ca78428d44faa904 100644 --- a/Applications/DataExplorer/DataView/StationTreeView.cpp +++ b/Applications/DataExplorer/DataView/StationTreeView.cpp @@ -137,18 +137,11 @@ void StationTreeView::displayStratigraphy() static_cast<StationTreeModel*>(model())->stationFromIndex( this->selectionModel()->currentIndex(), temp_name); // get color table (horrible way to do it but there you go ...) - std::map<std::string, - GeoLib::Color*> colorLookupTable = - static_cast<VtkStationSource*>(static_cast<StationTreeModel*>(model())->vtkSource( - temp_name. - toStdString())) - ->getColorLookupTable(); - StratWindow* stratView = - new StratWindow(static_cast<GeoLib::StationBorehole*>(static_cast<StationTreeModel*>( - model()) - ->stationFromIndex(index, - temp_name)), - &colorLookupTable); + std::map<std::string, GeoLib::Color> colorLookupTable = + static_cast<VtkStationSource*>(static_cast<StationTreeModel*> + (model())->vtkSource(temp_name.toStdString()))->getColorLookupTable(); + StratWindow* stratView = new StratWindow(static_cast<GeoLib::StationBorehole*> + (static_cast<StationTreeModel*>(model())->stationFromIndex(index,temp_name)), &colorLookupTable); stratView->setAttribute(Qt::WA_DeleteOnClose); // this fixes the memory leak shown by cppcheck stratView->show(); } @@ -237,38 +230,28 @@ void StationTreeView::showDiagramPrefsDialog() void StationTreeView::writeStratigraphiesAsImages(QString listName) { - std::map<std::string, - GeoLib::Color*> colorLookupTable = - static_cast<VtkStationSource*>(static_cast<StationTreeModel*>(model())->vtkSource( - listName. - toStdString())) - ->getColorLookupTable(); + std::map<std::string, GeoLib::Color> colorLookupTable = + static_cast<VtkStationSource*>(static_cast<StationTreeModel*> + (model())->vtkSource(listName.toStdString()))->getColorLookupTable(); std::vector<ModelTreeItem*> lists = static_cast<StationTreeModel*>(model())->getLists(); std::size_t nLists = lists.size(); for (std::size_t i = 0; i < nLists; i++) - if ( listName.toStdString().compare( lists[i]->data(0).toString().toStdString() ) - == 0 ) - { - const std::vector<GeoLib::Point*>* stations = - dynamic_cast<BaseItem*>(lists[i]->getItem())->getStations(); + { + if ( listName.compare( lists[i]->data(0).toString() ) != 0 ) + continue; + + std::vector<GeoLib::Point*> const& stations = + *dynamic_cast<BaseItem*>(lists[i]->getItem())->getStations(); - for (std::size_t i = 0; i < stations->size(); i++) - { - StratWindow* stratView = - new StratWindow(static_cast<GeoLib::StationBorehole*>((* - stations) - [i]), - &colorLookupTable); - stratView->setAttribute(Qt::WA_DeleteOnClose); // this fixes the memory leak shown by cppcheck - stratView->show(); - stratView->stationView->saveAsImage( - "c:/project/" + - QString::fromStdString(static_cast<GeoLib::StationBorehole*>(( - * - stations) - [ - i])->getName()) + ".jpg"); - stratView->close(); - } + for (std::size_t i = 0; i < stations.size(); i++) + { + StratWindow* stratView = new StratWindow( + static_cast<GeoLib::StationBorehole*>(stations[i]), &colorLookupTable); + stratView->setAttribute(Qt::WA_DeleteOnClose); + stratView->show(); + stratView->stationView->saveAsImage(QString::fromStdString( + static_cast<GeoLib::StationBorehole*>(stations[i])->getName()) + ".jpg"); + stratView->close(); } + } } diff --git a/Applications/DataExplorer/DataView/StratView/StratBar.cpp b/Applications/DataExplorer/DataView/StratView/StratBar.cpp index abf82318fe425450465b6f2992b9cd157eee709b..c7a379521838a2e4182a7caadf79fd8df8923311 100644 --- a/Applications/DataExplorer/DataView/StratView/StratBar.cpp +++ b/Applications/DataExplorer/DataView/StratView/StratBar.cpp @@ -16,7 +16,7 @@ #include <QPainter> StratBar::StratBar(GeoLib::StationBorehole* station, - std::map<std::string, GeoLib::Color*>* stratColors, + std::map<std::string, GeoLib::Color>* stratColors, QGraphicsItem* parent) : QGraphicsItem(parent), _station(station) { @@ -61,11 +61,8 @@ void StratBar::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, top += height; height = logHeight(((*(profile[i - 1]))[2] - (*(profile[i]))[2])); QRectF layer(0, top, BARWIDTH, height); - const GeoLib::Color* c (GeoLib::getColor(soilNames[i], _stratColors)); - QBrush brush(QColor((int)(*c)[0], - (int)(*c)[1], - (int)(*c)[2], - 127), Qt::SolidPattern); + GeoLib::Color const& c (GeoLib::getColor(soilNames[i], _stratColors)); + QBrush brush(QColor((int)c[0], (int)c[1], (int)c[2], 127), Qt::SolidPattern); painter->setBrush(brush); painter->drawRect(layer); diff --git a/Applications/DataExplorer/DataView/StratView/StratBar.h b/Applications/DataExplorer/DataView/StratView/StratBar.h index e369e1e4b7a0308707a5fd159e9ec720d906a098..b0b7fd61e722b7ee08245fd3565de0fc7f1b13b6 100644 --- a/Applications/DataExplorer/DataView/StratView/StratBar.h +++ b/Applications/DataExplorer/DataView/StratView/StratBar.h @@ -36,7 +36,7 @@ public: * \param parent The parent QGraphicsItem. */ StratBar(GeoLib::StationBorehole* station, - std::map<std::string, GeoLib::Color*>* stratColors = NULL, + std::map<std::string, GeoLib::Color>* stratColors = nullptr, QGraphicsItem* parent = 0); ~StratBar(); @@ -60,7 +60,7 @@ private: static const int BARWIDTH = 50; GeoLib::StationBorehole* _station; - std::map<std::string, GeoLib::Color*> _stratColors; + std::map<std::string, GeoLib::Color> _stratColors; }; #endif //STRATBAR_H diff --git a/Applications/DataExplorer/DataView/StratView/StratScene.cpp b/Applications/DataExplorer/DataView/StratView/StratScene.cpp index 2aa1e96e9289d5b9f02202d97c75516b7ff73928..9b4f6c2299491e8bf31ed7b427a5926319161152 100644 --- a/Applications/DataExplorer/DataView/StratView/StratScene.cpp +++ b/Applications/DataExplorer/DataView/StratView/StratScene.cpp @@ -23,7 +23,7 @@ #include "StratScene.h" StratScene::StratScene(GeoLib::StationBorehole* station, - std::map<std::string, GeoLib::Color*>* stratColors, + std::map<std::string, GeoLib::Color>* stratColors, QObject* parent) : QGraphicsScene(parent) { QRectF textBounds; @@ -115,7 +115,7 @@ void StratScene::addSoilNameLabels(std::vector<std::string> soilNames, } StratBar* StratScene::addStratBar(GeoLib::StationBorehole* station, - std::map<std::string, GeoLib::Color*>* stratColors) + std::map<std::string, GeoLib::Color>* stratColors) { StratBar* b = new StratBar(station, stratColors); addItem(b); diff --git a/Applications/DataExplorer/DataView/StratView/StratScene.h b/Applications/DataExplorer/DataView/StratView/StratScene.h index 13c0ae148b015429105b0319d1ca1b66a8caf2d8..5b21fd384dbe6e56d6cee1f84c28a45ff5e1ce58 100644 --- a/Applications/DataExplorer/DataView/StratView/StratScene.h +++ b/Applications/DataExplorer/DataView/StratView/StratScene.h @@ -30,7 +30,7 @@ class StratScene : public QGraphicsScene public: /// Constructor StratScene(GeoLib::StationBorehole* station, - std::map<std::string, GeoLib::Color*>* stratColors = NULL, + std::map<std::string, GeoLib::Color>* stratColors = nullptr, QObject* parent = 0); ~StratScene(); @@ -52,7 +52,7 @@ private: /// Add a stratigraphy-bar to the scene. StratBar* addStratBar(GeoLib::StationBorehole* station, - std::map<std::string, GeoLib::Color*>* stratColors = NULL); + std::map<std::string, GeoLib::Color>* stratColors = nullptr); }; #endif //STRATSCENE_H diff --git a/Applications/DataExplorer/DataView/StratView/StratView.cpp b/Applications/DataExplorer/DataView/StratView/StratView.cpp index 6231f2923d44bbf550e1b9bd4014c035eff32741..86159a3177876d8ca2e32ebdf908ca76478ea1a8 100644 --- a/Applications/DataExplorer/DataView/StratView/StratView.cpp +++ b/Applications/DataExplorer/DataView/StratView/StratView.cpp @@ -22,7 +22,7 @@ StratView::~StratView() } void StratView::setStation(GeoLib::StationBorehole* station, - std::map<std::string, GeoLib::Color*>* stratColors) + std::map<std::string, GeoLib::Color>* stratColors) { _scene = new StratScene(station, stratColors); setScene(_scene); diff --git a/Applications/DataExplorer/DataView/StratView/StratView.h b/Applications/DataExplorer/DataView/StratView/StratView.h index d86992697b4a4aad5de51582f3053b76eec5cd66..5ed4680d740ce8265be2a483ad5d23f8cdc3e835 100644 --- a/Applications/DataExplorer/DataView/StratView/StratView.h +++ b/Applications/DataExplorer/DataView/StratView/StratView.h @@ -39,7 +39,7 @@ public: /// Sets the Borehole whose data should be visualised. void setStation(GeoLib::StationBorehole* station, - std::map<std::string, GeoLib::Color*>* stratColors = NULL); + std::map<std::string, GeoLib::Color>* stratColors = nullptr); /// Returns the height of the bounding rectangle of all objects within the scene. int getHeight() { return static_cast<int>((_scene->itemsBoundingRect()).height()); } diff --git a/Applications/DataExplorer/DataView/StratView/StratWindow.cpp b/Applications/DataExplorer/DataView/StratView/StratWindow.cpp index 964bfcff22f398efa7a4826fa0cc8362e313ea75..03d23f34e70d2ca8a81d0a8e8521d559ae1dcc0d 100644 --- a/Applications/DataExplorer/DataView/StratView/StratWindow.cpp +++ b/Applications/DataExplorer/DataView/StratView/StratWindow.cpp @@ -16,7 +16,7 @@ #include "StratWindow.h" StratWindow::StratWindow(GeoLib::StationBorehole* station, - std::map<std::string, GeoLib::Color*>* stratColors, + std::map<std::string, GeoLib::Color>* stratColors, QWidget* parent) : QWidget(parent) { setupUi(this); diff --git a/Applications/DataExplorer/DataView/StratView/StratWindow.h b/Applications/DataExplorer/DataView/StratView/StratWindow.h index 6df3340a4b26613891b4f39696d115b7c7068254..9c9f48462d0ac93c9385d350901ec05bead8202e 100644 --- a/Applications/DataExplorer/DataView/StratView/StratWindow.h +++ b/Applications/DataExplorer/DataView/StratView/StratWindow.h @@ -38,7 +38,7 @@ public: * \param parent The parent QWidget. */ StratWindow(GeoLib::StationBorehole* station, - std::map<std::string, GeoLib::Color*>* stratColors = NULL, + std::map<std::string, GeoLib::Color>* stratColors = nullptr, QWidget* parent = 0); ~StratWindow(void) { this->destroy(); } diff --git a/Applications/DataExplorer/VtkVis/VtkPointsSource.cpp b/Applications/DataExplorer/VtkVis/VtkPointsSource.cpp index d601ab2bce099c0e328c99b3e133898958777e10..83f072c0e81c93887405aca6821bc1864835054e 100644 --- a/Applications/DataExplorer/VtkVis/VtkPointsSource.cpp +++ b/Applications/DataExplorer/VtkVis/VtkPointsSource.cpp @@ -41,9 +41,8 @@ VtkPointsSource::VtkPointsSource() _removable = false; // From VtkAlgorithmProperties this->SetNumberOfInputPorts(0); - const GeoLib::Color* c = GeoLib::getRandomColor(); - GetProperties()->SetColor((*c)[0] / 255.0,(*c)[1] / 255.0,(*c)[2] / 255.0); - delete c; + const GeoLib::Color c = GeoLib::getRandomColor(); + GetProperties()->SetColor(c[0] / 255.0,c[1] / 255.0,c[2] / 255.0); } void VtkPointsSource::PrintSelf( ostream& os, vtkIndent indent ) diff --git a/Applications/DataExplorer/VtkVis/VtkPolylinesSource.cpp b/Applications/DataExplorer/VtkVis/VtkPolylinesSource.cpp index c5ffe3227816413c5bf164360e03544a61c3e897..6e99591c12a012430df9c1ea903b07355a9b337c 100644 --- a/Applications/DataExplorer/VtkVis/VtkPolylinesSource.cpp +++ b/Applications/DataExplorer/VtkVis/VtkPolylinesSource.cpp @@ -42,9 +42,8 @@ VtkPolylinesSource::VtkPolylinesSource() _removable = false; // From VtkAlgorithmProperties this->SetNumberOfInputPorts(0); - const GeoLib::Color* c = GeoLib::getRandomColor(); - GetProperties()->SetColor((*c)[0] / 255.0,(*c)[1] / 255.0,(*c)[2] / 255.0); - delete c; + const GeoLib::Color c = GeoLib::getRandomColor(); + GetProperties()->SetColor(c[0] / 255.0, c[1] / 255.0, c[2] / 255.0); } VtkPolylinesSource::~VtkPolylinesSource() diff --git a/Applications/DataExplorer/VtkVis/VtkStationSource.cpp b/Applications/DataExplorer/VtkVis/VtkStationSource.cpp index 071a08c5591c8b57df9105b8a52e46f2e255f748..d63d66370651757015e35980768a3be471dc5f39 100644 --- a/Applications/DataExplorer/VtkVis/VtkStationSource.cpp +++ b/Applications/DataExplorer/VtkVis/VtkStationSource.cpp @@ -42,16 +42,8 @@ VtkStationSource::VtkStationSource() _removable = false; // From VtkAlgorithmProperties this->SetNumberOfInputPorts(0); - const GeoLib::Color* c = GeoLib::getRandomColor(); - GetProperties()->SetColor((*c)[0] / 255.0,(*c)[1] / 255.0,(*c)[2] / 255.0); - delete c; -} - -VtkStationSource::~VtkStationSource() -{ - std::map<std::string, GeoLib::Color*>::iterator it; - for (it = _colorLookupTable.begin(); it != _colorLookupTable.end(); ++it) - delete it->second; + const GeoLib::Color c = GeoLib::getRandomColor(); + GetProperties()->SetColor(c[0] / 255.0, c[1] / 255.0, c[2] / 255.0); } void VtkStationSource::PrintSelf( ostream& os, vtkIndent indent ) diff --git a/Applications/DataExplorer/VtkVis/VtkStationSource.h b/Applications/DataExplorer/VtkVis/VtkStationSource.h index e334465c41f58c7526858822ab8f8e054995a788..da0962523f16256ff8df8a2a2b88923fa3fda8e3 100644 --- a/Applications/DataExplorer/VtkVis/VtkStationSource.h +++ b/Applications/DataExplorer/VtkVis/VtkStationSource.h @@ -36,7 +36,7 @@ public: /// Returns the colour lookup table generated for boreholes. /// This method should only be called after the colour lookup table has actually been build (via RequestData() or setColorLookupTable()). - const std::map<std::string, GeoLib::Color*>& getColorLookupTable() const + const std::map<std::string, GeoLib::Color>& getColorLookupTable() const { return _colorLookupTable; } /// Returns the type of observation site represented in this source object @@ -57,7 +57,6 @@ public: protected: VtkStationSource(); - ~VtkStationSource(); /// Computes the polygonal data object. int RequestData(vtkInformation* request, @@ -73,7 +72,7 @@ protected: /// The colour table for stratigraphic data. This table is either set using the setColorLookupTable() method or is generated /// automatically with random colours while creating the VtkStationSource-object. - std::map<std::string, GeoLib::Color*> _colorLookupTable; + std::map<std::string, GeoLib::Color> _colorLookupTable; private: std::size_t GetIndexByName( std::string const& name ); diff --git a/Applications/DataExplorer/VtkVis/VtkSurfacesSource.cpp b/Applications/DataExplorer/VtkVis/VtkSurfacesSource.cpp index 9864203c6191318e293e51bfecebffcf8ff2c7bb..0a430930d436e8a580d3f0bb7f6679e6e9812fc3 100644 --- a/Applications/DataExplorer/VtkVis/VtkSurfacesSource.cpp +++ b/Applications/DataExplorer/VtkVis/VtkSurfacesSource.cpp @@ -39,9 +39,9 @@ VtkSurfacesSource::VtkSurfacesSource() this->SetNumberOfInputPorts(0); //this->SetColorBySurface(true); - const GeoLib::Color* c = GeoLib::getRandomColor(); + const GeoLib::Color c = GeoLib::getRandomColor(); vtkProperty* vtkProps = GetProperties(); - vtkProps->SetColor((*c)[0] / 255.0,(*c)[1] / 255.0,(*c)[2] / 255.0); + vtkProps->SetColor(c[0] / 255.0,c[1] / 255.0,c[2] / 255.0); vtkProps->SetEdgeVisibility(0); } diff --git a/Applications/DataExplorer/VtkVis/VtkVisPipeline.cpp b/Applications/DataExplorer/VtkVis/VtkVisPipeline.cpp index bf0dc45d1b9c5f8842c93ec29175ddfc4563ef2c..86982026c00249556968a320c8c4fa7f4346dd7c 100644 --- a/Applications/DataExplorer/VtkVis/VtkVisPipeline.cpp +++ b/Applications/DataExplorer/VtkVis/VtkVisPipeline.cpp @@ -176,17 +176,17 @@ void VtkVisPipeline::loadFromFile(QString filename) if (filename.size() > 0) { - vtkXMLDataReader* reader; + vtkSmartPointer<vtkXMLDataReader> reader; if (filename.endsWith("vti")) - reader = vtkXMLImageDataReader::New(); + reader = vtkSmartPointer<vtkXMLImageDataReader>::New(); else if (filename.endsWith("vtr")) - reader = vtkXMLRectilinearGridReader::New(); + reader = vtkSmartPointer<vtkXMLRectilinearGridReader>::New(); else if (filename.endsWith("vts")) - reader = vtkXMLStructuredGridReader::New(); + reader = vtkSmartPointer<vtkXMLStructuredGridReader>::New(); else if (filename.endsWith("vtp")) - reader = vtkXMLPolyDataReader::New(); + reader = vtkSmartPointer<vtkXMLPolyDataReader>::New(); else if (filename.endsWith("vtu")) - reader = vtkXMLUnstructuredGridReader::New(); + reader = vtkSmartPointer<vtkXMLUnstructuredGridReader>::New(); else if (filename.endsWith("vtk")) { vtkGenericDataObjectReader* oldStyleReader = @@ -214,7 +214,7 @@ void VtkVisPipeline::loadFromFile(QString filename) //std::cout << "#cell scalars: " << reader->GetNumberOfCellArrays() << std::endl; //std::cout << "#point scalars: " << reader->GetNumberOfPointArrays() << std::endl; - vtkDataSet* dataSet = reader->GetOutputAsDataSet(); + vtkSmartPointer<vtkDataSet> dataSet = reader->GetOutputAsDataSet(); if (dataSet) { this->listArrays(dataSet); @@ -222,8 +222,6 @@ void VtkVisPipeline::loadFromFile(QString filename) } else ERR("VtkVisPipeline::loadFromFile(): not a valid vtkDataSet."); - - //reader->Delete(); } #ifndef NDEBUG