VTK issueshttps://gitlab.kitware.com/vtk/vtk/-/issues2020-04-27T08:52:03-04:00https://gitlab.kitware.com/vtk/vtk/-/issues/17869Merge serial and parallel filters together2020-04-27T08:52:03-04:00T.J. CoronaMerge serial and parallel filters togetherAs part of vtk's maintenance, we should go after classes that offer analogous functionality but are split into serial and parallel implementations.
@utkarsh.ayachit @ben.boeckelAs part of vtk's maintenance, we should go after classes that offer analogous functionality but are split into serial and parallel implementations.
@utkarsh.ayachit @ben.boeckelhttps://gitlab.kitware.com/vtk/vtk/-/issues/17867Python QGLWidget interactor hangs on VTK9 RC3 wheels on Linux with PyQt < 5.14.12022-07-31T17:15:45-04:00Eric LarsonPython QGLWidget interactor hangs on VTK9 RC3 wheels on Linux with PyQt < 5.14.1Minimal example, fails for VTK9 RC3 wheels on (at least) PyQt5 5.12, 5.13.2, and 5.14.1 (EDIT: *on linux*):
```
import vtkmodules.qt
vtkmodules.qt.QVTKRWIBase = 'QGLWidget'
from vtk.qt.QVTKRenderWindowInteractor import QVTKRenderWindowIn...Minimal example, fails for VTK9 RC3 wheels on (at least) PyQt5 5.12, 5.13.2, and 5.14.1 (EDIT: *on linux*):
```
import vtkmodules.qt
vtkmodules.qt.QVTKRWIBase = 'QGLWidget'
from vtk.qt.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor
from vtkmodules.vtkRenderingUI import vtkGenericRenderWindowInteractor
from PyQt5.QtWidgets import QApplication, QMainWindow
app = app = QApplication([''])
window = QMainWindow()
interactor = QVTKRenderWindowInteractor(parent=window)
assert isinstance(interactor, QVTKRenderWindowInteractor)
interactor_gen = interactor.GetRenderWindow().GetInteractor()
assert isinstance(interactor_gen, vtkGenericRenderWindowInteractor)
interactor_gen.Initialize() # hangs on Linux + PyQt 5.13.2
```
It works:
- If I change the `QVTKRWIBase` to `QWidget`
- On PyQt 5.14.1 or above
- On macOS with 5.13.2
So it seems to be something about the combination of QGLWidget + Linux + PyQt5 < 5.14.2.https://gitlab.kitware.com/vtk/vtk/-/issues/17864Garbled output for vtkClipDataSet and vtkTableBasedClipDataSet2023-12-05T05:42:54-05:00Peter FranzGarbled output for vtkClipDataSet and vtkTableBasedClipDataSetI have an issue here when clipping an unstructured grid (which contains polyhedra and hexagonal prism cells) with either vtkClipDataSet or vtkTableBasedClipDataSet. The output looks garbled. This issue has been present in 8.2 and I have ...I have an issue here when clipping an unstructured grid (which contains polyhedra and hexagonal prism cells) with either vtkClipDataSet or vtkTableBasedClipDataSet. The output looks garbled. This issue has been present in 8.2 and I have also tested it with the current master branch.
Here's how the original grid looks:
![image](/uploads/b99dae8d4dc7f9531b56020b752b7e94/image.png)
And here's how the grid looks after clipping it with vtkTableBasedClipDataSet (output from vtkClipDataSet looks similar):
![image](/uploads/f43dcf8b9f5c844b18ae3bdd05450546/image.png)
I'll attach the input grid and a short testing program for it.
[main.cpp](/uploads/fe8f1a756b3289fa975432945ec61916/main.cpp)[grid.vtu](/uploads/fcfc69613d81f7ecdbc0d34a821907ce/grid.vtu)[TableBasedClipDataSet.vtu](/uploads/75528ba33b70e3f48c345f7e97fa714c/TableBasedClipDataSet.vtu)[ClipDataSet.vtu](/uploads/f0eea2cd0352b213ea4258ecc99dc674/ClipDataSet.vtu)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/17859VTK_RENDERINGPARALLELLIC_LINEINTEGRALCONVLOLUTION2D_TIMER. --> VTK_RENDERINGP...2020-04-20T09:18:26-04:00Hans JohnsonVTK_RENDERINGPARALLELLIC_LINEINTEGRALCONVLOLUTION2D_TIMER. --> VTK_RENDERINGPARALLELLIC_LINEINTEGRALCONVOLUTION2D_TIMERMany gitlab dashboard builds need updating.
CMake Warning at CMake/vtkSupportMacros.cmake:25 (message):
The 'VTK_RENDERINGPARALLELLIC_LINEINTEGRALCONVLOLUTION2D_TIMER' variable is
deprecated for 'VTK_RENDERINGPARALLELLIC_LINEINTEGR...Many gitlab dashboard builds need updating.
CMake Warning at CMake/vtkSupportMacros.cmake:25 (message):
The 'VTK_RENDERINGPARALLELLIC_LINEINTEGRALCONVLOLUTION2D_TIMER' variable is
deprecated for 'VTK_RENDERINGPARALLELLIC_LINEINTEGRALCONVOLUTION2D_TIMER'.
Call Stack (most recent call first):
Rendering/ParallelLIC/CMakeLists.txt:48 (vtk_deprecated_setting)
It seems that several dashboards need to have default values purged, or changes.https://gitlab.kitware.com/vtk/vtk/-/issues/17857Camera support in vtkGLTFImporter is incorrect2020-04-17T07:10:05-04:00Mathieu Westphal (Kitware)Camera support in vtkGLTFImporter is incorrectWhen importing the sample file from https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/Cameras, the result does not look like the expected screenshot from Khronos.
Left is vtkGLTFImporter, right is the reference screensh...When importing the sample file from https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/Cameras, the result does not look like the expected screenshot from Khronos.
Left is vtkGLTFImporter, right is the reference screenshot.
![2020-04-15-075717_1739x687_scrot](/uploads/67d971bb473386217107dd952d450baa/2020-04-15-075717_1739x687_scrot.png)https://gitlab.kitware.com/vtk/vtk/-/issues/17848libxml2 compile error2021-05-15T15:13:51-04:00skn123libxml2 compile errorOS: Windows 10
Compiler: VS 2019 community edition
Error:
```
3>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(231,5): warning MSB8064: Custom build for item "C:\srcs\...OS: Windows 10
Compiler: VS 2019 community edition
Error:
```
3>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(231,5): warning MSB8064: Custom build for item "C:\srcs\VTK\ThirdParty\libxml2\vtklibxml2\CMakeLists.txt" succeeded, but specified dependency "c:\srcs\vtk\thirdparty\libxml2\vtklibxml2\cmakelists.txt" does not exist. This may cause incremental build to work incorrectly.
3>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(231,5): warning MSB8064: Custom build for item "C:\srcs\VTK\ThirdParty\libxml2\vtklibxml2\CMakeLists.txt" succeeded, but specified dependency "c:\srcs\vtk\thirdparty\libxml2\vtklibxml2\config_cmake.h.in" does not exist. This may cause incremental build to work incorrectly.
3>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(231,5): warning MSB8064: Custom build for item "C:\srcs\VTK\ThirdParty\libxml2\vtklibxml2\CMakeLists.txt" succeeded, but specified dependency "c:\srcs\vtk\thirdparty\libxml2\vtklibxml2\include\libxml\xmlversion.h.in" does not exist. This may cause incremental build to work incorrectly.
3>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(231,5): warning MSB8064: Custom build for item "C:\srcs\VTK\ThirdParty\libxml2\vtklibxml2\CMakeLists.txt" succeeded, but specified dependency "c:\srcs\vtk\thirdparty\libxml2\vtklibxml2\libxml2platformtests.cmake" does not exist. This may cause incremental build to work incorrectly.
3>DOCBparser.c
3>C:\srcs\VTK\ThirdParty\libxml2\vtklibxml2\libxml.h(92,71): error C2061: syntax error: identifier 'LIBXML_ATTR_FORMAT'
3>C:\srcs\VTK\ThirdParty\libxml2\vtklibxml2\libxml.h(92,71): error C2059: syntax error: ';'
```
I checked this file and could not find the offending piece of code 'LIBXML_ATTR_FORMAT' in older versions. Has something changed?https://gitlab.kitware.com/vtk/vtk/-/issues/17847BUG: Class inconsistencies (and segfaults) introduced in VTK92020-04-13T14:15:00-04:00Eric LarsonBUG: Class inconsistencies (and segfaults) introduced in VTK9I am working on porting the Python Mayavi bindings for VTK to support VTK 9. In theory there should be nothing to do if everything in VTK 9 is consistent. I have noticed the following problems:
1. The `vtkJavaScriptDataWriter` class cau...I am working on porting the Python Mayavi bindings for VTK to support VTK 9. In theory there should be nothing to do if everything in VTK 9 is consistent. I have noticed the following problems:
1. The `vtkJavaScriptDataWriter` class causes a segfault when it is instantiated, then garbage collected by Python (see workaround [here](https://github.com/enthought/mayavi/pull/909/files#r407102276)). This is presumably a problem with the class destructor if the class is never really used? Either that, or calling some or all of the `Get` methods on the class -- we call only some of them (should be all; see point (2)) -- causes some internal memory problem that later causes things to die during destruction...?
2. In VTK <= 8.2, there were a handful of `Get` methods that, when called on instantiated (but otherwise unchanged) classes, would cause a segfault. This list has gotten much larger (see expanded list [here](https://github.com/enthought/mayavi/pull/909/files#r407102233))
3. In VTK <= 8.2, there were a handful of method that, when called, would return `None` instead of a default numeric value (even though they were designed to take numeric values). This list has gotten *much* longer for VTK 9 (see list [here](https://github.com/enthought/mayavi/pull/909/files#r407102168)).
I'm not sure which of these, if any, are worth fixing. I can and am working around them at the Python end, but they might suggest some internal problems with these classes, hence the issue here.
If any or all of them do indeed seem like bugs, in the future it might make sense to pull the latest `mayavi` version and try doing `python setup.py build` with it, as it will expose such inconsistencies immediately instead of seeing a bunch at release time. Basically it can serve as a consistency check that might be beneficial during PR review via CI.https://gitlab.kitware.com/vtk/vtk/-/issues/17845VTK::ChartsCoreCxx-TestLinePlotDouble performs illegal conversion of too-larg...2021-05-07T06:44:58-04:00Sean McBrideVTK::ChartsCoreCxx-TestLinePlotDouble performs illegal conversion of too-large double to floatSee: https://open.cdash.org/testDetails.php?test=868877365&build=6460445
```
/Users/builder/external/VTK/Charts/Core/vtkPlotPoints.cxx:612:42: runtime error: value -8.41471e+79 is outside the range of representable values of type 'float...See: https://open.cdash.org/testDetails.php?test=868877365&build=6460445
```
/Users/builder/external/VTK/Charts/Core/vtkPlotPoints.cxx:612:42: runtime error: value -8.41471e+79 is outside the range of representable values of type 'float'
SUMMARY: AddressSanitizer: undefined-behavior /Users/builder/external/VTK/Charts/Core/vtkPlotPoints.cxx:612:42 in
```
This comes from lines 61-63 here:
https://gitlab.kitware.com/vtk/vtk/-/blob/master/Charts/Core/Testing/Cxx/TestLinePlotDouble.cxx
I followed this down the rabbit hole, but it needs someone that knows these classes. ex:
https://gitlab.kitware.com/vtk/vtk/-/blob/master/Charts/Core/vtkPlotPoints.cxx
lines 604-627 (and elsewhere!) have various hardcoded expectations that the data is always `float`, there doesn't seem to be any support for `double`. There isn't even an `#include "vtkDoubleArray.h"`.
Or maybe the test should just be changed to use smaller numbers?https://gitlab.kitware.com/vtk/vtk/-/issues/17844[VTK 8.1.0] Incorrect picking world coordinates caused by MSAA antialiasing.2020-04-11T10:25:43-04:00PauloCarvalhoRJ[VTK 8.1.0] Incorrect picking world coordinates caused by MSAA antialiasing.Dear all,
Recently I switched to MSAA from FXAA to get better antialising results, but the use of MSAA introduced a bug in the world coordinates returned by picking.
Here is the correct picking location with antialiasing disabled (...Dear all,
Recently I switched to MSAA from FXAA to get better antialising results, but the use of MSAA introduced a bug in the world coordinates returned by picking.
Here is the correct picking location with antialiasing disabled (also correct with FXAA):
![image](/uploads/874a95ab22e4cc62b2c3f7539ed3f372/image.png)
Now, I enable MSAA and pick at the same cell of the model:
![image](/uploads/29ab137ede87959b0ea438bc7dc19204/image.png)
The picked location in screen coordinates are the same, but in world coordinates, picking results in a location right in front of the camera (notice the near-zero distance), which is clearly wrong. I'd really like to stick to MSAA because, IMO, its results are visually better than FXAA, despite the former being slower than the latter.
Here's how I enable MSAA in my code:
```cpp
//MSAA antialiasing
vtkOpenGLRenderWindow::SetGlobalMaximumNumberOfMultiSamples ( 8 );
QSurfaceFormat::setDefaultFormat ( QVTKOpenGLWidget::defaultFormat() );
_vtkwidget = new QVTKOpenGLWidget();
_renderer = vtkSmartPointer<vtkRenderer>::New();
_vtkwidget->SetRenderWindow(vtkGenericOpenGLRenderWindow::New());
_vtkwidget->GetRenderWindow()->AddRenderer(_renderer);
_vtkwidget->setFocusPolicy(Qt::StrongFocus);
//MSAA antialiasing
_vtkwidget->GetRenderWindow()->SetMultiSamples( 4 );
```
Here's the code that outputs the world coordinates returned by picking (sanity checks ommited for clarity):
```cpp
// Get pick position in 2D screen coordinates.
int* clickPos = this->GetInteractor()->GetEventPosition();
// Get the 3D object under the 2D screen coordinates (ray casting).
vtkSmartPointer<vtkPropPicker> picker = vtkSmartPointer<vtkPropPicker>::New();
picker->Pick(clickPos[0], clickPos[1], 0, this->GetDefaultRenderer());
// Get the picked location in world coordinates.
double* pos = picker->GetPickPosition();
// Output the picked location.
Application::instance()->logInfo( "Picked location (world coordinates): X="
+ QString::number(pos[0]) + " Y=" + QString::number(pos[1])
+ " Z=" + QString::number(pos[2]) );
```
I can post more info and/or the complete code of the software's branch in GitHub if necessary.
thanks in advance,
Paulohttps://gitlab.kitware.com/vtk/vtk/-/issues/17839Error in DICOM series reader2020-04-10T10:48:47-04:00kendrickkooError in DICOM series readerI am not familiar with this project and cannot locate the bug. VTK has a problem with reading some specific DICOM files as series due to mal-formatting of the "ImagePositionPatient" tag.
This tag should be a string containing 3 numbers...I am not familiar with this project and cannot locate the bug. VTK has a problem with reading some specific DICOM files as series due to mal-formatting of the "ImagePositionPatient" tag.
This tag should be a string containing 3 numbers, separate by a single space. Some DICOM files have a double space between one pair of numbers and this causes the parser to misread this.
I can find where the metadata is initialised void DICOMParser::InitTypeMap() in Utilities/DICOMParser/DICOMParser.cxx but cannot find where the string is parsed.https://gitlab.kitware.com/vtk/vtk/-/issues/17834ospray overview page2020-04-06T17:57:21-04:00Carson Brownleeospray overview pagevtkOSPRay currently does not have a dedicated landing page for blogs/tutorials/best practices. We (intel) hope to put one together that Kitware can borrow from as a dedicated user guide just for ray tracing. I have run into several use...vtkOSPRay currently does not have a dedicated landing page for blogs/tutorials/best practices. We (intel) hope to put one together that Kitware can borrow from as a dedicated user guide just for ray tracing. I have run into several users that get confused on the best way to run it, ie progressive refinement, running multiple mpi processes on a single node, etc.https://gitlab.kitware.com/vtk/vtk/-/issues/17833ospray unstructured volume mapper zero copy2020-04-06T17:55:10-04:00Carson Brownleeospray unstructured volume mapper zero copythe ospray unstructured volume mapper copies the cell structures and fields for ospray, but these could likely be shared.the ospray unstructured volume mapper copies the cell structures and fields for ospray, but these could likely be shared.https://gitlab.kitware.com/vtk/vtk/-/issues/17831Sample Java code crashes fatally on Macs2023-05-14T10:48:50-04:00Josh SteeleSample Java code crashes fatally on MacsWhen trying to run the JOGLConeRendering sample code from VTK9, with the latest code from MR 6629, the following crash occurs:
```
2020-04-02 16:28:47.783 ( 21.002s) [Java: AWT-EventQ]vtkOpenGLRenderWindow.c:578 ERR| vtkGenericOpenG...When trying to run the JOGLConeRendering sample code from VTK9, with the latest code from MR 6629, the following crash occurs:
```
2020-04-02 16:28:47.783 ( 21.002s) [Java: AWT-EventQ]vtkOpenGLRenderWindow.c:578 ERR| vtkGenericOpenGLRenderWindow (0x7f9dde0506e0): Unable to find a valid OpenGL 3.2 or later implementation. Please update your video card driver to the latest version. If you are using Mesa please make sure you have version 11.2 or later and make sure your driver in Mesa supports OpenGL 3.2 such as llvmpipe or openswr. If you are on windows and using Microsoft remote desktop note that it only supports OpenGL 3.2 with nvidia quadro cards. You can use other remoting software such as nomachine to avoid this issue.
2020-04-02 16:28:47.785 ( 21.004s) [Java: AWT-EventQ] vtkOpenGLState.cxx:79 WARN| Error in cache state for GL_BLEND
2020-04-02 16:28:47.785 ( 21.004s) [Java: AWT-EventQ] vtkOpenGLState.cxx:86 WARN| Error in cache state for GL_DEPTH_TEST
2020-04-02 16:28:47.785 ( 21.004s) [Java: AWT-EventQ] vtkOpenGLState.cxx:101 WARN| Error in cache state for GL_MULTISAMPLE
2020-04-02 16:28:47.785 ( 21.004s) [Java: AWT-EventQ] vtkOpenGLState.cxx:109 WARN| Error in cache state for GL_SCISSOR_TEST
2020-04-02 16:28:47.785 ( 21.004s) [Java: AWT-EventQ] vtkOpenGLState.cxx:140 WARN| Error in cache state for GL_SCISSOR_BOX
2020-04-02 16:28:47.785 ( 21.004s) [Java: AWT-EventQ] vtkOpenGLState.cxx:161 WARN| Error in cache state for GL_DEPTH_FUNC
2020-04-02 16:28:47.785 ( 21.004s) [Java: AWT-EventQ] vtkOpenGLState.cxx:168 WARN| Error in cache state for GL_BLEND_SRC_RGB
2020-04-02 16:28:47.785 ( 21.004s) [Java: AWT-EventQ] vtkOpenGLState.cxx:196 WARN| Error in cache state for GL_DRAW_FRAMEBUFFER_BINDING
2020-04-02 16:28:47.788 ( 21.007s) [Java: AWT-EventQ] vtkOpenGLState.cxx:265 WARN| at stack loc
0x1438fc272 : vtksys::SystemInformationImplementation::GetProgramStack(int, int) [(libvtksys-9.0.9.0.0.dylib) ???:-1]
0x1438fc1d0 : vtksys::SystemInformation::GetProgramStack(int, int) [(libvtksys-9.0.9.0.0.dylib) ???:-1]
0x14919b91c : vtkOpenGLState::CheckState() [(libvtkRenderingOpenGL2-9.0.9.0.0.dylib) ???:-1]
0x14919db96 : vtkOpenGLState::vtkBindFramebuffer(unsigned int, vtkOpenGLFramebufferObject*) [(libvtkRenderingOpenGL2-9.0.9.0.0.dylib) ???:-1]
0x1490777a3 : vtkOpenGLFramebufferObject::Bind(unsigned int) [(libvtkRenderingOpenGL2-9.0.9.0.0.dylib) ???:-1]
0x1490750fa : vtkOpenGLFramebufferObject::Bind() [(libvtkRenderingOpenGL2-9.0.9.0.0.dylib) ???:-1]
0x14907bce2 : vtkOpenGLFramebufferObject::PopulateFramebuffer(int, int, bool, int, int, bool, int, int, bool) [(libvtkRenderingOpenGL2-9.0.9.0.0.dylib) ???:-1]
0x14915fc22 : vtkOpenGLRenderWindow::CreateOffScreenFramebuffer(int, int) [(libvtkRenderingOpenGL2-9.0.9.0.0.dylib) ???:-1]
0x14915fa14 : vtkOpenGLRenderWindow::Start() [(libvtkRenderingOpenGL2-9.0.9.0.0.dylib) ???:-1]
0x13ecc5f7e : vtkRenderWindow::Render() [(libvtkRenderingCore-9.0.9.0.0.dylib) ???:-1]
0x149163aff : vtkOpenGLRenderWindow::Render() [(libvtkRenderingOpenGL2-9.0.9.0.0.dylib) ???:-1]
0x14903773c : vtkGenericOpenGLRenderWindow::Render() [(libvtkRenderingOpenGL2-9.0.9.0.0.dylib) ???:-1]
0x148ed7ba1 : Java_vtk_vtkGenericOpenGLRenderWindow_Render_132 [(libvtkRenderingOpenGL2Java.jnilib) ???:-1]
0x107b3d954 : ??? [(???) ???:-1]
0x107b2fc4d : ??? [(???) ???:-1]
2020-04-02 16:28:47.788 ( 21.007s) [Java: AWT-EventQ] vtkOpenGLState.cxx:1380 WARN| Hardware does not support the number of textures defined.
2020-04-02 16:28:47.789 ( 21.008s) [Java: AWT-EventQ] vtkTextureObject.cxx:1658 ERR| vtkTextureObject (0x7f9d1d431000): failed at glTexImage2D 1 OpenGL errors detected
0 : (1280) Invalid enum
2020-04-02 16:28:47.789 ( 21.008s) [Java: AWT-EventQ] vtkOpenGLState.cxx:1380 WARN| Hardware does not support the number of textures defined.
2020-04-02 16:28:47.789 ( 21.008s) [Java: AWT-EventQ] vtkOpenGLState.cxx:222 WARN| Error in cache state for GL_DRAW_BUFFER got 0 expected1026
2020-04-02 16:28:47.790 ( 21.009s) [Java: AWT-EventQ] vtkOpenGLState.cxx:265 WARN| at stack loc
0x1438fc272 : vtksys::SystemInformationImplementation::GetProgramStack(int, int) [(libvtksys-9.0.9.0.0.dylib) ???:-1]
0x1438fc1d0 : vtksys::SystemInformation::GetProgramStack(int, int) [(libvtksys-9.0.9.0.0.dylib) ???:-1]
0x14919b91c : vtkOpenGLState::CheckState() [(libvtkRenderingOpenGL2-9.0.9.0.0.dylib) ???:-1]
0x14919db96 : vtkOpenGLState::vtkBindFramebuffer(unsigned int, vtkOpenGLFramebufferObject*) [(libvtkRenderingOpenGL2-9.0.9.0.0.dylib) ???:-1]
0x1490777a3 : vtkOpenGLFramebufferObject::Bind(unsigned int) [(libvtkRenderingOpenGL2-9.0.9.0.0.dylib) ???:-1]
0x1490750fa : vtkOpenGLFramebufferObject::Bind() [(libvtkRenderingOpenGL2-9.0.9.0.0.dylib) ???:-1]
0x14915fa48 : vtkOpenGLRenderWindow::Start() [(libvtkRenderingOpenGL2-9.0.9.0.0.dylib) ???:-1]
0x13ecc5f7e : vtkRenderWindow::Render() [(libvtkRenderingCore-9.0.9.0.0.dylib) ???:-1]
0x149163aff : vtkOpenGLRenderWindow::Render() [(libvtkRenderingOpenGL2-9.0.9.0.0.dylib) ???:-1]
0x14903773c : vtkGenericOpenGLRenderWindow::Render() [(libvtkRenderingOpenGL2-9.0.9.0.0.dylib) ???:-1]
0x148ed7ba1 : Java_vtk_vtkGenericOpenGLRenderWindow_Render_132 [(libvtkRenderingOpenGL2Java.jnilib) ???:-1]
0x107b3d954 : ??? [(???) ???:-1]
0x107b2fc4d : ??? [(???) ???:-1]
2020-04-02 16:28:47.793 ( 21.012s) [Java: AWT-EventQ] vtkOpenGLState.cxx:961 WARN| Error glEnable/Disable1 OpenGL errors detected
0 : (1286) Invalid framebuffer operation
with stack trace of
0x1438fc272 : vtksys::SystemInformationImplementation::GetProgramStack(int, int) [(libvtksys-9.0.9.0.0.dylib) ???:-1]
0x1438fc1d0 : vtksys::SystemInformation::GetProgramStack(int, int) [(libvtksys-9.0.9.0.0.dylib) ???:-1]
0x14919d512 : (anonymous namespace)::reportOpenGLErrors(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) [(libvtkRenderingOpenGL2-9.0.9.0.0.dylib) ???:-1]
0x1491a0795 : vtkOpenGLState::SetEnumState(unsigned int, bool) [(libvtkRenderingOpenGL2-9.0.9.0.0.dylib) ???:-1]
0x1491a0920 : vtkOpenGLState::vtkglEnable(unsigned int) [(libvtkRenderingOpenGL2-9.0.9.0.0.dylib) ???:-1]
0x14916d021 : vtkOpenGLRenderer::Clear() [(libvtkRenderingOpenGL2-9.0.9.0.0.dylib) ???:-1]
0x14904adbe : vtkOpenGLCamera::Render(vtkRenderer*) [(libvtkRenderingOpenGL2-9.0.9.0.0.dylib) ???:-1]
0x13eceb872 : vtkRenderer::UpdateCamera() [(libvtkRenderingCore-9.0.9.0.0.dylib) ???:-1]
0x149168db7 : vtkOpenGLRenderer::DeviceRender() [(libvtkRenderingOpenGL2-9.0.9.0.0.dylib) ???:-1]
0x13eceacce : vtkRenderer::Render() [(libvtkRenderingCore-9.0.9.0.0.dylib) ???:-1]
0x13ed05cce : vtkRendererCollection::Render() [(libvtkRenderingCore-9.0.9.0.0.dylib) ???:-1]
0x13ecc630c : vtkRenderWindow::DoStereoRender() [(libvtkRenderingCore-9.0.9.0.0.dylib) ???:-1]
0x13ecc60a5 : vtkRenderWindow::Render() [(libvtkRenderingCore-9.0.9.0.0.dylib) ???:-1]
0x149163aff : vtkOpenGLRenderWindow::Render() [(libvtkRenderingOpenGL2-9.0.9.0.0.dylib) ???:-1]
0x14903773c : vtkGenericOpenGLRenderWindow::Render() [(libvtkRenderingOpenGL2-9.0.9.0.0.dylib) ???:-1]
0x148ed7ba1 : Java_vtk_vtkGenericOpenGLRenderWindow_Render_132 [(libvtkRenderingOpenGL2Java.jnilib) ???:-1]
0x107b3d954 : ??? [(???) ???:-1]
0x107b2fc4d : ??? [(???) ???:-1]
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x0000000000000000, pid=5720, tid=57863
#
# JRE version: Java(TM) SE Runtime Environment (8.0_45-b14) (build 1.8.0_45-b14)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.45-b02 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C 0x0000000000000000
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Users/steelrj1/vtk9.0rc1/vtkjavatest/hs_err_pid5720.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Abort trap: 6
```
I have been able to fix this in the past by asking for GLProfile.getMaximum(true) instead of GLProfile.getDefault() in the vtkJoglCanvasComponent.java and vtkJoglPanelComponent.java classes. I'm not sure if this is purely a mac issue or not, but it definitely has caused this problem to go away in the past, and force the system to see the full GL capabilities of the Mac (which is brand new, by the way). I'll submit an MR for this assuming this previous fix works.https://gitlab.kitware.com/vtk/vtk/-/issues/17828use SetScale() to flip an actor along one axis will turn the actor black2020-04-03T04:30:02-04:00Yue JINuse SetScale() to flip an actor along one axis will turn the actor blackExamples: using SetScale(1,-1,1) for an AxesActor(with cylinder shaft) and a sphere actor(created from SphereSource).
![scaleBug](/uploads/371fb775a511fafcffd0b7f7b9541925/scaleBug.png)Examples: using SetScale(1,-1,1) for an AxesActor(with cylinder shaft) and a sphere actor(created from SphereSource).
![scaleBug](/uploads/371fb775a511fafcffd0b7f7b9541925/scaleBug.png)https://gitlab.kitware.com/vtk/vtk/-/issues/17823Show KWSys within VTK doc2020-03-31T08:31:41-04:00Mathieu Westphal (Kitware)Show KWSys within VTK docCurrently, KWSys doc is not visible anywhere, requiring to read the headers.
It would be nice to use doxygen and generate this doc within VTK.Currently, KWSys doc is not visible anywhere, requiring to read the headers.
It would be nice to use doxygen and generate this doc within VTK.https://gitlab.kitware.com/vtk/vtk/-/issues/17814Improving polygon earcut2020-03-23T09:40:52-04:00Gerald CardaImproving polygon earcutI found some issues related to vtkTriangleFilter and self-touching (not intersecting) polygons. After looking at the source code I ended up at 'CanRemoveVertex()' in vtkPolygon.cxx. The code uses a call to 'Intersection()' in vtkLine.cxx...I found some issues related to vtkTriangleFilter and self-touching (not intersecting) polygons. After looking at the source code I ended up at 'CanRemoveVertex()' in vtkPolygon.cxx. The code uses a call to 'Intersection()' in vtkLine.cxx. The current code fails in the case of a return value != 0 (Note that Intersection() uses some defines for the result while CanRemoveVertex() just does a numerical compare).
In the special case of self-touching the current test will always fail and the higher level Triangulate() returns an empty result.
This behaviour could be fixed if 'CanRemoveVertex()' would do a special case handling:
VTK_NO_INTERSECTION
valid earcut, this is the current implementation
Proposed change:
VTK_YES_INTERSECTION
invalid earcut, originaly covered by != 0
VTK_ON_LINE
this has two sub-cases
1) We are 'outside' the polygon in respect to the other line (in/out based on direction). This means we are hit a self-touching line we can ignore -> valid earcut
2) We are 'inside' the polygon in respect to the other line. This a -> invalid earcut
I hope the above notes are understandable. I can provide a small Python script showing a none working triangulation with the current code (double self-touching edge polygon).
You can uncomment the z-value hack to play a trick on Intersection(). Note this is not a work-around as it creates other unwanted cases (but it works for the current example).
```python
#!/usr/bin/env python
from vtk import *
# define test polygon ---------------------------------------------------------
# 20 ______4______ 3 concave polygon CCW
# |17____|____6 | Self-touching two edges
# | |_________| | 4,19 at same coords
# |16 __|__ 7 | 5,18 at same coords
# | 13| 9 |10 | 9,14 at same coords
# | 12|_____|11 |
# |_____________|
# 1 2
x=[0,6,6,3,3,5,5,3,3,4,4,2,2,3,3,1,1,3,3,0]
y=[0,0,6,6,5,5,4,4,3,3,1,1,3,3,4,4,5,5,6,6]
npts = len(x)
# creation of the source ------------------------------------------------------
points = vtkPoints()
polygon = vtkPolygon()
polygon.GetPointIds().SetNumberOfIds( npts )
z = 0.0
for i in range( npts ):
points.InsertNextPoint( x[i], y[i], 0 ) # xy plane aligned
# points.InsertNextPoint( x[i], y[i], z )
# z = z + 0.001
polygon.GetPointIds().SetId(i, i)
polys = vtkCellArray()
polys.InsertNextCell(polygon)
polyData = vtkPolyData()
polyData.SetPoints(points)
polyData.SetPolys(polys)
result = polyData # set inital result
# filter the polydata ---------------------------------------------------------
#pdflt = vtkDelaunay2D()
#pdflt.SetSourceData( polyData )
pdflt = vtkTriangleFilter()
pdflt.SetInputData( polyData )
pdflt.Update()
result = pdflt.GetOutput()
# info ------------------------------------------------------------------------
numpoints = result.GetNumberOfPoints()
print( '#points = ', numpoints )
numpolys = result.GetNumberOfPolys()
print( '#polys = ', numpolys )
# map it ----------------------------------------------------------------------
mapper = vtkPolyDataMapper()
mapper.SetInputData( result )
# render it -------------------------------------------------------------------
actor = vtkActor()
actor.SetMapper(mapper)
actor.GetProperty().SetRepresentationToWireframe()
render = vtkRenderer()
render.AddActor(actor)
renwin = vtkRenderWindow()
renwin.AddRenderer(render)
rwiact = vtkRenderWindowInteractor()
rwiact.SetRenderWindow(renwin)
rwiact.SetInteractorStyle(vtkInteractorStyleTrackballCamera())
rwiact.Initialize()
rwiact.Start()
```
As an alternate solution I could implement a improved ear-cutting function outside VTK (this makes less sense for me).
Best regards
Geraldhttps://gitlab.kitware.com/vtk/vtk/-/issues/17812XDMF file with a reference loop crashes ParaView2020-03-20T21:05:22-04:00Ben BoeckelXDMF file with a reference loop crashes ParaViewSee the report [on Discourse](https://discourse.paraview.org/t/xdmf-reader-crashes-entity-reference-loop/3518).See the report [on Discourse](https://discourse.paraview.org/t/xdmf-reader-crashes-entity-reference-loop/3518).https://gitlab.kitware.com/vtk/vtk/-/issues/17808vtkRenderer::ResetCamera reset the view angle2020-03-19T12:42:20-04:00Mathieu Westphal (Kitware)vtkRenderer::ResetCamera reset the view anglevtkRenderer::ResetCamera intentionally set the View Angle at 30 :
https://gitlab.kitware.com/vtk/vtk/-/blob/master/Rendering/Core/vtkRenderer.cxx#L1099
```
// Reset the perspective zoom factors, otherwise subsequent zooms will cause...vtkRenderer::ResetCamera intentionally set the View Angle at 30 :
https://gitlab.kitware.com/vtk/vtk/-/blob/master/Rendering/Core/vtkRenderer.cxx#L1099
```
// Reset the perspective zoom factors, otherwise subsequent zooms will cause
// the view angle to become very small and cause bad depth sorting.
this->ActiveCamera->SetViewAngle(30.0);
```
This comment does not seem to make sense to me, zooming/unzooming is done via a dolly, not via changing the view angle. So this call should be removed imo.
@allisonvacanti : You wrote this in 2013, so if you remember, that would be great.https://gitlab.kitware.com/vtk/vtk/-/issues/17807Document vtkActor's UserTransform and UserMatrix limitations2022-12-20T14:05:57-05:00Andras LassoDocument vtkActor's UserTransform and UserMatrix limitationsIt seems that lighting may be incorrect if UserTransform of a vtkActor is modified (normals need to be transformed manually, etc. - see more details [here](https://discourse.vtk.org/t/mirroring-and-normals/2767)).
It would be nice if VT...It seems that lighting may be incorrect if UserTransform of a vtkActor is modified (normals need to be transformed manually, etc. - see more details [here](https://discourse.vtk.org/t/mirroring-and-normals/2767)).
It would be nice if VTK documentation would clarify what is expected when someone modifies an actor’s UserTransform or UserMatrix. Is their usage recommended at all, and if yes, what the limitations are (e.g., normal vectors have to be changed accordingly).