VTK issueshttps://gitlab.kitware.com/vtk/vtk/-/issues2023-07-26T07:37:12-04:00https://gitlab.kitware.com/vtk/vtk/-/issues/19029SPDX: Improve tracking between update.sh and SPDX info in 3rd parties2023-07-26T07:37:12-04:00Mathieu Westphal (Kitware)SPDX: Improve tracking between update.sh and SPDX info in 3rd partiesThe following discussion from !10272 should be addressed:
- [ ] @ben.boeckel started a [discussion](https://gitlab.kitware.com/vtk/vtk/-/merge_requests/10272#note_1384757): (+4 comments)
> This is going to get out-of-sync very eas...The following discussion from !10272 should be addressed:
- [ ] @ben.boeckel started a [discussion](https://gitlab.kitware.com/vtk/vtk/-/merge_requests/10272#note_1384757): (+4 comments)
> This is going to get out-of-sync very easily. Can we read from `update.sh` directly where possible? This can be a VTK-private API (i.e., not installed).Ben BoeckelBen Boeckelhttps://gitlab.kitware.com/vtk/vtk/-/issues/19028Fail to load polydata from ASCII .vtk file if any array contain a nan value2023-07-25T11:11:20-04:00Andras LassoFail to load polydata from ASCII .vtk file if any array contain a nan valueIf there is an invalid value in any of the data arrays then the saved an ASCII .vtk file then VTK cannot read the file that it has written.
The invalid value is saved as `-nan(ind)`. When you try to load it with VTK then you get the err...If there is an invalid value in any of the data arrays then the saved an ASCII .vtk file then VTK cannot read the file that it has written.
The invalid value is saved as `-nan(ind)`. When you try to load it with VTK then you get the error: `ERROR: In vtkDataReader.cxx, line 1978\nvtkPolyDataReader (000002D320606C40): Unsupported data type:`
Saving/loading works if .vtp file or binary .vtk file is used.
How to reproduce:
- Download and unzip sample data from https://github.com/lassoan/PublicTestingData/releases/download/data/20230723-VtkFileWithNanLoadFailed.zip
- Load Network-binary.vtk using vtkPolyDataReader
- Save Network-ascii.vtk using vtkPolyDataReader using ASCII format (for convenience, this file is included in the sample data set, too)
- Load the just created Network-ascii.vtk using vtkPolyDataReader => ERROR!
See user error report at: https://discourse.slicer.org/t/error-exporting-and-importing-vtk/30733/5?u=lassoanhttps://gitlab.kitware.com/vtk/vtk/-/issues/19032TestSockets in Parallel/Core has not run since VTK 62023-07-25T09:28:37-04:00David GobbiTestSockets in Parallel/Core has not run since VTK 6During the VTK 6 modularization, `TestSockets.py` was moved from `Parallel` to `Parallel/Core` but was never made to run at its new location. The purpose of `TestSockets.py` is to verify that `vtkSocket` works properly. Note that this ...During the VTK 6 modularization, `TestSockets.py` was moved from `Parallel` to `Parallel/Core` but was never made to run at its new location. The purpose of `TestSockets.py` is to verify that `vtkSocket` works properly. Note that this test also has two C++ components, `SocketServer.cxx` and `SocketClient.cxx`, that must be compiled into executables so that they can be used by `TestSockets.py`.
See also #18781 which mentions other inactive VTK Python tests that have been re-activated.
For reference, in VTK 5 this test was run as follows:
```
ADD_TEST(Sockets-image ${PYTHON_EXECUTABLE}
${VTK_SOURCE_DIR}/Parallel/Testing/Cxx/TestSockets.py
${EXECUTABLE_OUTPUT_PATH}/SocketServer
${EXECUTABLE_OUTPUT_PATH}/SocketClient
${VTK_DATA_ROOT}
Baseline/Parallel/SocketClient.cxx.png
${VTK_BINARY_DIR}/Testing/Temporary)
```https://gitlab.kitware.com/vtk/vtk/-/issues/19025Cxx tests that aren't in any CMakeLists.txt2023-07-25T08:25:34-04:00David GobbiCxx tests that aren't in any CMakeLists.txtThere are several tests that exist that aren't part of the build.
Some of these were accidentally dropped when the VTK directory structure was shuffled.
Ideally, these tests should be:
1. added to the CMakeLists.txt, if they run
2. fi...There are several tests that exist that aren't part of the build.
Some of these were accidentally dropped when the VTK directory structure was shuffled.
Ideally, these tests should be:
1. added to the CMakeLists.txt, if they run
2. fixed, if they just need simple updates
3. deleted, if they are no longer relevant
- [ ] `Charts/Core/Testing/Cxx/TestFreeTypeRender.cxx`
- [ ] `Charts/Core/Testing/Cxx/TestQtContextUnicode.cxx`
- [ ] `Charts/Core/Testing/Cxx/TestQtDiagram.cxx`
- [ ] `Common/Core/Testing/Cxx/TestVariantArray.cxx`
- [ ] `Common/DataModel/Testing/Cxx/LagrangeInterpolation.cxx`
- [ ] `Common/DataModel/Testing/Cxx/PointLocator.cxx`
- [ ] `Domains/Chemistry/Testing/Cxx/TestOpenQubeElectronicData.cxx`
- [ ] `Domains/Chemistry/Testing/Cxx/TestOpenQubeMOPACDensity.cxx`
- [ ] `Domains/Chemistry/Testing/Cxx/TestOpenQubeMOPACOrbital.cxx`
- [ ] `Filters/Geometry/Testing/Cxx/TestRectilinearGridPartitioner.cxx`
- [ ] `Filters/Geometry/Testing/Cxx/TestStructuredGridPartitioner.cxx`
- [ ] `Filters/ParallelDIY2/Testing/Cxx/TestPStructuredGridGhostDataGenerator.cxx`
- [ ] `Filters/Sources/Testing/Cxx/ArrayAPIDenseCoordinates.cxx`
- [ ] `Filters/Sources/Testing/Cxx/ArrayDiagonalMatrixSource.cxx`
- [ ] `IO/AMR/Testing/Cxx/TestAMRReadWrite.cxx`
- [ ] `IO/Export/Testing/Cxx/TestLinePlotGL2PS.cxx`
- [ ] `IO/Infovis/Testing/Cxx/TestDelimitedTextReader.cxx`
- [ ] `IO/Infovis/Testing/Cxx/TestTulipReader.cxx`
- [ ] `IO/Infovis/Testing/Cxx/TestTulipReaderClusters.cxx`
- [ ] `IO/SQL/Testing/Cxx/TestSQLGraphReader.cxx`
- [ ] `Infovis/Core/Testing/Cxx/TestKCoreDecomposition.cxx`
- [ ] `Infovis/Core/Testing/Cxx/TestStringToCategory.cxx`
- [ ] `Infovis/Layout/Testing/Cxx/TestArcEdges.cxx`
- [ ] `Infovis/Layout/Testing/Cxx/TestGroupLeafVertices.cxx`
- [ ] `Infovis/Layout/Testing/Cxx/TestKCoreLayout.cxx`
- [ ] `Infovis/Layout/Testing/Cxx/TestKdTreeBoxSelection.cxx`
- [ ] `Infovis/Layout/Testing/Cxx/TestPruneTreeFilter.cxx`
- [ ] `Infovis/Layout/Testing/Cxx/TestSimple3DCirclesStrategy.cxx`
- [ ] `Interaction/Widgets/Testing/Cxx/TestAxesTransformWidget.cxx`
- [ ] `Interaction/Widgets/Testing/Cxx/vtkOrientedPolygonalHandleRepresentation3DTest1.cxx`
- [ ] `Interaction/Widgets/Testing/Cxx/vtkPolygonalHandleRepresentation3DTest1.cxx`
- [x] `Rendering/Core/Testing/Cxx/TestAreaPickerMultiblock.cxx` (removed in !10332)
- [ ] `Rendering/Core/Testing/Cxx/TestTDxGeo.cxx`
- [ ] `Rendering/Core/Testing/Cxx/TestTranslucentLUTDepthPeelingPass.cxx`
- [ ] `Rendering/OpenGL2/Testing/Cxx/TestFluidDemo.cxx`
- [ ] `Rendering/OpenGL2/Testing/Cxx/TestValuePass2.cxx`
- [ ] `Views/Infovis/Testing/Cxx/TestQtLabelStrategy.cxx`
- [ ] `Views/Infovis/Testing/Cxx/TestQtTreeRingLabeler.cxx`Ben BoeckelBen Boeckelhttps://gitlab.kitware.com/vtk/vtk/-/issues/19019Liblas library is outdated and crashes with newer LAS files2023-07-25T06:36:06-04:00Timothée Coubletimothee.couble@kitware.comLiblas library is outdated and crashes with newer LAS filesHi,
Liblas has been replaced by PDAL (see https://liblas.org/) and the project is no longer in development. It can't read newer LAS file and paraview crash if we try (see [crash.log](/uploads/9fe241d0d5111cacd42bb6ce3226b24c/crash.log))...Hi,
Liblas has been replaced by PDAL (see https://liblas.org/) and the project is no longer in development. It can't read newer LAS file and paraview crash if we try (see [crash.log](/uploads/9fe241d0d5111cacd42bb6ce3226b24c/crash.log)).
As vtk already have a PDAL reader, should we remove liblas source from vtk/paraview? Or at least write a warning about non-supporting LAS > 1.3 versions?https://gitlab.kitware.com/vtk/vtk/-/issues/18170ObjectFactory needs an RAII way to enable/disable overrides2023-07-08T09:06:20-04:00Ben BoeckelObjectFactory needs an RAII way to enable/disable overridesThe API currently is very anemic here. There's a way to turn on and off *all* overrides of a given class. There's no way to (ergonomically) query and restore the state either. One would need to iterate over the registered object factorie...The API currently is very anemic here. There's a way to turn on and off *all* overrides of a given class. There's no way to (ergonomically) query and restore the state either. One would need to iterate over the registered object factories, remember the state, flip the desired states, make the object in question, then finally restore the state.
This is:
- finicky
- error-prone
- not at all thread-aware (e.g., new factories could come in, other threads do this machination too, etc.)
There should be a way to scope an object that does this. Something like:
```c++
vtkFactoryable* base = nullptr;
{
vtkFactoryModifier modifer("vtkFactoryable");
// modifier.DisableAllOverloads();
modifier.DisableOverload("vtkFactoryWeDontWantHere");
base = vtkFactoryable::New();
// `modifer` goes out of scope and restores the state
}
```
Cc: @brad.king @ken-martin @utkarsh.ayachithttps://gitlab.kitware.com/vtk/vtk/-/issues/19023vtkInteractorStyleTrackballActor not working if vtkVertexGlyphFilter is used2023-07-08T06:05:16-04:00Andrew MacleanvtkInteractorStyleTrackballActor not working if vtkVertexGlyphFilter is usedPlease see [VTK window doesn’t show up?!…](https://discourse.vtk.org/t/vtk-window-doesnt-show-up/11891/7).
It has been verified using the VTK examples mentioned there. Namely using [ColoredPoints](https://examples.vtk.org/site/Cxx/PolyD...Please see [VTK window doesn’t show up?!…](https://discourse.vtk.org/t/vtk-window-doesnt-show-up/11891/7).
It has been verified using the VTK examples mentioned there. Namely using [ColoredPoints](https://examples.vtk.org/site/Cxx/PolyData/ColoredPoints/) also with [VertexGlyphFilter](https://examples.vtk.org/site/Cxx/Filtering/VertexGlyphFilter/).
Yet it works here [TrackballActor](https://examples.vtk.org/site/Cxx/Interaction/TrackballActor/).https://gitlab.kitware.com/vtk/vtk/-/issues/19022Legacy vtkDataReader doesn't support distributing structured data2023-07-06T11:59:15-04:00Mathieu Westphal (Kitware)Legacy vtkDataReader doesn't support distributing structured dataLegacy vtkDataReader doesn't support distributing structured data, but it should.
Extent are not taken into account.
Steps to reproduce:
- Run paraview distributed
- Open IronProtein.vtk
- Data is not distributedLegacy vtkDataReader doesn't support distributing structured data, but it should.
Extent are not taken into account.
Steps to reproduce:
- Run paraview distributed
- Open IronProtein.vtk
- Data is not distributedhttps://gitlab.kitware.com/vtk/vtk/-/issues/18102VTK_NO_PYTHON_THREADS and VTK_PYTHON_FULL_THREADSAFE should be exposed in cmake2023-07-03T05:16:06-04:00Mathieu Westphal (Kitware)VTK_NO_PYTHON_THREADS and VTK_PYTHON_FULL_THREADSAFE should be exposed in cmakeVTK_NO_PYTHON_THREADS and VTK_PYTHON_FULL_THREADSAFE are two variables that can be set manually but are not declared as CMake options, making them hidden.
They should be declared as cmake options.VTK_NO_PYTHON_THREADS and VTK_PYTHON_FULL_THREADSAFE are two variables that can be set manually but are not declared as CMake options, making them hidden.
They should be declared as cmake options.https://gitlab.kitware.com/vtk/vtk/-/issues/18830`vtkpython -h` raises exception when VTK is compiled with `VTK_PYTHON_FULL_TH...2023-07-03T05:16:05-04:00Christos Tsolakis`vtkpython -h` raises exception when VTK is compiled with `VTK_PYTHON_FULL_THREADSAFE`Compiling a recent vtk (6801d0274d2adac9a8fc23bfc6a9848145eeae6e) with python enabled and `VTK_PYTHON_FULL_THREADSAFE=ON` causes `vtkpython` to fail when an argument is passed like for example `vtkpython -h` or `--version`.
Below the ...Compiling a recent vtk (6801d0274d2adac9a8fc23bfc6a9848145eeae6e) with python enabled and `VTK_PYTHON_FULL_THREADSAFE=ON` causes `vtkpython` to fail when an argument is passed like for example `vtkpython -h` or `--version`.
Below the result of `vtkpython --help`
Python 3.10.10
```
...
PYTHONDEVMODE: enable the development mode.
PYTHONPYCACHEPREFIX: root directory for bytecode cache (pyc) files.
PYTHONWARNDEFAULTENCODING: enable opt-in EncodingWarning for 'encoding=None'.
Fatal Python error: PyEval_SaveThread: the function must be called with the GIL held, but the GIL is released (the current Python thread state is NULL)
Python runtime state: preinitialized
Loguru caught a signal: SIGABRT
Stack trace:
11 0x5569a4b3d45e ./bin/vtkpython(+0x145e) [0x5569a4b3d45e]
10 0x7fcefd561083 __libc_start_main + 243
9 0x5569a4b3d2df ./bin/vtkpython(+0x12df) [0x5569a4b3d2df]
8 0x7fcefd536807 vtkPythonInterpreter::PyMain(int, char**) + 695
7 0x7fcefd53600e vtkPythonInterpreter::InitializeWithArgs(int, int, char**) + 1150
6 0x7fcefcbe76f6 /lib/x86_64-linux-gnu/libpython3.10.so.1.0(+0x1e16f6) [0x7fcefcbe76f6]
5 0x7fcefcbe7ce6 /lib/x86_64-linux-gnu/libpython3.10.so.1.0(+0x1e1ce6) [0x7fcefcbe7ce6]
4 0x7fcefcba3969 /lib/x86_64-linux-gnu/libpython3.10.so.1.0(+0x19d969) [0x7fcefcba3969]
3 0x7fcefca76caf /lib/x86_64-linux-gnu/libpython3.10.so.1.0(+0x70caf) [0x7fcefca76caf]
2 0x7fcefd55f859 abort + 299
1 0x7fcefd58000b gsignal + 203
0 0x7fcefd580090 /lib/x86_64-linux-gnu/libc.so.6(+0x43090) [0x7fcefd580090]
( 0.001s) [main thread ] :0 FATL| Signal: SIGABRT
Aborted (core dumped)
```
python 3.9.16 exhibits the same issue.
The signal comes from:
```
Program received signal SIGABRT, Aborted.
0x00007ffff7dfa00b in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0 0x00007ffff7dfa00b in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007ffff7dd9859 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007ffff72f0caf in ?? () from /lib/x86_64-linux-gnu/libpython3.10.so.1.0
#3 0x00007ffff741d969 in _Py_FatalErrorFunc () from /lib/x86_64-linux-gnu/libpython3.10.so.1.0
#4 0x00007ffff7461ce6 in _Py_FatalError_TstateNULL () from /lib/x86_64-linux-gnu/libpython3.10.so.1.0
#5 0x00007ffff74616f6 in PyEval_SaveThread () from /lib/x86_64-linux-gnu/libpython3.10.so.1.0
#6 0x00007ffff7db000e in vtkPythonInterpreter::InitializeWithArgs (initsigs=1, argc=2, argv=0x555555580000) at ../vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx:344
#7 0x00007ffff7db0807 in vtkPythonInterpreter::PyMain (argc=<optimized out>, argv=<optimized out>) at ../vtk/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx:595
#8 0x00005555555552df in main (argc=2, argv=0x7fffffffdba8) at ../vtk/Wrapping/Python/vtkPythonAppInit.cxx:119
```
which points to https://gitlab.kitware.com/vtk/vtk/-/blob/master/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx#L344
for python 3.8.10 the issue is similar but the signal comes from `PyEval_InitThreads()` a few lines above.
https://gitlab.kitware.com/vtk/vtk/-/blob/master/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx#L339https://gitlab.kitware.com/vtk/vtk/-/issues/19014vtkScalarBarActor: in vertical mode, add option to rotate title so it is alig...2023-06-29T19:01:46-04:00Cory Quammencory.quammen@kitware.comvtkScalarBarActor: in vertical mode, add option to rotate title so it is aligned verticallyAdd an option to vtkScalarBarActor to orient the title with the color legend when the legend is oriented vertically. The image below, from ParaView, shows the desired result.
![image](/uploads/89b6e3eee0a7200b01469043405cba12/image.png)...Add an option to vtkScalarBarActor to orient the title with the color legend when the legend is oriented vertically. The image below, from ParaView, shows the desired result.
![image](/uploads/89b6e3eee0a7200b01469043405cba12/image.png)
For reference, ParaView's scalar bar is implemented in a different class whose API documentation is [here](https://kitware.github.io/paraview-docs/nightly/cxx/classvtkContext2DScalarBarActor.html). It by default orients the title vertically and provides an option to force the title to be horizontal using a ForceHorizontalTitle boolean property. There is no requirement to make the API match, but it is here as a consideration.Scott WittenburgScott Wittenburg2023-06-30https://gitlab.kitware.com/vtk/vtk/-/issues/19008Explore JavaScript wrappers for VTK through emscripten2023-06-28T11:37:25-04:00Jaswant Panchumarti (Kitware)Explore JavaScript wrappers for VTK through emscriptenVTK can produce binaries for the wasm32 architecture. In order for web-applications to actually make use of these binaries, they can follow 3 approaches listed in increasing order of difficulty:
1. Write application logic in C++ using VT...VTK can produce binaries for the wasm32 architecture. In order for web-applications to actually make use of these binaries, they can follow 3 approaches listed in increasing order of difficulty:
1. Write application logic in C++ using VTK C++. Key functionality is exposed via emscripten bindings that accept or return POD types or a container of those data types. This design is used in [vtkWasmBenchmarks/Cones](https://github.com/Kitware/vtkWasmBenchmarks/blob/main/Cones/Cones.h)
2. Wrap desirable VTK C++ API by hand and consume it in javascript. Ex: [VTK/Examples/Emscripten/Cxx/WrappedMace](https://gitlab.kitware.com/vtk/vtk/-/blob/master/Examples/Emscripten/Cxx/WrappedMace/WrappedMace.cxx)
3. Write webassembly instructions by hand along with javascript to parse the wasm binary and acquire the VTK class and function entry points. For small libraries with <100 functions, this is acceptable. For VTK, it's very tedious to follow this approach.
The purpose of this issue is to flesh out the process of autogenerated javascript wrappers for VTK through `embind` - the binding component of `emscripten` toolchain. Emscripten is widely used to bring C/C++ projects to JS like hdf5, opencascade, ffmpeg, google earth, autocad, Qt and many more, see [Made with WebAssembly](https://madewithwebassembly.com/). All that needs to be done is a JavaScript front-end for the `vtkParse` backend similar to `vtkWrapJava` and `vtkWrapPython`
# Alternatives to emscripten
[Cheerp](https://leaningtech.com/cheerp-3-0-the-most-advanced-c-compiler-for-the-web-now-permissively-licensed/) has built-in garbage collection of C++ objects due to a different memory model. Looks like it has commercial license and not as good of a community support like emscripten.
[nbind](https://github.com/charto/nbind) uses emscripten. It has a different syntax from `embind`. TypeScript definitions are auotmatically generated. However, it seems like `nbind` is now inactive. See [nbind vs embind](https://github.com/emscripten-core/emscripten/issues/8344) for a discussion on the missing features in `nbind`.
Cc: @cory.quammen @sebastien.jourdain @matt-mccormick @will.schroeder @jcfrJaswant Panchumarti (Kitware)Jaswant Panchumarti (Kitware)https://gitlab.kitware.com/vtk/vtk/-/issues/19016vtkExtractHistogram has as memory access issue when using Calculate Averages2023-06-23T05:02:47-04:00Bruno SantosvtkExtractHistogram has as memory access issue when using Calculate AveragesAs an example, if we have an input dataset has a range of values from 1.1 to over 100, but then use a custom bin range of 0 to 4, it works just fine.
If we then turn on the option for Calculate Averages... then the Y axis values will be ...As an example, if we have an input dataset has a range of values from 1.1 to over 100, but then use a custom bin range of 0 to 4, it works just fine.
If we then turn on the option for Calculate Averages... then the Y axis values will be something very strange coming out from whatever RAM had when the array was created/asked for.
Attached is the file [bottom_928a.vtk](/uploads/8b570dbdef3948a05e65b5195b889cca/bottom_928a.vtk), which can be used as a test case for reproducing this issue. The options to be used with `vtkExtractHistogram` are as follows (using ParaView's interface out of convenience to set it up):
* Input array: `mag(wallShrearStress)`
* Calculate Averages: On
* Show only on the _Series Parameters_: `Area_total`
* Use Custom Bin Ranges:
* If you use 1 to 4, it works just fine.
* If you use 0 to 4, it gives rubbish on the Y axis... either 0, or 1e-72, or 1e+64, or 1e+256...
You can use this save state with ParaView 5.11.1: [Works.pvsm](/uploads/3bc28645d204defb8f94829ae9d9e398/Works.pvsm)
I looked online for similar complaints and found this thread: https://discourse.paraview.org/t/histogram-calculate-average-bug/5100
I inspected the code, to try and deduce the origin of the error, but only managed to figure out that this bug still exists:
1. When it was still in ParaView some 4 years ago: https://gitlab.kitware.com/paraview/paraview/-/blob/62bb8893c7ce0e231ed83333da31b804f45421d8/ParaViewCore/VTKExtensions/Core/vtkExtractHistogram.cxx
2. When it was transferred to VTK: https://gitlab.kitware.com/vtk/vtk/-/commit/3a6007327825d0f949d7fcfff193d9fef8475830#22779dba3175111eb489d402556ec31ace3059c5
3. In the current master branch: https://gitlab.kitware.com/vtk/vtk/-/blob/master/Filters/Statistics/vtkExtractHistogram.cxx
My current suspicion is that the check within `RequestData`:
```
if (binValues->GetValue(i))
```
is flawed somehow, possibly because the first bin is never filled in and so it divides by a non-zero garbage value within the if block.
Unfortunately I don't have a development environment ready for VTK+ParaView at the moment, in order to confirm my suspicion.https://gitlab.kitware.com/vtk/vtk/-/issues/18963Segfault with vtkBooleanOperationPolyDataFilter (VTK 9.2.6)2023-06-19T13:55:21-04:00JDynastySegfault with vtkBooleanOperationPolyDataFilter (VTK 9.2.6)```
std::string inputFilename1 = "E:/vtk/c12im.stl";
vtkSmartPointer<vtkSTLReader> reader1 = vtkSmartPointer<vtkSTLReader>::New();
reader1->SetFileName(inputFilename1.c_str());
reader1->Update();
std::string inputFilename2 = "E:/vtk/c1....```
std::string inputFilename1 = "E:/vtk/c12im.stl";
vtkSmartPointer<vtkSTLReader> reader1 = vtkSmartPointer<vtkSTLReader>::New();
reader1->SetFileName(inputFilename1.c_str());
reader1->Update();
std::string inputFilename2 = "E:/vtk/c1.stl";
vtkSmartPointer<vtkSTLReader> reader2 = vtkSmartPointer<vtkSTLReader>::New();
reader2->SetFileName(inputFilename2.c_str());
reader2->Update();
vtkSmartPointer<vtkTriangleFilter> filter1 = vtkSmartPointer<vtkTriangleFilter>::New();
filter1->SetInputData(reader1->GetOutput());
filter1->Update();
vtkSmartPointer<vtkTriangleFilter> filter2 = vtkSmartPointer<vtkTriangleFilter>::New();
filter2->SetInputData(reader2->GetOutput());
filter2->Update();
vtkSmartPointer<vtkBooleanOperationPolyDataFilter> boolFilter = vtkSmartPointer<vtkBooleanOperationPolyDataFilter>::New();
boolFilter->SetInputConnection(0, filter1->GetOutputPort());
boolFilter->SetInputConnection(1, filter2->GetOutputPort());
boolFilter->SetOperationToIntersection();
boolFilter->Update();
```
Result:
```
0xC0000005: Access conflict occurred while reading at 0xFFFFFFFFFFFFFFFF w
```https://gitlab.kitware.com/vtk/vtk/-/issues/17860Follow-up from "Clarified and expanded third party Updating doc"2023-06-19T08:34:02-04:00Ben BoeckelFollow-up from "Clarified and expanded third party Updating doc"The following discussion from !5104 should be addressed:
- [ ] @hjmjohnson started a [discussion](https://gitlab.kitware.com/vtk/vtk/-/merge_requests/5104#note_738162): (+1 comment)
> @ben.boeckel Is this an incremental improvemen...The following discussion from !5104 should be addressed:
- [ ] @hjmjohnson started a [discussion](https://gitlab.kitware.com/vtk/vtk/-/merge_requests/5104#note_738162): (+1 comment)
> @ben.boeckel Is this an incremental improvement that should be added, and allow the perfect documentation to be added later?Ben BoeckelBen Boeckelhttps://gitlab.kitware.com/vtk/vtk/-/issues/18736CatalystConduit module: add macOS CI2023-06-17T21:52:05-04:00Ben BoeckelCatalystConduit module: add macOS CIThe following discussion from !8926 should be addressed:
- [ ] @ben.boeckel started a [discussion](https://gitlab.kitware.com/vtk/vtk/-/merge_requests/8926#note_1164344): (+9 comments)
> So the `catalyst` install is just under `.g...The following discussion from !8926 should be addressed:
- [ ] @ben.boeckel started a [discussion](https://gitlab.kitware.com/vtk/vtk/-/merge_requests/8926#note_1164344): (+9 comments)
> So the `catalyst` install is just under `.gitlab/build/install`? That seems awfully generic. Why not `.gitlab/catalyst`?https://gitlab.kitware.com/vtk/vtk/-/issues/18431Build Android armeabi-v7a with VTK9.1.0, get error: unknown target CPU 'armv7-a'2023-06-17T21:49:17-04:00ingen2019Build Android armeabi-v7a with VTK9.1.0, get error: unknown target CPU 'armv7-a'```
[ 10%] Built target CommonCore
[ 10%] Detecting builtin compiler preprocessor defines for VTKCompileTools
clang++: warning: treating 'c-header' input as 'c++-header' when in C++ mode, this behavior is deprecated [-Wdeprecated]
clang+...```
[ 10%] Built target CommonCore
[ 10%] Detecting builtin compiler preprocessor defines for VTKCompileTools
clang++: warning: treating 'c-header' input as 'c++-header' when in C++ mode, this behavior is deprecated [-Wdeprecated]
clang++: warning: argument unused during compilation: '-mthumb' [-Wunused-command-line-argument]
clang++: warning: argument unused during compilation: '-mfpu=vfpv3-d16' [-Wunused-command-line-argument]
clang++: warning: argument unused during compilation: '-mfloat-abi=softfp' [-Wunused-command-line-argument]
error: unknown target CPU 'armv7-a'
note: valid target CPU values are: nocona, core2, penryn, bonnell, atom, silvermont, slm, goldmont, goldmont-plus,
tremont, nehalem, corei7, westmere, sandybridge, corei7-avx, ivybridge, core-avx-i, haswell, core-avx2, broadwell,
skylake, skylake-avx512, skx, cannonlake, icelake-client, icelake-server, knl, knm, k8, athlon64, athlon-fx,
opteron, k8-sse3, athlon64-sse3, opteron-sse3, amdfam10, barcelona, btver1, btver2, bdver1, bdver2, bdver3,
bdver4, znver1, x86-64
make[5]: *** [CMakeFiles/VTKCompileTools_macros.dir/build.make:72: CMakeFiles/VTKCompileTools_macros.h] Error 1
make[4]: *** [CMakeFiles/Makefile2:1741: CMakeFiles/VTKCompileTools_macros.dir/all] Error 2
make[3]: *** [Makefile:136: all] Error 2
make[2]: *** [CMakeFiles/vtk-android.dir/build.make:86: CMakeExternals/Prefix/vtk-android-26-armeabi-v7a/src/vtk-android-stamp/vtk-android-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:111: CMakeFiles/vtk-android.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
```https://gitlab.kitware.com/vtk/vtk/-/issues/18994ImGui integration?2023-06-17T03:21:16-04:00Franck HOUSSENImGui integration?Is ImGui planned to be integrated (as Qt is) on the short or long term?
ImGui is great: https://github.com/ocornut/imgui.
An example of VTK-ImGui integration maybe found here https://github.com/trlsmax/imgui-vtk, but, is it planned som...Is ImGui planned to be integrated (as Qt is) on the short or long term?
ImGui is great: https://github.com/ocornut/imgui.
An example of VTK-ImGui integration maybe found here https://github.com/trlsmax/imgui-vtk, but, is it planned someday to have something like `cmake -DIMGUI=ON ..` (as for Qt)? Would be great! ;)
Franckhttps://gitlab.kitware.com/vtk/vtk/-/issues/18989VTK reader.SetBinaryInputString fails because the length of the binary string...2023-06-14T11:56:52-04:00Evan RoseVTK reader.SetBinaryInputString fails because the length of the binary string exceeds the maximum integer sizeHi all. I'm currently working on improving the speed of the PyVista contour function for structured grid data. As of right now, I'm attempting to contour multiple structured grids (which represent different types of data) using multiproc...Hi all. I'm currently working on improving the speed of the PyVista contour function for structured grid data. As of right now, I'm attempting to contour multiple structured grids (which represent different types of data) using multiprocessing with Python. This process works serially, but takes too long for the intended end users of the application I am developing. I've implemented Pools, a Producer/Consumer using a Queue, and attempted to use different multiprocessing libraries (such as mpire) to see if it was the multiprocessing software that is causing the issue. After thorough inspection, it seems it's on VTK's side rather than the multiprocessing libraries. Any help with this bug would be greatly appreciated. Or if there is something I can change on my side to make things work, that'd be great too. I'm essentially stuck trying to improve the processing speed of the contour function until I can figure this problem out.
Here is the error output I am getting when contouring with multiprocessing (every multiprocessing variation I've tried results in this error).
```text
Contouring cloud data.
with multiprocessing selected
24 workers are available.
Contouring By Type Progress: 0%| | 0/4 [00:00<?, ?it/s]
1.0 18.0 -- Data Range
1006046 -- Length of the active scalar array outputted by the PyVista contour function
memory size: 94639
1.0 31.0
2981674
memory size: 284763
1.0 30.0
5064492
memory size: 486707
1.0 51.0
31213673
memory size: 3009878
Exception in thread Thread-3 (_handle_results):
Traceback (most recent call last):
File "/Users/erose/anaconda3/envs/cloudvis/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
self.run()
File "/Users/erose/anaconda3/envs/cloudvis/lib/python3.11/threading.py", line 975, in run
self._target(*self._args, **self._kwargs)
File "/Users/erose/anaconda3/envs/cloudvis/lib/python3.11/multiprocessing/pool.py", line 579, in _handle_results
task = get()
^^^^^
File "/Users/erose/anaconda3/envs/cloudvis/lib/python3.11/multiprocessing/connection.py", line 250, in recv
return _ForkingPickler.loads(buf.getbuffer())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/erose/anaconda3/envs/cloudvis/lib/python3.11/site-packages/pyvista/core/dataobject.py", line 522, in __setstate__
reader.SetBinaryInputString(vtk_serialized, len(vtk_serialized))
OverflowError: SetBinaryInputString argument 2: value is out of range for int
```
The code that produces this error I'll attach below. (cubeList is a list of Iris Cubes.)
```python
def poolContour(cubeList):
n_workers = 2 * cpu_count()
print(f"{n_workers} workers are available.")
with Pool(n_workers) as p:
cntrs = p.map(ct.contourDataForPool, tqdm(cubeList,desc="Contouring By Type Progress"))
return cntrs
def contourDataForPool(cubeData):
'''
Returns a PyVista PolyData contoured surface, baseed on the resolution and type of surface being contoured.
Parameters:
- cubeData: an Iris Cube, representing the cloud/terrain data to be contoured
- res: a String representing the resolution of the contour to be produced
- type: a String representing the type of surface being contoured (cloud or terrain)
'''
cntr_z_scale = low_res_z_scale
cntr_z_offset = low_res_z_offset
cntr_label = "low_res_grid"
# if "elevation" in type: TYPE_ISOSURF = ELEV_ISOSURF
cube_cntr = grid_for_scalar_cube_sph(cubeData, z_scale=cntr_z_scale, z_offset=cntr_z_offset,
label=cntr_label, isGeo=True).cell_data_to_point_data(pass_cell_data=True)
TYPE_ISOSURF = ELEV_ISOSURF
# TYPE_ISOSURF = 50
cube_cntr = cube_cntr.contour(isosurfaces=TYPE_ISOSURF,compute_scalars=True)
print(np.nanmin(cube_cntr.active_scalars),np.nanmax(cube_cntr.active_scalars))
print(len(cube_cntr.active_scalars))
print("memory size: " + str(cube_cntr.actual_memory_size))
return cube_cntr
```
Thanks!https://gitlab.kitware.com/vtk/vtk/-/issues/19004SPDX Copyright information for module and third party is on one line2023-06-12T11:06:28-04:00Mathieu Westphal (Kitware)SPDX Copyright information for module and third party is on one lineWhen specifying copyright text for module or third party, the result will be on one line.
eg:
```
SPDX_COPYRIGHT_TEXT
Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper
Copyright (c) 2001-2019 Expat maint...When specifying copyright text for module or third party, the result will be on one line.
eg:
```
SPDX_COPYRIGHT_TEXT
Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper
Copyright (c) 2001-2019 Expat maintainers
```
Results in:
```
PackageCopyrightText: <text>
Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper Copyright (c) 2001-2019 Expat maintainers
</text>
```
When the correct result would be:
```
PackageCopyrightText: <text>
Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper
Copyright (c) 2001-2019 Expat maintainers
</text>
```
There is two ways to fix this.
1. Store the copyright verbatim in a text file and point to it in the vtk.module
2. Support repeated arg eg:
```
SPDX_COPYRIGHT_TEXT
Copyright \(c\) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper
SPDX_COPYRIGHT_TEXT
Copyright \(c\) 2001-2019 Expat maintainers
```
Note:
With third party, it looks a bit different:
```
PackageCopyrightText: <text>
Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper;Copyright (c) 2001-2019 Expat maintainers
</text>
```