1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
|
diff --git a/CMake/ParaViewClient.cmake b/CMake/ParaViewClient.cmake
index 7dadad937..dd271739d 100644
--- a/CMake/ParaViewClient.cmake
+++ b/CMake/ParaViewClient.cmake
@@ -516,6 +516,7 @@ function (paraview_client_documentation)
NAMES xmlpatterns-qt5 xmlpatterns
HINTS "${Qt5_DIR}/../../../bin"
"${Qt5_DIR}/../../../libexec/qt5/bin"
+ "${Qt5_DIR}/../../../tools/qt5/bin"
DOC "Path to xmlpatterns")
mark_as_advanced(qt_xmlpatterns_executable)
diff --git a/CMake/ParaViewOptions.cmake b/CMake/ParaViewOptions.cmake
index 5e402e9fc..ccb553e8f 100644
--- a/CMake/ParaViewOptions.cmake
+++ b/CMake/ParaViewOptions.cmake
@@ -88,7 +88,7 @@ endif()
#========================================================================
# XXX(VTK): External VTK is not yet actually supported.
-if (FALSE)
+if (TRUE)
option(PARAVIEW_USE_EXTERNAL_VTK "Use an external VTK." OFF)
mark_as_advanced(PARAVIEW_USE_EXTERNAL_VTK)
else ()
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d7e8f1dfe..8b0e7a8c6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -73,7 +73,9 @@ if (NOT CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
endif ()
set(paraview_cmake_dir "${CMAKE_CURRENT_SOURCE_DIR}/CMake")
-set(vtk_cmake_dir "${CMAKE_CURRENT_SOURCE_DIR}/VTK/CMake")
+set(vtk_cmake_dir "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/vtk")
+string(REPLACE "/debug" "" vtk_cmake_dir "${vtk_cmake_dir}")
+message(STATUS "vtk_cmake_dir:${vtk_cmake_dir}")
list(APPEND CMAKE_MODULE_PATH
"${paraview_cmake_dir}"
"${vtk_cmake_dir}")
@@ -214,6 +216,7 @@ if (NOT WIN32)
endif ()
endif ()
+message(STATUS "PARAVIEW_USE_EXTERNAL_VTK:${PARAVIEW_USE_EXTERNAL_VTK}")
if (PARAVIEW_USE_EXTERNAL_VTK)
find_package(VTK REQUIRED)
else ()
@@ -369,9 +372,73 @@ endif ()
if (PARAVIEW_USE_EXTERNAL_VTK)
if (paraview_required_modules OR paraview_unrecognized_modules)
- message(FATAL_ERROR
- "The following modules were requested or required, but not found: "
- "${paraview_required_modules};${paraview_unrecognized_modules}.")
+ message(STATUS "REQUIRED:${paraview_required_modules}")
+ foreach(mod ${paraview_required_modules})
+ if(NOT TARGET ${mod})
+ message(STATUS "REQUIRED TARGET not defined: ${mod}")
+ list(APPEND modules_notarget ${mod})
+ endif()
+ if(${mod} MATCHES "VTK::") # For better debugging
+ message(STATUS "VTK TARGET found: ${mod}")
+ list(APPEND vtk_modules ${mod})
+ endif()
+ endforeach()
+ foreach(mod ${paraview_unrecognized_modules})
+ if(NOT TARGET ${mod})
+ message(STATUS "UNREC TARGET not defined: ${mod}")
+ list(FIND paraview_rejected_modules ${mod} _found_mod)
+ if(_found_mod GREATER_EQUAL 0)
+ message(STATUS "MODULE ${mod} not necessary; Removing from unrecognized")
+ list(APPEND _to_remove ${mod})
+ endif()
+ else()
+ list(APPEND _to_remove ${mod})
+ #list(APPEND vtk_modules ${mod}) #probably do not need to add unrecognized_modules to the wrapper
+ endif()
+ endforeach()
+ message(STATUS "UNRECOGNIZED:${paraview_unrecognized_modules}")
+ list(REMOVE_ITEM paraview_unrecognized_modules ${_to_remove})
+ message(STATUS "REJECTED MODULES: ${paraview_rejected_modules}")
+ message(STATUS "UNRECOGNIZED WITHOUT REJECTED AND KNOWN TARGETS: ${paraview_unrecognized_modules}")
+ message(STATUS "ALL PROVIDED MODULES: ${paraview_modules}")
+ set(_unnecessary_moduls ${paraview_modules})
+ list(REMOVE_ITEM _unnecessary_moduls ${paraview_required_modules})
+ message(STATUS "Unnecessary MODULES: ${_unnecessary_moduls}")
+ if(modules_notarget)
+ message(FATAL_ERROR
+ "The following modules were requested or required, but not found: "
+ "${modules_notarget}")
+ endif()
+ list(REMOVE_DUPLICATES vtk_modules)
+ macro(search_dependent_targets)
+ set(vtk_mod_dep_list)
+ foreach(vtk_targ ${ARGN})
+ get_target_property(vtk_mod_dep ${vtk_targ} "INTERFACE_vtk_module_depends")
+ if(vtk_mod_dep)
+ list(APPEND vtk_mod_dep_list ${vtk_mod_dep})
+ endif()
+ get_target_property(vtk_mod_pdep ${vtk_targ} "INTERFACE_vtk_module_private_depends")
+ if(vtk_mod_pdep)
+ list(APPEND vtk_mod_dep_list ${vtk_mod_pdep})
+ endif()
+ get_target_property(vtk_mod_odep ${vtk_targ} "INTERFACE_vtk_module_opional_depends")
+ if(vtk_mod_odep)
+ list(APPEND vtk_mod_dep_list ${vtk_mod_odep})
+ endif()
+ if(vtk_mod_dep_list)
+ message(STATUS "Target ${vtk_targ} depends on ${vtk_mod_dep_list}")
+ list(REMOVE_ITEM vtk_mod_dep_list ${vtk_modules})
+ if(vtk_mod_dep_list)
+ message(STATUS "Newly discovered modules: ${vtk_mod_dep_list}")
+ list(APPEND vtk_modules ${vtk_mod_dep_list})
+ search_dependent_targets(${vtk_mod_dep_list})
+ else()
+ message(STATUS "No new modules discovered!")
+ endif()
+ endif()
+ endforeach()
+ endmacro()
+ search_dependent_targets(${vtk_modules})
endif ()
if (PARAVIEW_USE_PYTHON)
@@ -498,7 +565,7 @@ else ()
TEST_INPUT_DATA_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/VTK/Testing"
TEST_OUTPUT_DATA_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/ExternalData/VTK/Testing")
- if (NOT PARAVIEW_USE_EXTERNAL_VTK AND PARAVIEW_INSTALL_DEVELOPMENT_FILES)
+ if (PARAVIEW_INSTALL_DEVELOPMENT_FILES)
set(vtk_cmake_dir
"${CMAKE_CURRENT_SOURCE_DIR}/VTK/CMake")
set(vtk_cmake_destination
@@ -543,9 +610,11 @@ vtk_module_build(
TEST_OUTPUT_DATA_DIRECTORY "${paraview_test_data_directory_output}")
include(vtkModuleJson)
-vtk_module_json(
- MODULES "${vtk_modules}"
- OUTPUT "vtk-modules.json")
+if(NOT PARAVIEW_USE_EXTERNAL_VTK)
+ vtk_module_json(
+ MODULES "${vtk_modules}"
+ OUTPUT "vtk-modules.json")
+endif()
vtk_module_json(
MODULES "${paraview_modules}"
OUTPUT "paraview-modules.json")
diff --git a/Plugins/AnalyzeNIfTIReaderWriter/NIfTIIO/vtkAnalyzeReader.cxx b/Plugins/AnalyzeNIfTIReaderWriter/NIfTIIO/vtkAnalyzeReader.cxx
index be318d6d4..80187dd69 100644
--- a/Plugins/AnalyzeNIfTIReaderWriter/NIfTIIO/vtkAnalyzeReader.cxx
+++ b/Plugins/AnalyzeNIfTIReaderWriter/NIfTIIO/vtkAnalyzeReader.cxx
@@ -1381,8 +1381,8 @@ int vtkAnalyzeReader::CanReadFile(const char* fname)
return false;
}
- ifstream local_InputStream;
- local_InputStream.open(HeaderFileName.c_str(), ios::in | ios::binary);
+ std::ifstream local_InputStream;
+ local_InputStream.open(HeaderFileName.c_str(), std::ios::in | std::ios::binary);
if (local_InputStream.fail())
{
return false;
diff --git a/Plugins/AnalyzeNIfTIReaderWriter/NIfTIIO/vtkNIfTIReader.cxx b/Plugins/AnalyzeNIfTIReaderWriter/NIfTIIO/vtkNIfTIReader.cxx
index e7df3dacc..1bae5ae22 100644
--- a/Plugins/AnalyzeNIfTIReaderWriter/NIfTIIO/vtkNIfTIReader.cxx
+++ b/Plugins/AnalyzeNIfTIReaderWriter/NIfTIIO/vtkNIfTIReader.cxx
@@ -1277,8 +1277,8 @@ int vtkNIfTIReader::CanReadFile(const char* fname)
return false;
}
- ifstream local_InputStream;
- local_InputStream.open(HeaderFileName.c_str(), ios::in | ios::binary);
+ std::ifstream local_InputStream;
+ local_InputStream.open(HeaderFileName.c_str(), std::ios::in | std::ios::binary);
if (local_InputStream.fail())
{
return false;
diff --git a/Qt/Components/pqCustomFilterManager.cxx b/Qt/Components/pqCustomFilterManager.cxx
index 4c6911ac8..b04828168 100644
--- a/Qt/Components/pqCustomFilterManager.cxx
+++ b/Qt/Components/pqCustomFilterManager.cxx
@@ -214,7 +214,7 @@ void pqCustomFilterManager::exportSelected(const QStringList& files)
QStringList::ConstIterator jter = files.begin();
for (; jter != files.end(); ++jter)
{
- ofstream os((*jter).toLocal8Bit().data(), ios::out);
+ std::ofstream os((*jter).toLocal8Bit().data(), std::ios::out);
root->PrintXML(os, vtkIndent());
}
diff --git a/Qt/Components/pqPresetDialog.cxx b/Qt/Components/pqPresetDialog.cxx
index 411480e3e..af0195763 100644
--- a/Qt/Components/pqPresetDialog.cxx
+++ b/Qt/Components/pqPresetDialog.cxx
@@ -952,7 +952,7 @@ void pqPresetDialog::exportPresets()
}
assert(presetCollection.size() > 0);
- ofstream outfs;
+ std::ofstream outfs;
outfs.open(filename.toStdString().c_str());
if (!outfs.is_open())
{
diff --git a/Qt/Core/pqCoreTestUtility.cxx b/Qt/Core/pqCoreTestUtility.cxx
index 95c7df5b6..00f61e2f8 100644
--- a/Qt/Core/pqCoreTestUtility.cxx
+++ b/Qt/Core/pqCoreTestUtility.cxx
@@ -45,7 +45,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "QtTestingConfigure.h"
#include "QVTKOpenGLNativeWidget.h"
-#include "QVTKOpenGLWidget.h"
+#include "QVTKOpenGLStereoWidget.h"
#include "pqApplicationCore.h"
#include "pqCollaborationEventPlayer.h"
#include "pqColorButtonEventPlayer.h"
@@ -309,13 +309,13 @@ bool pqCoreTestUtility::CompareImage(QWidget* widget, const QString& referenceIm
}
// try to recover the render window directly
- QVTKOpenGLWidget* glWidget = qobject_cast<QVTKOpenGLWidget*>(widget);
+ QVTKOpenGLStereoWidget* glWidget = qobject_cast<QVTKOpenGLStereoWidget*>(widget);
if (glWidget)
{
vtkRenderWindow* rw = glWidget->renderWindow();
if (rw)
{
- cout << "Using QVTKOpenGLWidget RenderWindow API for capture" << endl;
+ cout << "Using QVTKOpenGLStereoWidget RenderWindow API for capture" << endl;
return pqCoreTestUtility::CompareImage(
rw, referenceImage, threshold, std::cerr, tempDirectory, size);
}
diff --git a/Qt/Core/pqQVTKWidgetBase.h b/Qt/Core/pqQVTKWidgetBase.h
index 5f11871de..c6b7dbcbb 100644
--- a/Qt/Core/pqQVTKWidgetBase.h
+++ b/Qt/Core/pqQVTKWidgetBase.h
@@ -43,8 +43,8 @@ using pqQVTKWidgetBase = QVTKOpenGLNativeWidget;
#define PARAVIEW_USING_QVTKOPENGLNATIVEWIDGET 1
#define PARAVIEW_USING_QVTKOPENGLWIDGET 0
#else
-#include "QVTKOpenGLWidget.h"
-using pqQVTKWidgetBase = QVTKOpenGLWidget;
+#include "QVTKOpenGLStereoWidget.h"
+using pqQVTKWidgetBase = QVTKOpenGLStereoWidget;
#define PARAVIEW_USING_QVTKOPENGLNATIVEWIDGET 0
#define PARAVIEW_USING_QVTKOPENGLWIDGET 1
#endif
diff --git a/Qt/Core/pqQVTKWidgetEventPlayer.cxx b/Qt/Core/pqQVTKWidgetEventPlayer.cxx
index 105796d8a..63c0bde5f 100644
--- a/Qt/Core/pqQVTKWidgetEventPlayer.cxx
+++ b/Qt/Core/pqQVTKWidgetEventPlayer.cxx
@@ -37,7 +37,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <QtDebug>
#include "QVTKOpenGLNativeWidget.h"
-#include "QVTKOpenGLWidget.h"
+#include "QVTKOpenGLStereoWidget.h"
#include "QVTKOpenGLWindow.h"
#include "pqEventDispatcher.h"
@@ -49,7 +49,7 @@ pqQVTKWidgetEventPlayer::pqQVTKWidgetEventPlayer(QObject* p)
bool pqQVTKWidgetEventPlayer::playEvent(
QObject* Object, const QString& Command, const QString& Arguments, bool& Error)
{
- QVTKOpenGLWidget* qvtkWidget = qobject_cast<QVTKOpenGLWidget*>(Object);
+ QVTKOpenGLStereoWidget* qvtkWidget = qobject_cast<QVTKOpenGLStereoWidget*>(Object);
QVTKOpenGLNativeWidget* qvtkNativeWidget = qobject_cast<QVTKOpenGLNativeWidget*>(Object);
if (qvtkWidget || qvtkNativeWidget)
{
@@ -92,7 +92,7 @@ bool pqQVTKWidgetEventPlayer::playEvent(
if (qvtkWidget != nullptr)
{
- // Due to QTBUG-61836 (see QVTKOpenGLWidget::testingEvent()), events should
+ // Due to QTBUG-61836 (see QVTKOpenGLStereoWidget::testingEvent()), events should
// be propagated back to the internal QVTKOpenGLWindow when being fired
// explicitly on the widget instance. We have to use a custom event
// callback in this case to ensure that events are passed to the window.
diff --git a/Qt/Core/pqQVTKWidgetEventTranslator.cxx b/Qt/Core/pqQVTKWidgetEventTranslator.cxx
index f79d5c4e5..77950a0d1 100644
--- a/Qt/Core/pqQVTKWidgetEventTranslator.cxx
+++ b/Qt/Core/pqQVTKWidgetEventTranslator.cxx
@@ -44,7 +44,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <QMouseEvent>
#include "QVTKOpenGLNativeWidget.h"
-#include "QVTKOpenGLWidget.h"
+#include "QVTKOpenGLStereoWidget.h"
#include "QVTKOpenGLWindow.h"
pqQVTKWidgetEventTranslator::pqQVTKWidgetEventTranslator(QObject* p)
@@ -70,7 +70,7 @@ bool pqQVTKWidgetEventTranslator::translateEvent(
// Look for a render window in the possible widget types.
vtkRenderWindow* rw = nullptr;
- if (QVTKOpenGLWidget* const qvtkWidget = qobject_cast<QVTKOpenGLWidget*>(Object))
+ if (QVTKOpenGLStereoWidget* const qvtkWidget = qobject_cast<QVTKOpenGLStereoWidget*>(Object))
{
rw = qvtkWidget->embeddedOpenGLWindow() ? qvtkWidget->renderWindow() : nullptr;
}
diff --git a/Remoting/ClientServerStream/vtkClientServerInterpreter.cxx b/Remoting/ClientServerStream/vtkClientServerInterpreter.cxx
index 487b5ad60..c6c24d81d 100644
--- a/Remoting/ClientServerStream/vtkClientServerInterpreter.cxx
+++ b/Remoting/ClientServerStream/vtkClientServerInterpreter.cxx
@@ -184,7 +184,7 @@ void vtkClientServerInterpreter::SetLogFile(const char* name)
// If a non-empty name was given, open a new log file.
if (name && name[0])
{
- this->LogFileStream = new ofstream(name);
+ this->LogFileStream = new std::ofstream(name);
if (this->LogFileStream && *this->LogFileStream)
{
this->LogStream = this->LogFileStream;
diff --git a/Remoting/ClientServerStream/vtkClientServerInterpreter.h b/Remoting/ClientServerStream/vtkClientServerInterpreter.h
index 1eafb27f3..1371ef727 100644
--- a/Remoting/ClientServerStream/vtkClientServerInterpreter.h
+++ b/Remoting/ClientServerStream/vtkClientServerInterpreter.h
@@ -195,8 +195,8 @@ protected:
~vtkClientServerInterpreter() override;
// A stream to which a log is written.
- ostream* LogStream;
- ofstream* LogFileStream;
+ std::ostream* LogStream;
+ std::ofstream* LogFileStream;
// Internal message processing functions.
int ProcessCommandNew(const vtkClientServerStream& css, int midx);
diff --git a/Remoting/Core/vtkPVPluginLoader.cxx b/Remoting/Core/vtkPVPluginLoader.cxx
index 5b04b2f00..447d9d63a 100644
--- a/Remoting/Core/vtkPVPluginLoader.cxx
+++ b/Remoting/Core/vtkPVPluginLoader.cxx
@@ -73,12 +73,12 @@ public:
vtkPVXMLOnlyPlugin* instance = new vtkPVXMLOnlyPlugin();
instance->PluginName = vtksys::SystemTools::GetFilenameWithoutExtension(xmlfile);
- ifstream is;
- is.open(xmlfile, ios::binary);
+ std::ifstream is;
+ is.open(xmlfile, std::ios::binary);
// get length of file:
- is.seekg(0, ios::end);
+ is.seekg(0, std::ios::end);
size_t length = is.tellg();
- is.seekg(0, ios::beg);
+ is.seekg(0, std::ios::beg);
// allocate memory:
char* buffer = new char[length + 1];
diff --git a/Remoting/ServerManager/vtkPVSessionCore.cxx b/Remoting/ServerManager/vtkPVSessionCore.cxx
index 8d36fad37..6ff043967 100644
--- a/Remoting/ServerManager/vtkPVSessionCore.cxx
+++ b/Remoting/ServerManager/vtkPVSessionCore.cxx
@@ -293,7 +293,7 @@ vtkPVSessionCore::vtkPVSessionCore()
{
filename << this->ParallelController->GetLocalProcessId();
}
- this->LogStream = new ofstream(filename.str().c_str());
+ this->LogStream = new std::ofstream(filename.str().c_str());
LOG("Log for " << options->GetArgv0() << " (" << this->ParallelController->GetLocalProcessId()
<< ")");
}
diff --git a/Remoting/ServerManager/vtkSMSessionProxyManager.cxx b/Remoting/ServerManager/vtkSMSessionProxyManager.cxx
index 8525457e5..05bdfd723 100644
--- a/Remoting/ServerManager/vtkSMSessionProxyManager.cxx
+++ b/Remoting/ServerManager/vtkSMSessionProxyManager.cxx
@@ -1261,7 +1261,7 @@ void vtkSMSessionProxyManager::LoadXMLState(
bool vtkSMSessionProxyManager::SaveXMLState(const char* filename)
{
vtkPVXMLElement* rootElement = this->SaveXMLState();
- ofstream os(filename, ios::out);
+ std::ofstream os(filename, std::ios::out);
if (!os.is_open())
{
return false;
diff --git a/Remoting/Views/vtkPVRenderView.cxx b/Remoting/Views/vtkPVRenderView.cxx
index de9c50ab3..d7f739192 100644
--- a/Remoting/Views/vtkPVRenderView.cxx
+++ b/Remoting/Views/vtkPVRenderView.cxx
@@ -2514,11 +2514,11 @@ void vtkPVRenderView::UpdateSkybox()
this->CubeMap->SetInputTexture(vtkOpenGLTexture::SafeDownCast(texture));
this->CubeMap->InterpolateOn();
this->GetRenderer()->AddActor(this->Skybox);
- this->GetRenderer()->SetEnvironmentCubeMap(this->CubeMap, true);
+ this->GetRenderer()->SetEnvironmentTexture(this->CubeMap, true);
}
else
{
- this->GetRenderer()->SetEnvironmentCubeMap(nullptr);
+ this->GetRenderer()->SetEnvironmentTexture(nullptr);
}
}
diff --git a/Remoting/Views/vtkSMTransferFunctionPresets.cxx b/Remoting/Views/vtkSMTransferFunctionPresets.cxx
index 1151ce58f..21e5a28b7 100644
--- a/Remoting/Views/vtkSMTransferFunctionPresets.cxx
+++ b/Remoting/Views/vtkSMTransferFunctionPresets.cxx
@@ -142,7 +142,7 @@ public:
Json::CharReaderBuilder builder;
builder["collectComments"] = false;
Json::Value root;
- ifstream file;
+ std::ifstream file;
file.open(filename);
if (!file)
{
@@ -456,7 +456,7 @@ bool vtkSMTransferFunctionPresets::ImportPresets(const char* filename)
if (vtksys::SystemTools::LowerCase(vtksys::SystemTools::GetFilenameLastExtension(filename)) ==
".xml")
{
- ifstream in(filename);
+ std::ifstream in(filename);
if (in)
{
std::ostringstream contents;
diff --git a/Remoting/Views/vtkSMTransferFunctionProxy.cxx b/Remoting/Views/vtkSMTransferFunctionProxy.cxx
index efa8e9341..2023ca41b 100644
--- a/Remoting/Views/vtkSMTransferFunctionProxy.cxx
+++ b/Remoting/Views/vtkSMTransferFunctionProxy.cxx
@@ -273,7 +273,7 @@ bool vtkSMTransferFunctionProxy::ExportTransferFunction(
exportCollection.append(transferFunction);
- ofstream outfs;
+ std::ofstream outfs;
outfs.open(filename);
if (!outfs.is_open())
{
@@ -1370,7 +1370,7 @@ bool vtkSMTransferFunctionProxy::ConvertLegacyColorMapsToJSON(
return false;
}
- ofstream file;
+ std::ofstream file;
file.open(outjsonfile);
if (file)
{
diff --git a/ThirdParty/protobuf/CMakeLists.txt b/ThirdParty/protobuf/CMakeLists.txt
index 0502ca2d9..25b2e778f 100644
--- a/ThirdParty/protobuf/CMakeLists.txt
+++ b/ThirdParty/protobuf/CMakeLists.txt
@@ -42,7 +42,8 @@ vtk_module_third_party(
PACKAGE Protobuf
VERSION "3.4"
TARGETS protobuf::libprotobuf
- STANDARD_INCLUDE_DIRS)
+ STANDARD_INCLUDE_DIRS
+ CONFIG_MODE)
if (VTK_MODULE_USE_EXTERNAL_ParaView_protobuf)
# promote protobuf::protoc to GLOBAL to allow to call protobuf_generate from other directories
diff --git a/VTKExtensions/CGNSReader/vtkFileSeriesHelper.cxx b/VTKExtensions/CGNSReader/vtkFileSeriesHelper.cxx
index 66a7d6972..9d314b8ce 100644
--- a/VTKExtensions/CGNSReader/vtkFileSeriesHelper.cxx
+++ b/VTKExtensions/CGNSReader/vtkFileSeriesHelper.cxx
@@ -211,7 +211,7 @@ bool vtkFileSeriesHelper::ReadMetaFile(const char* metafilename)
}
// Open the metafile.
- ifstream metafile(metafilename);
+ std::ifstream metafile(metafilename);
if (metafile.bad())
{
// vtkErrorMacro("Failed to open meta-file: " << metafilename);
diff --git a/VTKExtensions/IOCore/vtkCSVWriter.cxx b/VTKExtensions/IOCore/vtkCSVWriter.cxx
index 11f777c1a..a1773600c 100644
--- a/VTKExtensions/IOCore/vtkCSVWriter.cxx
+++ b/VTKExtensions/IOCore/vtkCSVWriter.cxx
@@ -97,7 +97,7 @@ namespace
//-----------------------------------------------------------------------------
template <class iterT>
void vtkCSVWriterGetDataString(
- iterT* iter, vtkIdType tupleIndex, ofstream& stream, vtkCSVWriter* writer, bool* first)
+ iterT* iter, vtkIdType tupleIndex, std::ofstream& stream, vtkCSVWriter* writer, bool* first)
{
int numComps = iter->GetNumberOfComponents();
vtkIdType index = tupleIndex * numComps;
@@ -118,7 +118,7 @@ void vtkCSVWriterGetDataString(
//-----------------------------------------------------------------------------
template <>
void vtkCSVWriterGetDataString(vtkArrayIteratorTemplate<vtkStdString>* iter, vtkIdType tupleIndex,
- ofstream& stream, vtkCSVWriter* writer, bool* first)
+ std::ofstream& stream, vtkCSVWriter* writer, bool* first)
{
int numComps = iter->GetNumberOfComponents();
vtkIdType index = tupleIndex * numComps;
@@ -139,7 +139,7 @@ void vtkCSVWriterGetDataString(vtkArrayIteratorTemplate<vtkStdString>* iter, vtk
//-----------------------------------------------------------------------------
template <>
void vtkCSVWriterGetDataString(vtkArrayIteratorTemplate<char>* iter, vtkIdType tupleIndex,
- ofstream& stream, vtkCSVWriter* writer, bool* first)
+ std::ofstream& stream, vtkCSVWriter* writer, bool* first)
{
int numComps = iter->GetNumberOfComponents();
vtkIdType index = tupleIndex * numComps;
@@ -160,7 +160,7 @@ void vtkCSVWriterGetDataString(vtkArrayIteratorTemplate<char>* iter, vtkIdType t
//-----------------------------------------------------------------------------
template <>
void vtkCSVWriterGetDataString(vtkArrayIteratorTemplate<unsigned char>* iter, vtkIdType tupleIndex,
- ofstream& stream, vtkCSVWriter* writer, bool* first)
+ std::ofstream& stream, vtkCSVWriter* writer, bool* first)
{
int numComps = iter->GetNumberOfComponents();
vtkIdType index = tupleIndex * numComps;
@@ -190,7 +190,7 @@ void vtkCSVWriterGetDataString(vtkArrayIteratorTemplate<unsigned char>* iter, vt
class vtkCSVWriter::CSVFile
{
- ofstream Stream;
+ std::ofstream Stream;
std::vector<std::pair<std::string, int> > ColumnInfo;
double Time = vtkMath::Nan();
diff --git a/VTKExtensions/IOCore/vtkFileSeriesReader.cxx b/VTKExtensions/IOCore/vtkFileSeriesReader.cxx
index f2448f2b8..7d84bc1ab 100644
--- a/VTKExtensions/IOCore/vtkFileSeriesReader.cxx
+++ b/VTKExtensions/IOCore/vtkFileSeriesReader.cxx
@@ -783,7 +783,7 @@ int vtkFileSeriesReader::ReadMetaDataFile(const char* metafilename, vtkStringArr
std::vector<double>& timeValues, int maxFilesToRead /*= VTK_INT_MAX*/)
{
// Open the metafile.
- ifstream metafile(metafilename);
+ std::ifstream metafile(metafilename);
if (metafile.bad())
{
return 0;
diff --git a/VTKExtensions/IOEnSight/vtkPEnSightGoldBinaryReader.cxx b/VTKExtensions/IOEnSight/vtkPEnSightGoldBinaryReader.cxx
index 8370e21e3..ff90a0421 100644
--- a/VTKExtensions/IOEnSight/vtkPEnSightGoldBinaryReader.cxx
+++ b/VTKExtensions/IOEnSight/vtkPEnSightGoldBinaryReader.cxx
@@ -50,7 +50,6 @@ vtkPEnSightGoldBinaryReader::~vtkPEnSightGoldBinaryReader()
{
if (this->IFile)
{
- this->IFile->close();
delete this->IFile;
this->IFile = NULL;
}
@@ -72,7 +71,6 @@ int vtkPEnSightGoldBinaryReader::OpenFile(const char* filename)
// Close file from any previous image
if (this->IFile)
{
- this->IFile->close();
delete this->IFile;
this->IFile = NULL;
}
@@ -86,9 +84,9 @@ int vtkPEnSightGoldBinaryReader::OpenFile(const char* filename)
this->FileSize = (long)(fs.st_size);
#ifdef _WIN32
- this->IFile = new ifstream(filename, ios::in | ios::binary);
+ this->IFile = new std::ifstream(filename, std::ios::in | std::ios::binary);
#else
- this->IFile = new ifstream(filename, ios::in);
+ this->IFile = new std::ifstream(filename, std::ios::in);
#endif
}
else
diff --git a/VTKExtensions/IOEnSight/vtkPEnSightGoldBinaryReader.h b/VTKExtensions/IOEnSight/vtkPEnSightGoldBinaryReader.h
index c5a5551d5..9c871e4a1 100644
--- a/VTKExtensions/IOEnSight/vtkPEnSightGoldBinaryReader.h
+++ b/VTKExtensions/IOEnSight/vtkPEnSightGoldBinaryReader.h
@@ -204,7 +204,7 @@ protected:
int ElementIdsListed;
int Fortran;
- ifstream* IFile;
+ std::ifstream* IFile;
// The size of the file could be used to choose byte order.
long FileSize;
diff --git a/VTKExtensions/IOEnSight/vtkPEnSightGoldReader.cxx b/VTKExtensions/IOEnSight/vtkPEnSightGoldReader.cxx
index b433bc57a..b5cdc2672 100644
--- a/VTKExtensions/IOEnSight/vtkPEnSightGoldReader.cxx
+++ b/VTKExtensions/IOEnSight/vtkPEnSightGoldReader.cxx
@@ -91,7 +91,7 @@ int vtkPEnSightGoldReader::ReadGeometryFile(
// Opening the text file as binary. If not, the reader fails to read
// files with Unix line endings on Windows machines.
- this->IS = new ifstream(sfilename.c_str(), ios::in | ios::binary);
+ this->IS = new std::ifstream(sfilename.c_str(), std::ios::in | std::ios::binary);
if (this->IS->fail())
{
vtkErrorMacro("Unable to open file: " << sfilename.c_str());
@@ -291,7 +291,7 @@ int vtkPEnSightGoldReader::ReadMeasuredGeometryFile(
sfilename = fileName;
}
- this->IS = new ifstream(sfilename.c_str(), ios::in | ios::binary);
+ this->IS = new std::ifstream(sfilename.c_str(), std::ios::in | std::ios::binary);
if (this->IS->fail())
{
vtkErrorMacro("Unable to open file: " << sfilename.c_str());
@@ -455,7 +455,7 @@ int vtkPEnSightGoldReader::ReadScalarsPerNode(const char* fileName, const char*
sfilename = fileName;
}
- this->IS = new ifstream(sfilename.c_str(), ios::in | ios::binary);
+ this->IS = new std::ifstream(sfilename.c_str(), std::ios::in | std::ios::binary);
if (this->IS->fail())
{
vtkErrorMacro("Unable to open file: " << sfilename.c_str());
@@ -675,7 +675,7 @@ int vtkPEnSightGoldReader::ReadVectorsPerNode(const char* fileName, const char*
sfilename = fileName;
}
- this->IS = new ifstream(sfilename.c_str(), ios::in | ios::binary);
+ this->IS = new std::ifstream(sfilename.c_str(), std::ios::in | std::ios::binary);
if (this->IS->fail())
{
vtkErrorMacro("Unable to open file: " << sfilename.c_str());
@@ -854,7 +854,7 @@ int vtkPEnSightGoldReader::ReadTensorsPerNode(const char* fileName, const char*
sfilename = fileName;
}
- this->IS = new ifstream(sfilename.c_str(), ios::in | ios::binary);
+ this->IS = new std::ifstream(sfilename.c_str(), std::ios::in | std::ios::binary);
if (this->IS->fail())
{
vtkErrorMacro("Unable to open file: " << sfilename.c_str());
@@ -980,7 +980,7 @@ int vtkPEnSightGoldReader::ReadScalarsPerElement(const char* fileName, const cha
sfilename = fileName;
}
- this->IS = new ifstream(sfilename.c_str(), ios::in | ios::binary);
+ this->IS = new std::ifstream(sfilename.c_str(), std::ios::in | std::ios::binary);
if (this->IS->fail())
{
vtkErrorMacro("Unable to open file: " << sfilename.c_str());
@@ -1187,7 +1187,7 @@ int vtkPEnSightGoldReader::ReadVectorsPerElement(const char* fileName, const cha
sfilename = fileName;
}
- this->IS = new ifstream(sfilename.c_str(), ios::in | ios::binary);
+ this->IS = new std::ifstream(sfilename.c_str(), std::ios::in | std::ios::binary);
if (this->IS->fail())
{
vtkErrorMacro("Unable to open file: " << sfilename.c_str());
@@ -1356,7 +1356,7 @@ int vtkPEnSightGoldReader::ReadTensorsPerElement(const char* fileName, const cha
sfilename = fileName;
}
- this->IS = new ifstream(sfilename.c_str(), ios::in | ios::binary);
+ this->IS = new std::ifstream(sfilename.c_str(), std::ios::in | ios::binary);
if (this->IS->fail())
{
vtkErrorMacro("Unable to open file: " << sfilename.c_str());
diff --git a/VTKExtensions/IOEnSight/vtkPEnSightReader.cxx b/VTKExtensions/IOEnSight/vtkPEnSightReader.cxx
index 4f4840f5c..dd515e5ca 100644
--- a/VTKExtensions/IOEnSight/vtkPEnSightReader.cxx
+++ b/VTKExtensions/IOEnSight/vtkPEnSightReader.cxx
@@ -1319,7 +1319,7 @@ int vtkPEnSightReader::ReadCaseFile()
sfilename = this->CaseFileName;
}
- this->IS = new ifstream(sfilename.c_str(), ios::in);
+ this->IS = new std::ifstream(sfilename.c_str(), ios::in);
if (this->IS->fail())
{
vtkErrorMacro("Unable to open file: " << sfilename.c_str());
diff --git a/VTKExtensions/IOEnSight/vtkPVEnSightMasterServerReader.cxx b/VTKExtensions/IOEnSight/vtkPVEnSightMasterServerReader.cxx
index 5768eb32f..8bbc582ae 100644
--- a/VTKExtensions/IOEnSight/vtkPVEnSightMasterServerReader.cxx
+++ b/VTKExtensions/IOEnSight/vtkPVEnSightMasterServerReader.cxx
@@ -429,7 +429,7 @@ int vtkPVEnSightMasterServerReader::ParseMasterServerFile()
}
// Open the file for reading.
- ifstream fin(sfilename.c_str(), ios::in);
+ std::ifstream fin(sfilename.c_str(), std::ios::in);
if (!fin)
{
vtkErrorMacro("Unable to open file: " << sfilename.c_str());
diff --git a/VTKExtensions/IOEnSight/vtkPVEnSightMasterServerReader2.cxx b/VTKExtensions/IOEnSight/vtkPVEnSightMasterServerReader2.cxx
index e7701d458..a358b9df0 100644
--- a/VTKExtensions/IOEnSight/vtkPVEnSightMasterServerReader2.cxx
+++ b/VTKExtensions/IOEnSight/vtkPVEnSightMasterServerReader2.cxx
@@ -512,7 +512,7 @@ int vtkPVEnSightMasterServerReader2::ParseMasterServerFile()
}
// Open the file for reading.
- ifstream fin(sfilename.c_str(), ios::in);
+ std::ifstream fin(sfilename.c_str(), std::ios::in);
if (!fin)
{
vtkErrorMacro("Unable to open file: " << sfilename.c_str());
diff --git a/VTKExtensions/IOSPCTH/vtkSpyPlotReader.cxx b/VTKExtensions/IOSPCTH/vtkSpyPlotReader.cxx
index 1af09a68e..4aba88655 100644
--- a/VTKExtensions/IOSPCTH/vtkSpyPlotReader.cxx
+++ b/VTKExtensions/IOSPCTH/vtkSpyPlotReader.cxx
@@ -1289,7 +1289,7 @@ int vtkSpyPlotReader::MergeVectors(vtkDataSetAttributes* da, vtkDataArray* a1, v
//-----------------------------------------------------------------------------
int vtkSpyPlotReader::CanReadFile(const char* fname)
{
- ifstream ifs(fname, ios::binary | ios::in);
+ std::ifstream ifs(fname, std::ios::binary | std::ios::in);
if (!ifs)
{
return 0;
diff --git a/VTKExtensions/IOSPCTH/vtkSpyPlotReaderMap.cxx b/VTKExtensions/IOSPCTH/vtkSpyPlotReaderMap.cxx
index c7e1bac87..157768255 100644
--- a/VTKExtensions/IOSPCTH/vtkSpyPlotReaderMap.cxx
+++ b/VTKExtensions/IOSPCTH/vtkSpyPlotReaderMap.cxx
@@ -83,7 +83,7 @@ bool vtkSpyPlotReaderMap::Initialize(const char* filename)
{
this->Clean(NULL);
- ifstream ifs(filename);
+ std::ifstream ifs(filename);
if (!ifs)
{
vtkGenericWarningMacro("Error opening file " << filename);
@@ -238,7 +238,7 @@ bool vtkSpyPlotReaderMap::InitializeFromSpyFile(const char* filename)
bool vtkSpyPlotReaderMap::InitializeFromCaseFile(const char* filename)
{
// Setup the filemap and spcth structures
- ifstream ifs(filename);
+ std::ifstream ifs(filename);
if (!ifs)
{
vtkGenericWarningMacro("Error opening file " << filename);
diff --git a/VTKExtensions/IOSPCTH/vtkSpyPlotUniReader.cxx b/VTKExtensions/IOSPCTH/vtkSpyPlotUniReader.cxx
index 7dfe451c9..f4ea91928 100644
--- a/VTKExtensions/IOSPCTH/vtkSpyPlotUniReader.cxx
+++ b/VTKExtensions/IOSPCTH/vtkSpyPlotUniReader.cxx
@@ -212,7 +212,7 @@ int vtkSpyPlotUniReader::MakeCurrent()
}
std::vector<unsigned char> arrayBuffer;
- ifstream ifs(this->FileName, ios::binary | ios::in);
+ std::ifstream ifs(this->FileName, std::ios::binary | std::ios::in);
vtkSpyPlotIStream spis;
spis.SetStream(&ifs);
int dump;
@@ -1358,7 +1358,7 @@ int vtkSpyPlotUniReader::ReadInformation()
vtkErrorMacro("FileName not specified");
return 0;
}
- ifstream ifs(this->FileName, ios::binary | ios::in);
+ std::ifstream ifs(this->FileName, std::ios::binary | std::ios::in);
if (!ifs)
{
vtkErrorMacro("Cannot open file: " << this->FileName);
|