VTK issueshttps://gitlab.kitware.com/vtk/vtk/-/issues2023-06-01T00:54:49-04:00https://gitlab.kitware.com/vtk/vtk/-/issues/18361Release 9.1.02023-06-01T00:54:49-04:00Ben BoeckelRelease 9.1.0# Update VTK
- Update the local copy of `release`.
- If `0` is `0.rc1`, update `master`
- Otherwise, update `release`
```
git fetch origin
git checkout release
git merge --ff-only origin/release # if this fails, there are loca...# Update VTK
- Update the local copy of `release`.
- If `0` is `0.rc1`, update `master`
- Otherwise, update `release`
```
git fetch origin
git checkout release
git merge --ff-only origin/release # if this fails, there are local commits that need to be removed
git submodule update --recursive --init
```
- If `release` is not `master`, ensure merge requests which should be
in the release have been merged. The [`backport-mrs.py`][backport-mrs]
script can be used to find and ensure that merge requests assigned to the
associated milestone are available on the `release` branch.
- Make a commit for each of these changes on a single topic (suggested branch
name: `update-to-v9.1.0`):
- Assemble release notes into `Documentation/release/9.1.md`.
- [x] If `PATCH` is greater than 0, add items to the end of this file.
- [x] If `release` is `master`, update the non-patch version in a
separate commit (so that `master` gets it as well).
- [x] Remove old release note files
- [x] Update `.gitlab/ci/cdash-groups.json` to track the `release` CDash
groups
- [x] Update `CMake/vtkVersion.cmake` and tag the commit (tag this commit below)
```
$EDITOR CMake/vtkVersion.cmake
git commit -m 'Update version number to 9.1.0' CMake/vtkVersion.cmake
```
- Create a merge request targeting `release`
- [x] Obtain a GitLab API token for the `kwrobot.release.vtk` user (ask
@ben.boeckel if you do not have one)
- [x] Add the `kwrobot.release.vtk` user to your fork with at least
`Developer` privileges (so it can open MRs)
- [x] Use [the `release-mr`][release-mr] script to open the create the
Merge Request (see script for usage)
- Pull the script for each release; it may have been updated since it
was last used
- The script outputs the information it will be using to create the
merge request. Please verify that it is all correct before creating
the merge request. See usage at the top of the script to provide
information that is either missing or incorrect (e.g., if its data
extraction heuristics fail).
- [x] Get positive review
- [x] `Do: merge`
- [x] Push the tag to the main repository
- [x] `git tag -a -m 'VTK 9.1.0' v9.1.0 commit-that-updated-vtkVersion.cmake`
- [x] `git push origin v9.1.0`
- Gather release assets
- [x] Source (from the `build:source` CI job in the tag pipeline)
- [x] Documentation (from the `release-prep:documentation` CI job in the tag pipeline)
- [x] Wheels (from the `build:wheel-*` jobs).
- Upload assets to `vtk.org`
- [x] `rsync -rptv $tarballs $wheels user@host:vtk_release/9.1/`
- [x] Update `vtk.org/download` with the new release (email
`comm@kitware.com` with filenames and hashes)
- Software process updates (these can all be done independently)
- [x] Update kwrobot with the new `release` branch rules (@ben.boeckel)
- [x] Run [this script][cdash-update-groups] to update the CDash groups
- This must be done after a nightly run to ensure all builds are in the
`release` group
- See the script itself for usage documentation
[backport-mrs]: https://gitlab.kitware.com/utils/release-utils/-/blob/master/backport-mrs.py
[release-mr]: https://gitlab.kitware.com/utils/release-utils/-/blob/master/release-mr.py
[cdash-update-groups]: https://gitlab.kitware.com/utils/cdash-utils/-/blob/master/cdash-update-groups.py
# Post-release
- [x] Post an announcement in the Announcements category on
[discourse.vtk.org](https://discourse.vtk.org/).
/cc @ben.boeckel
/cc @ken-martin
/cc @utkarsh.ayachit9.1Ben BoeckelBen Boeckelhttps://gitlab.kitware.com/vtk/vtk/-/issues/18348Many textured vtkFollower failure2021-10-26T07:44:20-04:00Timothee ChabatMany textured vtkFollower failureWhen instanciating more than 32 textured vtkFollower, some errors are logged about too many textures being send to the GPU and final render is totally broken.
Replacing `vtkFollower` by `vtkActor` gives no errors and works fine even wit...When instanciating more than 32 textured vtkFollower, some errors are logged about too many textures being send to the GPU and final render is totally broken.
Replacing `vtkFollower` by `vtkActor` gives no errors and works fine even with 100+ textures.
Errors :
```shell
2021-10-18 16:55:26.100 ( 1.300s) [ EA38C780] vtkOpenGLState.cxx:1795 WARN| Hardware does not support the number of textures defined.
2021-10-18 16:55:26.100 ( 1.300s) [ EA38C780]vtkOpenGLPolyDataMapper:2648 ERR| vtkCompositeMapperHelper2 (0x55b142535840): failed after Render 1 OpenGL errors detected
0 : (1281) Invalid value
```
Program to reproduce :
```cpp
#include <vtkCell.h>
#include <vtkIdList.h>
#include <vtkNew.h>
#include <vtkRTAnalyticSource.h>
#include <vtkStaticCellLocator.h>
#include <vtkPlaneSource.h>
#include <vtkActor.h>
#include <vtkFollower.h>
#include <vtkRenderer.h>
#include <vtkCompositePolyDataMapper.h>
#include <vtkCompositePolyDataMapper2.h>
#include <vtkRenderWindow.h>
#include <vtkNew.h>
#include <vtkJPEGReader.h>
#include <vtkRenderWindowInteractor.h>
#include <vtkTexture.h>
#include <vector>
//////////////////////////
constexpr int LOOP = 6;
const std::vector<const char*> TEXTURES = {
// list of texture name ...
};
//////////////////////////
int main(int, char *[])
{
vtkNew<vtkRenderer> renderer;
const std::string prefix = "/home/timothee/Data/materials/textures/";
for (int i = 0; i < LOOP; ++i)
{
for(int j = 0; j < LOOP; ++j)
{
vtkNew<vtkPlaneSource> source;
source->SetCenter(i, j, 0);
source->Update();
const std::string filename = prefix + TEXTURES[(i + LOOP *j) % TEXTURES.size()];
vtkNew<vtkJPEGReader> reader;
reader->SetFileName(filename.c_str());
vtkNew<vtkTexture> texture;
texture->SetInputConnection(reader->GetOutputPort());
vtkNew<vtkCompositePolyDataMapper2> mapper;
mapper->SetInputConnection(source->GetOutputPort());
vtkNew<vtkFollower> actor;
actor->SetCamera(renderer->GetActiveCamera());
actor->SetMapper(mapper);
actor->SetTexture(texture);
renderer->AddActor(actor);
}
}
renderer->ResetCamera(-1, LOOP + 1, -1, LOOP + 1, -1, 1);
vtkNew<vtkRenderWindow> window;
window->AddRenderer(renderer);
window->SetWindowName("Follower test");
vtkNew<vtkRenderWindowInteractor> interactor;
interactor->SetRenderWindow(window);
window->Render();
interactor->Start();
return 0;
}
```https://gitlab.kitware.com/vtk/vtk/-/issues/18329SSL certificate error on Gitlab2021-10-04T12:09:57-04:00ToddSSL certificate error on Gitlab```
> git.exe push -v --progress "origin" master:master
> fatal: unable to access 'https://gitlab.kitware.com/todoooo/vtk.git/': SSL certificate problem: certificate has expired
> Pushing to https://gitlab.kitware.com/todoooo/vtk.git
``````
> git.exe push -v --progress "origin" master:master
> fatal: unable to access 'https://gitlab.kitware.com/todoooo/vtk.git/': SSL certificate problem: certificate has expired
> Pushing to https://gitlab.kitware.com/todoooo/vtk.git
```https://gitlab.kitware.com/vtk/vtk/-/issues/18325Release 9.1.0.rc12023-06-01T00:54:25-04:00Ben BoeckelRelease 9.1.0.rc1# Update VTK
- Update the local copy of `master`.
- If `0.rc1` is `0.rc1`, update `master`
- Otherwise, update `release`
```
git fetch origin
git checkout master
git merge --ff-only origin/master # if this fails, there are loc...# Update VTK
- Update the local copy of `master`.
- If `0.rc1` is `0.rc1`, update `master`
- Otherwise, update `release`
```
git fetch origin
git checkout master
git merge --ff-only origin/master # if this fails, there are local commits that need to be removed
git submodule update --recursive --init
```
- If `master` is not `master`, ensure merge requests which should be
in the release have been merged. The [`backport-mrs.py`][backport-mrs]
script can be used to find and ensure that merge requests assigned to the
associated milestone are available on the `release` branch.
- Make a commit for each of these changes on a single topic (suggested branch
name: `update-to-v9.1.0`):
- Assemble release notes into `Documentation/release/9.1.md`.
- [x] If `PATCH` is greater than 0, add items to the end of this file.
- [x] Remove old release note files
- [x] If `master` is `master`, make a separate commit to update non-patch
version information.
- [x] Update `.gitlab/ci/cdash-groups.json` to track the `release` CDash
groups
- [x] Update `CMake/vtkVersion.cmake` and tag the commit (tag this commit below)
```
$EDITOR CMake/vtkVersion.cmake
git commit -m 'Update version number to 9.1.0.rc1' CMake/vtkVersion.cmake
```
- Create a merge request targeting `release`
- [x] Obtain a GitLab API token for the `kwrobot.release.vtk` user (ask
@ben.boeckel if you do not have one)
- [x] Add the `kwrobot.release.vtk` user to your fork with at least
`Developer` privileges (so it can open MRs)
- [x] Use [the `release-mr`][release-mr] script to open the create the
Merge Request (see script for usage)
- Pull the script for each release; it may have been updated since it
was last used
- The script outputs the information it will be using to create the
merge request. Please verify that it is all correct before creating
the merge request. See usage at the top of the script to provide
information that is either missing or incorrect (e.g., if its data
extraction heuristics fail).
- [x] Get positive review
- [x] `Do: merge`
- [x] Push the tag to the main repository
- [x] `git tag -a -m 'VTK 9.1.0.rc1' v9.1.0.rc1 commit-that-updated-vtkVersion.cmake`
- [x] `git push origin v9.1.0.rc1`
- Gather release assets
- [x] Source (from the `build:source` CI job in the tag pipeline)
- [x] Documentation (from the `release-prep:documentation` CI job in the tag pipeline)
- [x] Wheels (from the `build:wheel-*` jobs).
- Upload assets to `vtk.org`
- [x] `rsync -rptv $tarballs $wheels user@host:vtk_release/9.1/`
- [x] Update `vtk.org/download` with the new release (email
`comm@kitware.com` with filenames and hashes)
- Software process updates (these can all be done independently)
- [x] Update kwrobot with the new `release` branch rules (@ben.boeckel)
- [x] Run [this script][cdash-update-groups] to update the CDash groups
- This must be done after a nightly run to ensure all builds are in the
`release` group
- See the script itself for usage documentation
[backport-mrs]: https://gitlab.kitware.com/utils/release-utils/-/blob/master/backport-mrs.py
[release-mr]: https://gitlab.kitware.com/utils/release-utils/-/blob/master/release-mr.py
[cdash-update-groups]: https://gitlab.kitware.com/utils/cdash-utils/-/blob/master/cdash-update-groups.py
# Post-release
- [x] Post an announcement in the Announcements category on
[discourse.vtk.org](https://discourse.vtk.org/).
/cc @ben.boeckel
/cc @ken-martin
/cc @utkarsh.ayachit
/cc @vbolea
/cc @mwestphal
/cc @cory.quammenhttps://gitlab.kitware.com/vtk/vtk/-/issues/18321Provide PyInstaller hooks2023-08-31T22:56:35-04:00Ievgen PopovychProvide PyInstaller hooks[PyInstaller](https://pyinstaller.readthedocs.io/en/stable/) is a project that bundles all the dependencies and sources of a python application into an executable.
When using VTK (python bindings) in application that is bundled and exec...[PyInstaller](https://pyinstaller.readthedocs.io/en/stable/) is a project that bundles all the dependencies and sources of a python application into an executable.
When using VTK (python bindings) in application that is bundled and executed - one will encounter a runtime error of 'module not found'.
This is because most of VTK functionality is provided in extension modules for which PyInstaller can't automatically find internal dependencies (on other python modules/extensions; dynamic loader dependencies are handled correctly).
To handle such situation, PyInstaller provides a mechanism called [hooks](https://pyinstaller.readthedocs.io/en/stable/hooks.html), where one basically provides a file per-module where all 'hidden' dependencies/modules (i.e. those pyinstaller can't find) of a module are listed.
Now, [hook for VTK](https://github.com/pyinstaller/pyinstaller-hooks-contrib/blob/master/src/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-vtkpython.py) was part of pyinstaller for a long time (in main repo), but VTK 8.2.0 modules require a change to the hook.
There are few reason why I've come here and not just updated the existing hook:
1. VTK has a lot of modules and ideally we'd have multiple hook files (one hook per VTK module), which is a lot.
2. Figuring out hidden dependencies and manually making hooks is very tedious (I am not even sure how to figure out those 'imports' yet).
3. I saw that in this repository there is probably enough information (about module dependencies) to generate hooks automatically at (wheel) build time.
4. PyInstaller hooks can also be provided by the python package itself (via entry points), which means VTK python wheel can provide pyinstaller hooks.
With regards to all this, I have a few questions:
1. Would you be willing to accept that into the repository? (some code (CMake?) that generates hook files at build time and a few lines into setup.py to refer to those entry-points)
2. Can you give me a few pointers into the repository how can I approach this? (how to reliably understand on which extensions a module depends, where to put hook generation-code)
Thanks.https://gitlab.kitware.com/vtk/vtk/-/issues/18307vtkImplicitPolyDataDistance calculates incorrect sign in some specific cases2024-02-28T05:56:36-05:00Ted GiblettevtkImplicitPolyDataDistance calculates incorrect sign in some specific casesIn some specific cases, vtkImplicitPolyDataDistance calculates the wrong sign when calling EvaluateFunction. It appears to only occur when the query point sits directly above the edge of a face as shown in the image below.
![test_surfac...In some specific cases, vtkImplicitPolyDataDistance calculates the wrong sign when calling EvaluateFunction. It appears to only occur when the query point sits directly above the edge of a face as shown in the image below.
![test_surface_and_point](/uploads/8873e57962a8c8a579b0074118502bf9/test_surface_and_point.png)
The code to reproduce this issue is as follows.
const double length = 1.0;
vtkNew<vtkCubeSource> cube;
cube->SetXLength(length);
cube->SetYLength(length);
cube->SetZLength(length);
cube->Update();
vtkNew<vtkImplicitPolyDataDistance> signed_distance;
signed_distance->SetInput(cube->GetOutput());
double test_distance = signed_distance->EvaluateFunction(-0.5, 0.7, 0.);
With this code, the value of test_distance is -0.2 instead of 0.2.https://gitlab.kitware.com/vtk/vtk/-/issues/18274Extend vtkAlgorithm API fo cleaning cache2021-08-12T08:51:25-04:00Timothee ChabatExtend vtkAlgorithm API fo cleaning cacheThe following discussion from !8222 should be addressed:
- [ ] @utkarsh.ayachit started a [discussion](https://gitlab.kitware.com/vtk/vtk/-/merge_requests/8222#note_997368): (+1 comment)
> Can we add a more to the filter to free u...The following discussion from !8222 should be addressed:
- [ ] @utkarsh.ayachit started a [discussion](https://gitlab.kitware.com/vtk/vtk/-/merge_requests/8222#note_997368): (+1 comment)
> Can we add a more to the filter to free up all these locators at end of `RequestData`? I am thinking for insitu cases, we'll soon end up with filters building such acceleration structures that don't get freed up causing memory issue. Having some API to cleanup caches may be a good approach to explore. Doesnt' need to happen in this MR, but something to think about -- maybe it's an API on `vtkAlogorithm` itself.https://gitlab.kitware.com/vtk/vtk/-/issues/18153vtkImageDifference does not support RGBA2022-01-15T17:53:34-05:00Mathieu Westphal (Kitware)vtkImageDifference does not support RGBAWhen using vtkImageDifference with a RGBA input, it fails with:
`vtkImageDifference.cxx:534 ERR| vtkImageDifference (0x560f6ca326c0): RequestData: Expecting 3 components (RGB)`
It would be nice to support it.When using vtkImageDifference with a RGBA input, it fails with:
`vtkImageDifference.cxx:534 ERR| vtkImageDifference (0x560f6ca326c0): RequestData: Expecting 3 components (RGB)`
It would be nice to support it.https://gitlab.kitware.com/vtk/vtk/-/issues/18152vtkImageDifference fail to find obvious difference2022-11-29T03:35:43-05:00Mathieu Westphal (Kitware)vtkImageDifference fail to find obvious differenceThe following two images are seen as **0** difference by vtkImageDifference::GetThresholdedError.
This is unexpected
```
#include <vtkImageDifference.h>
#include <vtkNew.h>
#include <vtkPNGReader.h>
#include <iostream>
int main(int ar...The following two images are seen as **0** difference by vtkImageDifference::GetThresholdedError.
This is unexpected
```
#include <vtkImageDifference.h>
#include <vtkNew.h>
#include <vtkPNGReader.h>
#include <iostream>
int main(int argc, char* argv[])
{
vtkNew<vtkPNGReader> reader1;
reader1->SetFileName(argv[1]);
reader1->Update();
vtkNew<vtkPNGReader> reader2;
reader2->SetFileName(argv[2]);
reader2->Update();
vtkNew<vtkImageDifference> differenceFilter;
// differenceFilter->SetThreshold(0);
differenceFilter->SetInputConnection(reader1->GetOutputPort());
differenceFilter->SetImageConnection(reader2->GetOutputPort());
differenceFilter->Update();
std::cout<<differenceFilter->GetThresholdedError()<<std::endl;
return EXIT_SUCCESS;
}
```
![TestAnimationIndex](/uploads/b858a88753c09733111b003d7a2e1980/TestAnimationIndex.png)
![TestGLTFReaderWithAnimation](/uploads/227689913f634d315db98a0a41cf424b/TestGLTFReaderWithAnimation.png)https://gitlab.kitware.com/vtk/vtk/-/issues/18064vtkOpenGLPolyDataMapper Edge Artifacts2023-01-29T19:00:25-05:00Stephen HogarthvtkOpenGLPolyDataMapper Edge ArtifactsWhile upgrading to VTK 9.0, we've found a number of situations where there is now significant artifacting on grid edges which was not present in VTK 8.2. We have tested with both the 9.0 release + "New surface with edges" patched in (!68...While upgrading to VTK 9.0, we've found a number of situations where there is now significant artifacting on grid edges which was not present in VTK 8.2. We have tested with both the 9.0 release + "New surface with edges" patched in (!6880), as well as the master branch, and both show this issue.
On light backgrounds, the triangulation is showing, particularly for line widths in the 1.0->3.0 range. None of the diagonal lines should be showing in this picture:
![2020-12-10-Gridlines-Narrow-Full](/uploads/38e44fc5cc81a1d8f73a4e98b35f28e2/2020-12-10-Gridlines-Narrow-Full.png)
When we add extra conditions to the visibility mask in the mapper to selectively turn off certain edges (modifying vtkOpenGLIndexBufferObject, Line 90), the lines which should be masked out also bleed through with light backgrounds:
![2020-12-15-Dark_BG-Narrow](/uploads/e78ec38a9365c49d55527ec4886e3003/2020-12-15-Dark_BG-Narrow.png)
When the line widths are increased to the 4.0->6.0 range, the bleeds are much less noticeable, but the thin vertical artifacts on the right side of this image are introduced. There are also triangular artifacts along the top and bottom edges of the light blue square.
![2020-12-15-Dark_BG-Wide](/uploads/947f755156df8c39066115d08f71522a/2020-12-15-Dark_BG-Wide.png)
When rendering surfaces with edges, the edges are now much thicker than they were in 8.2, or currently are in wireframe only mode. This can crowd out the faces. It is also disorienting for users when they can easily switch between wireframe only and surface+edges modes. It appears that the extra width to the edges, while always thicker than in wireframe, may be partially dependent on either the absolute size of the grid, or size of grid cells. This makes it hard to get a more consistent look with different grids, which was possible with VTK 8.2.
Note: While possibly unrelated, the 9.0 upgrade has required noticeable changes to coincident topology offsets similar to #17936.https://gitlab.kitware.com/vtk/vtk/-/issues/17902"QVTKOpenGLNativeWidget " can`t be refreshed by "->update()"2022-11-25T10:07:55-05:00singlebear"QVTKOpenGLNativeWidget " can`t be refreshed by "->update()"In QT application,the widget of QVTKOpenGLNativeWidget or QVTKOpenGLWidget can`t be refreshed by order "update()" or "replot()" .
It's only refreshed when I click or press the widget.
So I can't make the window refresh in real time.
What...In QT application,the widget of QVTKOpenGLNativeWidget or QVTKOpenGLWidget can`t be refreshed by order "update()" or "replot()" .
It's only refreshed when I click or press the widget.
So I can't make the window refresh in real time.
What kind of command can refreshes the widget of QVTKOpenGLNativeWidget or QVTKOpenGLWidget?
Thank you.https://gitlab.kitware.com/vtk/vtk/-/issues/17874The vtkCocoaRenderWindow DPI isn't set before first render2020-05-01T11:19:55-04:00David GobbiThe vtkCocoaRenderWindow DPI isn't set before first renderProper text rendering requires that the DPI of the render window is doubled for HiDPI/Retina displays. The vtkCocoaGLView handles this for viewDidChangeBackingProperties and viewWillMoveToWindow notifications. However, these do not gua...Proper text rendering requires that the DPI of the render window is doubled for HiDPI/Retina displays. The vtkCocoaGLView handles this for viewDidChangeBackingProperties and viewWillMoveToWindow notifications. However, these do not guarantee that the DPI is correctly set before the first render. As a result, on Retina displays, the text size is often incorrect (half-size) at first.
One tricky problem is that VTK testing requires the current behavior. The tests use vtkRenderWindow::SetSize(), which sets the window size in device pixels (i.e. half-size pixels). So if the DPI is doubled for Retina, the text will be double-size relative to the image and the regression image will not match. TLDR: The tests always expect 72 DPI (the default) and fail if the DPI is doubled to 144.
A potential compromise is to make automatic DPI adjustment optional. This would allow 72 DPI to be used for the testing, and scaled DPI to be used for applications.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/17639vtkCutter sometimes gives polygons with GenerateTrianglesOn2021-12-21T17:33:55-05:00Frédéric ViryvtkCutter sometimes gives polygons with GenerateTrianglesOnWhen using a vtkCutter on an unstructured grid containing vtkPolyhedron cells with GenerateTrianglesOn, the output sometimes contains (depending on polyhedra) provides polygons instead of triangles, as shown in the following example:
[c...When using a vtkCutter on an unstructured grid containing vtkPolyhedron cells with GenerateTrianglesOn, the output sometimes contains (depending on polyhedra) provides polygons instead of triangles, as shown in the following example:
[cutter_with_triangles_on_polyhedron.py](/uploads/7f8a167662de1681865657fc16ef07b2/cutter_with_triangles_on_polyhedron.py)
Here is the result plotted with Paraview, with the polyhedral cell in wireframe and the polygonal result.
(Tested with vtk 8.2.0, build py36haa4764d_200, with Python 3.6.8)
![result](/uploads/73771c4b07b255739a3eaf72b668bde1/result.png)https://gitlab.kitware.com/vtk/vtk/-/issues/17294vtkBooleanPolyDataFilter gives unexpected output for non-intersecting objects2018-10-23T10:33:12-04:00Norman SpecificusvtkBooleanPolyDataFilter gives unexpected output for non-intersecting objects### What:
`vtkBooleanPolyDataFilter` results in an empty vtkPolyData() if two input objects are not intersecting.
### How to reproduce:
```
import vtk
a = vtk.vtkSphereSource()
a.SetCenter(0,0,0)
a.Update()
b = vtk.vtkSphereSource()...### What:
`vtkBooleanPolyDataFilter` results in an empty vtkPolyData() if two input objects are not intersecting.
### How to reproduce:
```
import vtk
a = vtk.vtkSphereSource()
a.SetCenter(0,0,0)
a.Update()
b = vtk.vtkSphereSource()
b.SetCenter(4,0,0)
b.Update()
boolean1 = vtk.vtkBooleanOperationPolyDataFilter()
boolean1.SetOperationToUnion()
boolean1.SetInputData(0, a.GetOutput())
boolean1.SetInputData(1, b.GetOutput())
boolean1.Update()
print(boolean1.GetOutput())
```
For the output, see below.
### Expected behaviour:
Option 1: Require that the input is intersecting. Leave a message in the documentation. Add a function to `vtkBooleanOperationPolyDataFilter` to check whether the objects are intersecting. (I don't see the point that the user should call `vtkIntersectionPolyDataFilter` herself because `vtkBooleanOperationPolyDataFilter` will call it anyways...)
Option 2:
- For intersection: return an empty `vtkPolyData()`. This is already the case.
- For union: `vtkBooleanOperationPolyDataFilter` returns the true set-union for the non-intersecting points. Maybe simply the output of `vtkAppendPolyData`? Missing.
- For difference: return the first input data (sphere `a` in the example). Missing.
### Console output
```
ERROR: In ../Common/DataModel/vtkPointLocator.cxx, line 867
vtkPointLocator (0x7fa4e16b6140): No points to subdivide
Generic Warning: In ../Filters/General/vtkIntersectionPolyDataFilter.cxx, line 2535
No Intersection between objects
ERROR: In ../Filters/General/vtkDistancePolyDataFilter.cxx, line 80
vtkDistancePolyDataFilter (0x7fa4e16bd130): No points/cells to operate on
ERROR: In ../Filters/General/vtkDistancePolyDataFilter.cxx, line 80
vtkDistancePolyDataFilter (0x7fa4e16bd130): No points/cells to operate on
vtkPolyData (0x7fa4e159b160)
Debug: Off
Modified Time: 261793
Reference Count: 1
Registered Events: (none)
Information: 0x7fa4e1590680
Data Released: False
Global Release Data: Off
UpdateTime: 0
Field Data:
Debug: Off
Modified Time: 261790
Reference Count: 1
Registered Events: (none)
Number Of Arrays: 0
Number Of Components: 0
Number Of Tuples: 0
Number Of Points: 0
Number Of Cells: 0
Cell Data:
Debug: Off
Modified Time: 261793
Reference Count: 1
Registered Events:
Registered Observers:
vtkObserver (0x7fa4e1583d10)
Event: 33
EventName: ModifiedEvent
Command: 0x7fa4e1583f00
Priority: 0
Tag: 1
Number Of Arrays: 0
Number Of Components: 0
Number Of Tuples: 0
Copy Tuple Flags: ( 1 1 1 1 1 0 1 1 )
Interpolate Flags: ( 1 1 1 1 1 0 0 1 )
Pass Through Flags: ( 1 1 1 1 1 1 1 1 )
Scalars: (none)
Vectors: (none)
Normals: (none)
TCoords: (none)
Tensors: (none)
GlobalIds: (none)
PedigreeIds: (none)
EdgeFlag: (none)
Point Data:
Debug: Off
Modified Time: 261792
Reference Count: 1
Registered Events:
Registered Observers:
vtkObserver (0x7fa4e1589490)
Event: 33
EventName: ModifiedEvent
Command: 0x7fa4e1583f00
Priority: 0
Tag: 1
Number Of Arrays: 0
Number Of Components: 0
Number Of Tuples: 0
Copy Tuple Flags: ( 1 1 1 1 1 0 1 1 )
Interpolate Flags: ( 1 1 1 1 1 0 0 1 )
Pass Through Flags: ( 1 1 1 1 1 1 1 1 )
Scalars: (none)
Vectors: (none)
Normals: (none)
TCoords: (none)
Tensors: (none)
GlobalIds: (none)
PedigreeIds: (none)
EdgeFlag: (none)
Bounds:
Xmin,Xmax: (1, -1)
Ymin,Ymax: (1, -1)
Zmin,Zmax: (1, -1)
Compute Time: 261799
Number Of Points: 0
Point Coordinates: 0x0
Locator: 0x0
Number Of Vertices: 0
Number Of Lines: 0
Number Of Polygons: 0
Number Of Triangle Strips: 0
Number Of Pieces: 1
Piece: -1
Ghost Level: 0
```https://gitlab.kitware.com/vtk/vtk/-/issues/17218Support specifying object factory overrides in executables2024-01-29T22:27:11-05:00Ben BoeckelSupport specifying object factory overrides in executablesThe `vtkObjectFactory` class should gain support for preferring certain overrides as given by the executable that is running. For example, one can create two versions of an application, one which is for desktop use and another that is fo...The `vtkObjectFactory` class should gain support for preferring certain overrides as given by the executable that is running. For example, one can create two versions of an application, one which is for desktop use and another that is for VR device use. Currently, `vtkRenderingOpenVR` disables all other overrides of the classes that it overrides, effectively disabling support of the other overrides while it is loaded.
The proposed solution is to support "override attributes" on override classes. Executables could then register their preferences with `vtkObjectFactory` and when a factory base class is requested, it would consult the preferences and the available attributes and construct the "best" option.
Implementation details:
- `vtkObjectFactory::RegisterOverride` would take an additional argument of a linked list of attributes for the override.
- Overriding classes would indicate that they have overrides via the `<classname>_OVERRIDE_ATTRIBUTES` preprocessor definition. It would resolve to the pointer to the head of a linked list describing the attributes for the class (this would allow for intermediate base classes to provide attributes that may be referenced by subclasses).
- `vtkObjectFactory.cmake` would use `#ifdef` to specify this attribute to the `RegisterOverride` call.
- `vtkObjectFactory.cmake` would provide a function to create a source file which indicates preferences to `vtkObjectFactory` as a static initialization function for use in executables.
One question is where the logic of choosing an override lives.
- **Embedded proposal** We describe an algorithm in `vtkObjectFactory` which performs the selection based on its input data. One could be "strength of preference is from first attribute specified to last and within each attribute, first to last". So the selection between class `J` with `AttrA=X,AttrB=N` and class `K` with `AttrA=Y,AttrB=M` with the preferences `AttrA=X,Y;AttrB=M,N` would be class `J` since `AttrA` is a "stronger" preference.
- **Callback proposal** It can either live in a function that is passed to `vtkObjectFactory` which it then calls for override requests (where attributes are available) with the list of constructor functions paired with the attributes describing each. Here, the `vtkObjectFactory.cmake` module should have the option to provide a default implementation of this callback, likely similar to whatever the Embedded proposal is.
Cc: @brad.king @utkarsh.ayachit @ken-martinhttps://gitlab.kitware.com/vtk/vtk/-/issues/16935vtk reeb graph memory access bugs and crashes2018-10-23T14:03:09-04:00Burlen Loringvtk reeb graph memory access bugs and crashesVTK reeb graph crashes on moderate sized date. valgrind identifies a number of issues, use of unitialized values (in bounds of malloc'd array and past the size of an stl vector), invalid access size 8 (from use of negative index).
here...VTK reeb graph crashes on moderate sized date. valgrind identifies a number of issues, use of unitialized values (in bounds of malloc'd array and past the size of an stl vector), invalid access size 8 (from use of negative index).
here is data to reproduce: [candidate_tris_8.vtp](/uploads/298f9dfa5f6a3bef4cb602adacda0bec/candidate_tris_8.vtp)
here is a plot of said data. ![candidate_tris_8](/uploads/b28ab18349126898c7f0bd8e78705f46/candidate_tris_8.png)
here is code, that I pulled out of the ctest and tweaked,
```
int main(int argc, char **argv)
{
const char *arrayName = "x";
int arrayId = 0;
vtkXMLPolyDataReader *pdr = vtkXMLPolyDataReader::New();
pdr->SetFileName(argv[1]);
pdr->Update();
vtkPolyData *pd = pdr->GetOutput();
vtkPointData *ptd = pd->GetPointData();
for (int i = 0; i < ptd->GetNumberOfArrays(); ++i)
{
if (strcmp(arrayName, ptd->GetArray(i)->GetName())==0)
{
cerr << "processing " << i << " " << ptd->GetArray(i)->GetName() << endl;
arrayId = i;
}
}
ptd->SetActiveScalars(arrayName);
vtkPolyDataToReebGraphFilter *rgf = vtkPolyDataToReebGraphFilter::New();
rgf->SetInputData(pd);
rgf->SetFieldId(arrayId);
vtkReebGraphSimplificationFilter *rgs = vtkReebGraphSimplificationFilter::New();
rgs->SetInputConnection(rgf->GetOutputPort());
rgs->SetSimplificationThreshold(0.01);
vtkReebGraphSurfaceSkeletonFilter *rgsf = vtkReebGraphSurfaceSkeletonFilter::New();
rgsf->SetInputData(0, pd);
rgsf->SetInputConnection(1, rgs->GetOutputPort());
rgsf->SetNumberOfSamples(5);
rgsf->Update();
vtkTable *skel = rgsf->GetOutput();
return 0;
}
```https://gitlab.kitware.com/vtk/vtk/-/issues/16924Improve Documentation for vtkXMLP*Writers2018-10-23T14:05:35-04:00Arno MayrhoferImprove Documentation for vtkXMLP*WritersI have a software that is using different types of vtkXMLP*Writers and found that they would not work as the <Piece> output in the parallel files was wrong. In fact it only showed the piece of processor 0. As it took me over 4 hours (inc...I have a software that is using different types of vtkXMLP*Writers and found that they would not work as the <Piece> output in the parallel files was wrong. In fact it only showed the piece of processor 0. As it took me over 4 hours (incl. reading the VTK source code) to figure out how to get this to work I would like to suggest an improvement to the documentation such that users will in the future find the desired information much quicker.
Now my software uses bulk standard MPI_Init() and then in the output sets up a vtkXMLP*Writer (In my case * = {UnstructuredGrid, MultiBlockData, PolyData}) as follows:
`
vtkSmartPointer<vtkXMLPUnstructuredGridWriter> pwriter = vtkSmartPointer<vtkXMLPUnstructuredGridWriter>::New();
pwriter->SetFileName(filename);
#if VTK_MAJOR_VERSION < 6
pwriter->SetInput(unstructuredGrid);
#else
pwriter->SetInputData(unstructuredGrid);
#endif
pwriter->SetNumberOfPieces(nprocs);
pwriter->SetStartPiece(rank);
pwriter->SetEndPiece(rank);
pwriter->Write();
`
It was already not clear to me that the Set{Start,End}Piece function calls were required. But this information was rather easy to find. What was more difficult is the fact that vtk needs to be aware of your MPI settings. To ensure this the following code needs to be put in some sort of initializer:
`
vtkMPIController *vtkController = vtkMPIController::New();
vtkController->Initialize();
vtkMultiProcessController::SetGlobalController(vtkController);
`
The Initialize() without arguments tells VTK that it should use an existing MPI controller, i.e. the one that comes with the main software. The SetGlobalController basically tells the writers that they should use this MPI controller to do their communication. I think there are other ways to achieve the communication by using vtk functions to initialize MPI, but this might not always be feasible.
So it would be great if there is either a example that highlights this or if the documentation points towards the fact that a functioning vtkMPIController needs to be available.https://gitlab.kitware.com/vtk/vtk/-/issues/16874Missing debug libraries on install2017-04-11T08:00:55-04:00Boris BasicMissing debug libraries on installOn Windows, after building the INSTALL project of VTK 7.0 or 7.1 in debug mode, the following libraries are missing:
vtkGeovisCore
vtkgl2ps
vtkGUISupportQtSQL
vtkImagingMorphological
vtkImagingStatistics
vtkInfovisLayou...On Windows, after building the INSTALL project of VTK 7.0 or 7.1 in debug mode, the following libraries are missing:
vtkGeovisCore
vtkgl2ps
vtkGUISupportQtSQL
vtkImagingMorphological
vtkImagingStatistics
vtkInfovisLayout
vtkInteractionImage
vtkIOEnSight
vtkIOExport
vtkIOImport
vtkIOLSDyna
vtkIOMINC
vtkIOMovie
vtkIOParallelXML
vtkIOPLY
vtkIOSQL
vtkIOTecplotTable
vtkIOVideo
vtkLocalExample
vtkoggtheora
vtkproj4
vtkRenderingGL2PSOpenGL2
vtkRenderingImage
vtkRenderingLOD
vtkRenderingQt
vtkTestingIOSQL
vtkViewsInfovis
vtkViewsQt8.0https://gitlab.kitware.com/vtk/vtk/-/issues/16851Request for population of INTERFACE_INCLUDE_DIRECTORIES in export2018-10-23T14:16:54-04:00Adam RankinRequest for population of INTERFACE_INCLUDE_DIRECTORIES in exportHello all,
If you work on both projects, you'll find this very similar to the ITK request (https://issues.itk.org/jira/browse/ITK-3470).
This is a request for VTK to populate the INTERFACE_INCLUDE_DIRECTORIES property on targets so tha...Hello all,
If you work on both projects, you'll find this very similar to the ITK request (https://issues.itk.org/jira/browse/ITK-3470).
This is a request for VTK to populate the INTERFACE_INCLUDE_DIRECTORIES property on targets so that linking to an VTK target correctly adds all includes.
I'm sure you already know, but just in case, this is accomplished via
target_include_directories(\<Target\> PUBLIC|PRIVATE|INTERFACE \<Directories\>)8.2.0