VTK issueshttps://gitlab.kitware.com/vtk/vtk/-/issues2022-11-29T04:02:10-05:00https://gitlab.kitware.com/vtk/vtk/-/issues/18728Efficient mesh data writer2022-11-29T04:02:10-05:00ZqinghaohhEfficient mesh data writerHi,
I would like to write heavy mesh data (GBs) with VTK and view it in ParaView. Could I have some recommendations on what data structure I should use in VTK to manipulate the data? I have tried unstructured grid, but writing in .vtu f...Hi,
I would like to write heavy mesh data (GBs) with VTK and view it in ParaView. Could I have some recommendations on what data structure I should use in VTK to manipulate the data? I have tried unstructured grid, but writing in .vtu file is not very efficient in ASCII and binary (binary is even worse).
By the way, I would like to add some attributes to each mesh triangle to illustrate some physical materials.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/18630vtkImageDifference asymmetrical result issue2022-11-29T03:35:43-05:00Peter FranzvtkImageDifference asymmetrical result issue```vtkImageDifference``` creates asymmetrical results for some images, i.e. using inputs A/B may have different result than using B/A. However ```vtkImageDifference``` claims to be symmetrical.
This has consequences for rendering tests ...```vtkImageDifference``` creates asymmetrical results for some images, i.e. using inputs A/B may have different result than using B/A. However ```vtkImageDifference``` claims to be symmetrical.
This has consequences for rendering tests which make use of ```vtkImageDifference```. It has been observed that tests with substantial modifications of the test image versus the baseline image have passed (false positive).
See [MR9428](https://gitlab.kitware.com/vtk/vtk/-/merge_requests/9428) for more details.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/18726Some abnormalities occur after the mpr slice image is flipped2022-11-25T03:31:04-05:00马文龙Some abnormalities occur after the mpr slice image is flippedMy vtk version is 9.2. I'm doing mpr display. One of the functions is to mirror an image. I use vtkimageflip to complete it. However, when the image is flipped, the vtkResliceCursorLineRepresentation class also rotates the plane behind t...My vtk version is 9.2. I'm doing mpr display. One of the functions is to mirror an image. I use vtkimageflip to complete it. However, when the image is flipped, the vtkResliceCursorLineRepresentation class also rotates the plane behind the camera when rotating the camera. When I don't flip image, rotating the vtkPlaneSource will not produce adverse effects. When the image is flipped, the rotation will produce double rotation, or reverse selection. The following is the demo of my code, thank you
```
#include "vtkSmartPointer.h"
#include "vtkCamera.h"
#include "vtkCellPicker.h"
#include "vtkCommand.h"
#include "vtkImageActor.h"
#include "vtkImageReslice.h"
#include "vtkInteractorStyleImage.h"
#include "vtkImageMapToColors.h"
#include "vtkImagePlaneWidget.h"
#include "vtkImageReader.h"
#include "vtkInteractorEventRecorder.h"
#include "vtkLookupTable.h"
#include "vtkOutlineFilter.h"
#include "vtkDICOMImageReader.h"
#include "vtkPolyDataMapper.h"
#include "vtkProperty.h"
#include "vtkRenderWindow.h"
#include "vtkRenderWindowInteractor.h"
#include "vtkRenderer.h"
#include "vtkImageData.h"
#include "vtkPointData.h"
#include "vtkPlaneSource.h"
#include "vtkPlane.h"
#include "vtkResliceCursorActor.h"
#include "vtkResliceCursorPolyDataAlgorithm.h"
#include "vtkResliceCursor.h"
#include "vtkResliceCursorWidget.h"
#include "vtkResliceCursorLineRepresentation.h"
#include "vtkBiDimensionalWidget.h"
#include"vtkAutoInit.h"
#include"vtkAxesActor.h"
#include"vtkTransform.h"
#include"vtkTextActor.h"
#include"vtkProperty2D.h"
#include<vtkActor2D.h>
#include<vtkResliceImageViewer.h>
#include<vtkImageFlip.h>
#include"vtkAutoInit.h"
VTK_MODULE_INIT(vtkInteractionStyle);
VTK_MODULE_INIT(vtkRenderingOpenGL2);
VTK_MODULE_INIT(vtkRenderingFreeType)
class myrep :public vtkResliceCursorLineRepresentation {
public:
static myrep* New()
{
return new myrep;
}
void SetResliceParameters(
double outputSpacingX, double outputSpacingY, int extentX, int extentY)override
{
vtkImageReslice* reslice = vtkImageReslice::SafeDownCast(this->Reslice);
if (reslice)
{
// Set the default color the minimum scalar value
double range[2];
vtkImageData::SafeDownCast(reslice->GetInput())->GetScalarRange(range);
reslice->SetBackgroundLevel(range[0]);
auto flip = vtkSmartPointer< vtkImageFlip>::New();
flip->SetFilteredAxis(1);
flip->SetInputConnection(reslice->GetOutputPort());
this->ColorMap->SetInputConnection(flip->GetOutputPort());
reslice->TransformInputSamplingOff();
reslice->AutoCropOutputOn();
reslice->SetResliceAxes(this->ResliceAxes);
reslice->SetOutputSpacing(outputSpacingX, outputSpacingY, 1);
reslice->SetOutputOrigin(0.5 * outputSpacingX, 0.5 * outputSpacingY, 0);
reslice->SetOutputExtent(0, extentX - 1, 0, extentY - 1, 0, 0);
}
}
};
class vtkResliceCursorCallback : public vtkCommand
{
public:
static vtkResliceCursorCallback* New()
{
return new vtkResliceCursorCallback;
}
void Execute(vtkObject* caller, unsigned long ev,
void* callData) override
{
if (ev == vtkResliceCursorWidget::WindowLevelEvent ||
ev == vtkCommand::WindowLevelEvent ||
ev == vtkResliceCursorWidget::ResliceThicknessChangedEvent)
{
// Render everything
for (int i = 0; i < 3; i++)
{
this->RCW[i]->Render();
}
this->IPW[0]->GetInteractor()->GetRenderWindow()->Render();
//return;
}
vtkResliceCursorWidget* rcw = dynamic_cast<
vtkResliceCursorWidget*>(caller);
if (rcw)
{
vtkResliceCursorLineRepresentation* rep = dynamic_cast<
vtkResliceCursorLineRepresentation*>(rcw->GetRepresentation());
double window[2];
rep->GetWindowLevel(window);
//同步的前提下才能实现
for (size_t i = 0; i < 3; i++)
{
RCW[i]->GetResliceCursorRepresentation()->SetWindowLevel(window[0], window[1]);
}
rep->GetResliceCursorActor()->GetCursorAlgorithm()->GetResliceCursor();
for (int i = 0; i < 3; i++)
{
vtkPlaneSource* ps = static_cast<vtkPlaneSource*>(
this->IPW[i]->GetPolyDataAlgorithm());
ps->SetOrigin(this->RCW[i]->GetResliceCursorRepresentation()->
GetPlaneSource()->GetOrigin());
ps->SetPoint1(this->RCW[i]->GetResliceCursorRepresentation()->
GetPlaneSource()->GetPoint1());
ps->SetPoint2(this->RCW[i]->GetResliceCursorRepresentation()->
GetPlaneSource()->GetPoint2());
// If the reslice plane has modified, update it on the 3D widget
this->IPW[i]->UpdatePlacement();
}
}
// Render everything
for (int i = 0; i < 3; i++)
{
this->RCW[i]->Render();
}
this->IPW[0]->GetInteractor()->GetRenderWindow()->Render();
}
vtkResliceCursorCallback() {}
vtkImagePlaneWidget* IPW[3];
vtkResliceCursorWidget* RCW[3];
vtkResliceImageViewer* RIW[3];
};
int main()
{
vtkSmartPointer<vtkDICOMImageReader> reader = vtkSmartPointer<vtkDICOMImageReader>::New();
std::string dict = "C:\\Users\\12820\\Desktop\\DICOM参考数据\\CT-head\\1.25-240";
std::string dict1 = "C:\\Users\\12820\\source\\repos\\vtkProject\\vtkProject\\imaghe\\rt_ct";
reader->SetDirectoryName(dict1.c_str());
reader->Update();
int imageDims[3];
reader->GetOutput()->GetDimensions(imageDims);
vtkSmartPointer< vtkResliceImageViewer >riw[3];
vtkSmartPointer< vtkRenderWindow >renderWindow[3];
vtkSmartPointer< vtkRenderWindowInteractor >renderWindowInteractor[3];
vtkSmartPointer< vtkResliceCursor > resliceCursor = vtkSmartPointer< vtkResliceCursor >::New();
vtkSmartPointer< myrep > rep[3];
resliceCursor->SetCenter(reader->GetOutput()->GetCenter());
resliceCursor->SetImage(reader->GetOutput());
for (int i = 0; i < 3; i++)
{
riw[i] = vtkSmartPointer< vtkResliceImageViewer >::New();
rep[i] = vtkSmartPointer< myrep >::New();
renderWindowInteractor[i] = vtkSmartPointer< vtkRenderWindowInteractor >::New();
riw[i]->SetupInteractor(renderWindowInteractor[i]);
}
for (int i = 0; i < 3; i++)
{
riw[i]->GetResliceCursorWidget()->SetRepresentation(rep[i]);
riw[i]->SetResliceCursor(resliceCursor);
rep[i]->GetResliceCursorActor()->GetCursorAlgorithm()->SetReslicePlaneNormal(i);
rep[i]->GetResliceCursorActor()->GetCenterlineProperty(0)->SetRepresentationToWireframe();//代表12窗口竖线
rep[i]->GetResliceCursorActor()->GetCenterlineProperty(1)->SetRepresentationToWireframe();//0竖线,2横线
rep[i]->GetResliceCursorActor()->GetCenterlineProperty(2)->SetRepresentationToWireframe();//01横线
riw[i]->SetInputData(reader->GetOutput());
riw[i]->GetRenderWindow()->SetSize(500, 500);
riw[i]->GetRenderWindow()->SetPosition(800 + i * 500, 500);
if (i == 2)
riw[i]->GetRenderWindow()->SetPosition(800, 0);
riw[i]->SetSliceOrientation(1);
riw[i]->SetSliceOrientation(i);
}
for (int i = 0; i < 3; i++)
{
riw[i]->SetResliceMode(1);
riw[i]->GetRenderer()->ResetCamera();
riw[i]->Render();
}
vtkSmartPointer<vtkCellPicker> picker = vtkSmartPointer<vtkCellPicker>::New();
vtkSmartPointer<vtkProperty> ipwProp = vtkSmartPointer<vtkProperty>::New();
vtkSmartPointer< vtkRenderer > ren = vtkSmartPointer< vtkRenderer >::New();
auto renderWindow4 = vtkSmartPointer<vtkRenderWindow>::New();;//第四个窗口
auto iren = vtkSmartPointer<vtkRenderWindowInteractor>::New();//第四个窗口的vtkRenderWindowInteractor
renderWindow4->SetInteractor(iren);
renderWindow4->AddRenderer(ren);
vtkSmartPointer<vtkImagePlaneWidget>planeWidget[3];
for (int i = 0; i < 3; i++)
{
planeWidget[i] = vtkSmartPointer<vtkImagePlaneWidget>::New();
planeWidget[i]->SetInteractor(iren);
planeWidget[i]->SetPicker(picker);
planeWidget[i]->RestrictPlaneToVolumeOn();
double color[3] = { 0, 0, 0 };
color[i] = 1;
planeWidget[i]->GetPlaneProperty()->SetColor(color);
color[0] /= 4.0;
color[1] /= 4.0;
color[2] /= 4.0;
riw[i]->GetRenderer()->SetBackground(0, 0, 0);
planeWidget[i]->SetTexturePlaneProperty(ipwProp);
planeWidget[i]->TextureInterpolateOff();
planeWidget[i]->SetResliceInterpolateToLinear();
planeWidget[i]->SetInputConnection(reader->GetOutputPort());
planeWidget[i]->SetPlaneOrientation(i);
planeWidget[i]->SetSliceIndex(imageDims[i] / 2);
planeWidget[i]->DisplayTextOn();
planeWidget[i]->SetDefaultRenderer(ren);
planeWidget[i]->SetWindowLevel(1358, -27);
planeWidget[i]->On();
planeWidget[i]->InteractionOn();
}
auto cbk = vtkSmartPointer<vtkResliceCursorCallback>::New();
for (int i = 0; i < 3; i++)
{
cbk->RIW[i] = riw[i];
cbk->IPW[i] = planeWidget[i];
cbk->RCW[i] = riw[i]->GetResliceCursorWidget();
vtkWidgetEventTranslator* WidgetTrans = riw[i]->GetResliceCursorWidget()->GetEventTranslator();
riw[i]->GetResliceCursorWidget()->AddObserver(vtkResliceCursorWidget::ResliceAxesChangedEvent, cbk);
riw[i]->GetResliceCursorWidget()->AddObserver(vtkResliceCursorWidget::WindowLevelEvent, cbk);
riw[i]->GetResliceCursorWidget()->AddObserver(vtkResliceCursorWidget::ResliceThicknessChangedEvent, cbk);
riw[i]->GetResliceCursorWidget()->AddObserver(vtkResliceCursorWidget::ResetCursorEvent, cbk);
riw[i]->SetLookupTable(riw[0]->GetLookupTable());
planeWidget[i]->GetColorMap()->SetLookupTable(riw[0]->GetLookupTable());
// planeWidget[i]->GetColorMap()->(riw[i]->GetResliceCursorWidget()->GetResliceCursorRepresentation()->GetColorMap()->GetInput());
planeWidget[i]->SetColorMap(riw[i]->GetResliceCursorWidget()->GetResliceCursorRepresentation()->GetColorMap());
}
auto style = vtkSmartPointer<vtkInteractorStyleTrackballCamera>::New();
iren->SetInteractorStyle(style);
renderWindow4->SetSize(500, 500);
renderWindow4->SetPosition(1300, 0);
renderWindow4->Render();
iren->Initialize();
iren->Start();
}
```https://gitlab.kitware.com/vtk/vtk/-/issues/18720I set an image vtktransform for the slice image, but the image did not transf...2022-11-18T08:54:06-05:00马文龙I set an image vtktransform for the slice image, but the image did not transform as I expected,I set an image vtktransform for the slice image, but the image did not transform as I expected,
![image](/uploads/e22a395ea7a5c96d442145ea2945f2ac/image.png)
This is the image before mirroring
![image](/uploads/848d146d2ee6fce646df83c...I set an image vtktransform for the slice image, but the image did not transform as I expected,
![image](/uploads/e22a395ea7a5c96d442145ea2945f2ac/image.png)
This is the image before mirroring
![image](/uploads/848d146d2ee6fce646df83c10c8fba63/image.png)
This is the image after mirroring
![image](/uploads/ec8e28210de7d5b516193944b188eedd/image.png)
this is my mirror transform。
I don't understand why it can't be mirroredhttps://gitlab.kitware.com/vtk/vtk/-/issues/18674vtkConduitArrayUtilities: not de-interlacing arrays correctly2022-11-15T17:47:52-05:00JLvtkConduitArrayUtilities: not de-interlacing arrays correctlyThis issue was originally created for Paraview (https://gitlab.kitware.com/paraview/paraview/-/issues/20727), but the faulty code is no longer part of Paraview, but was extracted to VTK instead.
I am not sure how much of the original is...This issue was originally created for Paraview (https://gitlab.kitware.com/paraview/paraview/-/issues/20727), but the faulty code is no longer part of Paraview, but was extracted to VTK instead.
I am not sure how much of the original issue (not created by myself) should be reproduced here or how to reference it (besides the link above).https://gitlab.kitware.com/vtk/vtk/-/issues/18717VTK Nightly Documentation not being updated2022-11-15T17:31:14-05:00Andrew MacleanVTK Nightly Documentation not being updated@ben.boeckel I noticed that the VTK Nightly Documentation hasn't been updated since 20221001. Is it possible to reinstate nightly updates?
Thanks Andrew@ben.boeckel I noticed that the VTK Nightly Documentation hasn't been updated since 20221001. Is it possible to reinstate nightly updates?
Thanks Andrewhttps://gitlab.kitware.com/vtk/vtk/-/issues/18716variable overflow2022-11-15T11:00:15-05:00hgyxb llvariable overflowversion: 9.2.2
file: Interaction/Widgets/vtkResliceCursorRepresentation.cxx:310
double worldFocalPoint[3];
this->Renderer->GetWorldPoint(worldFocalPoint);
the worldFocalPoint will write overflow.
because GetWorldPoint will w...version: 9.2.2
file: Interaction/Widgets/vtkResliceCursorRepresentation.cxx:310
double worldFocalPoint[3];
this->Renderer->GetWorldPoint(worldFocalPoint);
the worldFocalPoint will write overflow.
because GetWorldPoint will write four double, but it is three.
GetWorldPoint define
```c++
///@{
/**
* Specify a point location in world coordinates. This method takes
* homogeneous coordinates.
*/
vtkSetVector4Macro(WorldPoint, double);
vtkGetVectorMacro(WorldPoint, double, 4);
///@}
```https://gitlab.kitware.com/vtk/vtk/-/issues/18710use of undefined type 'vtkSmoothPoints' when inheriting from vtkSmoothPolyDat...2022-11-15T10:08:05-05:00Philipp Weissenbacheruse of undefined type 'vtkSmoothPoints' when inheriting from vtkSmoothPolyDataFilterOS: Windows 11
VTK Version: 9.2.0
IDE: Visual Studio 2022
**Description**
When inheriting from the `vtkSmoothPolyDataFilter` I'm getting an `use of undefined type 'vtkSmoothPoints'` compile time error:
![image](/uploads/787ee05...OS: Windows 11
VTK Version: 9.2.0
IDE: Visual Studio 2022
**Description**
When inheriting from the `vtkSmoothPolyDataFilter` I'm getting an `use of undefined type 'vtkSmoothPoints'` compile time error:
![image](/uploads/787ee051581eb088632fdd941177db1b/image.png)
My code:
![image](/uploads/7048096f5a18acd09853a34f200fae05/image.png)
The above shown code does not contain any additional functionality in the new class (i just stripped the code to its bare minimum, just for your information)
I've looked into the VTK source and realized, that in v9.2.0 the `vtkSmoothPolyDataFilter.h` class got updated to convert the `vtkSmoothPoints*` into a `std::unique_ptr<vtkSmoothPoints>`:
![image](/uploads/ddf9c051c6c1f2fd68f2a49656c93188/image.png)
The class `vtkSmoothPoints` is forward declared at #102:
![image](/uploads/ad7f039796a495c0dca41c59b21b00c1/image.png)
Defining the destructor `~vtkSmoothPolyDataFilter` as `default` on #229 the destructor of the `std::unique_ptr` has to be defined, which is not the case with the forward declaration:
![image](/uploads/2810ca9f2431868a6315d6916b5fd5c7/image.png)
When moving the destructor definition into the `vtkSmoothPolyDataFilter.cxx` file, the compile time error is fixed as the destructor of `vtkSmoothPoints` is defined there:
![image](/uploads/7cb2a70a34eb81dd735f2be9b8af5e54/image.png)
------------------------------------------------------
Am I right, that this is an issue with the VTK source code, or am I doing something wrong when inheriting from the VTK class?
Any information or response is highly appreciated.
Sincerely,
Philipphttps://gitlab.kitware.com/vtk/vtk/-/issues/18664vtkCocoaRenderWindow crashes when initialized from outside main thread2022-11-12T12:27:48-05:00Jaswant Panchumarti (Kitware)vtkCocoaRenderWindow crashes when initialized from outside main thread**Goal**: Spawn a separate thread, construct a render window and call Render in this new thread.
**Problem**: It crashes on mac OS. Runs fine on Linux and windows though.
Turning on OffScreenBuffers also doesn't work. The solution migh...**Goal**: Spawn a separate thread, construct a render window and call Render in this new thread.
**Problem**: It crashes on mac OS. Runs fine on Linux and windows though.
Turning on OffScreenBuffers also doesn't work. The solution might be to really work with offscreen OpenGL context without ever using Cocoa.
The test code:
```c++
int Start(int argc, char* argv[])
{
vtkLogger::SetThreadName("Render Thread");
std::hash<std::thread::id> tid_hash{};
uint32_t tid = tid_hash(std::this_thread::get_id());
vtkLog(INFO, << "Rendering on " << tid);
vtkNew<vtkRenderer> renderer;
vtkNew<vtkRenderWindow> renWin;
renWin->AddRenderer(renderer);
vtkNew<vtkRenderWindowInteractor> iren;
iren->SetRenderWindow(renWin);
renderer->SetBackground(0.2, 0.3, 0.4);
renWin->SetSize(300, 300);
// interact with data
renWin->Render();
int retVal = vtkRegressionTestImage(renWin);
if (retVal == vtkRegressionTester::DO_INTERACTOR)
{
iren->Start();
}
return !retVal;
}
int TestRenderWindowDifferentThread(int argc, char* argv[])
{
std::launch policy = std::launch::deferred;
for (int i = 0; i < argc; ++i)
{
if (std::string(argv[i]) == "-async")
{
policy = std::launch::async;
break;
}
}
vtkLogger::SetStderrVerbosity(vtkLogger::VERBOSITY_INFO);
std::future<int> fut = std::async(policy, &Start, argc, argv);
std::hash<std::thread::id> tid_hash{};
uint32_t tid = tid_hash(std::this_thread::get_id());
vtkLog(INFO, << "Main thread " << tid);
int result = vtkRegressionTester::FAILED;
result = fut.get();
vtkLog(INFO, << "result=" << result);
return result;
}
```
Error:
```
./bin/vtkRenderingOpenGL2CxxTests TestRenderWindowDifferentThread -I -async
( 0.019s) [main thread ]TestRenderWindowDiffere:102 INFO| Main thread 3325499587
( 0.019s) [Render Thread ]TestRenderWindowDiffere:39 INFO| Rendering on 1198912523
2022-09-08 18:17:50.488 vtkRenderingOpenGL2CxxTests[41301:170884] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSWindow drag regions should only be invalidated on the Main Thread!'
*** First throw call stack:
(
0 CoreFoundation 0x00000001818e11a8 __exceptionPreprocess + 240
1 libobjc.A.dylib 0x000000018162be04 objc_exception_throw + 60
2 CoreFoundation 0x000000018190c128 _CFBundleGetValueForInfoKey + 0
3 AppKit 0x00000001843ef930 -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 372
4 AppKit 0x00000001843da92c -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 948
5 AppKit 0x00000001843da56c -[NSWindow initWithContentRect:styleMask:backing:defer:] + 56
6 libvtkRenderingOpenGL2-9.1.9.1.0.dy 0x000000010385520c _ZN20vtkCocoaRenderWindow13CreateAWindowEv + 1136
7 libvtkRenderingOpenGL2-9.1.9.1.0.dy 0x00000001038562cc _ZN20vtkCocoaRenderWindow10InitializeEv + 60
8 libvtkRenderingOpenGL2-9.1.9.1.0.dy 0x00000001039e3b00 _ZN21vtkOpenGLRenderWindow5StartEv + 52
9 libvtkRenderingOpenGL2-9.1.9.1.0.dy 0x00000001038561e4 _ZN20vtkCocoaRenderWindow5StartEv + 28
10 libvtkRenderingUI-9.1.9.1.0.dylib 0x0000000100c6d180 _ZN30vtkCocoaRenderWindowInteractor10InitializeEv + 444
11 libvtkRenderingCore-9.1.9.1.0.dylib 0x0000000106bba7d0 _ZN15vtkRenderWindow6RenderEv + 588
12 libvtkRenderingOpenGL2-9.1.9.1.0.dy 0x00000001039e75bc _ZN21vtkOpenGLRenderWindow6RenderEv + 112
13 vtkRenderingOpenGL2CxxTests 0x0000000100717434 _Z5StartiPPc + 1188
14 vtkRenderingOpenGL2CxxTests 0x0000000100719fd0 _ZNSt3__1L8__invokeIPFiiPPcEJiS2_EEEDTclscT_fp_spscT0_fp0_EEOS5_DpOS6_ + 52
15 vtkRenderingOpenGL2CxxTests 0x0000000100719f90 _ZNSt3__112__async_funcIPFiiPPcEJiS2_EE9__executeIJLm1ELm2EEEEiNS_15__tuple_indicesIJXspT_EEEE + 88
16 vtkRenderingOpenGL2CxxTests 0x0000000100719b74 _ZNSt3__112__async_funcIPFiiPPcEJiS2_EEclEv + 24
17 vtkRenderingOpenGL2CxxTests 0x00000001007196b0 _ZNSt3__119__async_assoc_stateIiNS_12__async_funcIPFiiPPcEJiS3_EEEE9__executeEv + 32
18 vtkRenderingOpenGL2CxxTests 0x000000010071af44 _ZNSt3__1L8__invokeIMNS_19__async_assoc_stateIiNS_12__async_funcIPFiiPPcEJiS4_EEEEEFvvEPS8_JEvEEDTcldsdescT0_fp0_fp_spscT1_fp1_EEOT_OSC_DpOSD_ + 112
19 vtkRenderingOpenGL2CxxTests 0x000000010071ae88 _ZNSt3__1L16__thread_executeINS_10unique_ptrINS_15__thread_structENS_14default_deleteIS2_EEEEMNS_19__async_assoc_stateIiNS_12__async_funcIPFiiPPcEJiS9_EEEEEFvvEJPSD_EJLm2EEEEvRNS_5tupleIJT_T0_DpT1_EEENS_15__tuple_indicesIJXspT2_EEEE + 56
20 vtkRenderingOpenGL2CxxTests 0x000000010071a5d4 _ZNSt3__1L14__thread_proxyINS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEMNS_19__async_assoc_stateIiNS_12__async_funcIPFiiPPcEJiSA_EEEEEFvvEPSE_EEEEEPvSJ_ + 84
21 libsystem_pthread.dylib 0x000000018179426c _pthread_start + 148
22 libsystem_pthread.dylib 0x000000018178f08c thread_start + 8
)
Assertion failed: (NSViewIsCurrentlyBuildingLayerTreeForDisplay() != currentlyBuildingLayerTree), function NSViewSetCurrentlyBuildingLayerTreeForDisplay, file NSView.m, line 13477.
libc++abi: terminating with uncaught exception of type NSException
Loguru caught a signal: SIGABRT
Stack trace:
12 0x100b8108c 16 dyld 0x0000000100b8108c start + 520
11 0x100695480 main + 2476
10 0x1007179d8 TestRenderWindowDifferentThread(int, char**) + 516
9 0x100717da4 std::future<int>::get() + 60
8 0x10071c028 std::__assoc_state<int>::move() + 152
7 0x18174de40 std::terminate() + 64
6 0x18174dea4 std::__terminate(void (*)()) + 20
5 0x181634320 _objc_terminate() + 144
4 0x18173e950 demangling_unexpected_handler() + 0
3 0x18174eb08 __cxxabiv1::__aligned_malloc_with_fallback(unsigned long) + 0
2 0x1816ce340 abort + 168
1 0x181793ee0 pthread_kill + 288
0 0x1817ab4a4 _sigtramp + 56
( 0.110s) [main thread ] :0 FATL| Signal: SIGABRT
zsh: abort ./bin/vtkRenderingOpenGL2CxxTests TestRenderWindowDifferentThread -I -async
```Jaswant Panchumarti (Kitware)Jaswant Panchumarti (Kitware)https://gitlab.kitware.com/vtk/vtk/-/issues/18692Bogus dependency of module testing on VTK_FORBID_DOWNLOADS2022-11-11T09:13:01-05:00StefanBruensBogus dependency of module testing on VTK_FORBID_DOWNLOADSThere is no obvious reason why module testing should depend on allowing downloads, as e.g. all ExternalData can be provided locally.
https://gitlab.kitware.com/vtk/vtk/-/blob/master/CMakeLists.txt#L305-L309There is no obvious reason why module testing should depend on allowing downloads, as e.g. all ExternalData can be provided locally.
https://gitlab.kitware.com/vtk/vtk/-/blob/master/CMakeLists.txt#L305-L309https://gitlab.kitware.com/vtk/vtk/-/issues/18712The program in VTK 8.1 can't work in VTK 9.22022-11-07T03:38:43-05:00Cheng YanThe program in VTK 8.1 can't work in VTK 9.2The program is as follows, which works well in VTK8.2 :
```
//vtkNew<vtkGPUVolumeRayCastMapper> volumeMapper;
vtkSmartPointer<vtkGPUVolumeRayCastMapper> volumeMapper = vtkSmartPointer<vtkGPUVolumeRayCastMapper>::New();
volumeMapper->Se...The program is as follows, which works well in VTK8.2 :
```
//vtkNew<vtkGPUVolumeRayCastMapper> volumeMapper;
vtkSmartPointer<vtkGPUVolumeRayCastMapper> volumeMapper = vtkSmartPointer<vtkGPUVolumeRayCastMapper>::New();
volumeMapper->SetInputData(reader->GetOutput());
volumeMapper->SetSampleDistance(volumeMapper->GetSampleDistance() / 2); //设置光线采样距离
volumeMapper->SetBlendModeToMaximumIntensity();
```
But it can't work in VTK 9.2. The problem is that the volumeMapper is null pointer.
Is anyone konw why? thank youhttps://gitlab.kitware.com/vtk/vtk/-/issues/18705find_package(VTK QUIET COMPONENTS GUISupportQt) fails without qmake and moc b...2022-11-04T02:10:23-04:00yurivictfind_package(VTK QUIET COMPONENTS GUISupportQt) fails without qmake and moc being presentThe failure message:
```
Make Error at /usr/local/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:14 (message):
The imported target "Qt5::Core" references the file
"/usr/local/lib/qt5/bin/qmake"
but this file does not exist. Possible r...The failure message:
```
Make Error at /usr/local/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:14 (message):
The imported target "Qt5::Core" references the file
"/usr/local/lib/qt5/bin/qmake"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"/usr/local/lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake"
but not all the files it references.
Call Stack (most recent call first):
/usr/local/lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake:9 (_qt5_Core_check_file_exists)
/usr/local/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:232 (include)
/usr/local/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:99 (find_package)
/usr/local/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:99 (find_package)
/usr/local/lib/cmake/Qt5OpenGL/Qt5OpenGLConfig.cmake:99 (find_package)
/usr/local/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package)
/usr/local/lib/cmake/vtk-9.2/VTK-vtk-module-find-packages.cmake:773 (find_package)
/usr/local/lib/cmake/vtk-9.2/vtk-config.cmake:152 (include)
CMakeLists.txt:4 (find_package)
```
qmakeand moc shouldn't be required by VTK because qmake and moc are build tools.
Version: 9.2.2
FreeBSD 13.1 STABLEhttps://gitlab.kitware.com/vtk/vtk/-/issues/18700Memory leaks reported when running app built with VTK 9.2.22022-11-03T15:49:44-04:00Ivan KalatchevMemory leaks reported when running app built with VTK 9.2.2Hi,
I tested latest VTK 9.2.2 with our application and in debug mode VS reported memory leaks. Note that the same application with VTK 9.1.0 is fine, no leaks. When built with VLD (Visual Leak Detector), VLD pointed to vtkLogger.cxx, par...Hi,
I tested latest VTK 9.2.2 with our application and in debug mode VS reported memory leaks. Note that the same application with VTK 9.1.0 is fine, no leaks. When built with VLD (Visual Leak Detector), VLD pointed to vtkLogger.cxx, particularly static member detail::ThreadName as a source of the leak. I'm not sure if this is actual issue, or just VS and VLD give false warning because they don't correctly account for static memory allocation/deallocation. If it's not an issue it is still kind of annoying. After I changed vtkLogger.cxx in 9.2.2 to use ThreadName as class member, the way it is in 9.1.0, memory leaks no longer reported.https://gitlab.kitware.com/vtk/vtk/-/issues/18706Emscripten vtk: fatal error: 'vtkSelectPolyData.h' file not found2022-11-03T06:55:14-04:00Zhihao MaEmscripten vtk: fatal error: 'vtkSelectPolyData.h' file not found- I have followed https://gitlab.kitware.com/vtk/vtk/-/issues/18263#note_1045208 to compile vtk inorder using in js.
- It worked fine at first, but recently I found it that maybe don't contain some .h file, like 'vtkSelectPolyData.h.
- ...- I have followed https://gitlab.kitware.com/vtk/vtk/-/issues/18263#note_1045208 to compile vtk inorder using in js.
- It worked fine at first, but recently I found it that maybe don't contain some .h file, like 'vtkSelectPolyData.h.
- When i build some projects that #include <vtkSelectPolyData.h>, fatal error: 'vtkSelectPolyData.h' file not found.
- I'm not sure if I made a mistake or if I didn't include the header in the first place.
CMakeLists.txt
`find_package(VTK COMPONENTS
CommonColor
CommonCore
CommonDataModel
IOGeometry
FiltersCore
FiltersSources
FiltersModeling
FiltersGeneral
FiltersGeometry
FiltersSources
)`
`cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=D:\develop\environment\c++\emsdk\upstream\emscripten\cmake\Modules\Platform\Emscripten.cmake -DBUILD_SHARED_LIBS=OFF -DVTK_DIR=D:\develop\environment\c++\work\build-vtk-wasm\lib\cmake\vtk-9.0 ..`
`cmake --build . `
Whether all features of vtk are not available in Emscripten mode?https://gitlab.kitware.com/vtk/vtk/-/issues/18263Build fails + Emscripten 2.0.252022-11-03T06:49:33-04:00EJ ShimBuild fails + Emscripten 2.0.25I am trying to build VTK using Emscripten 2.0.25
below cmake options are applied :
```
-G Ninja \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DBUILD_SHARED_LIBS:BOOL=OFF \
-DVTK_ENABLE...I am trying to build VTK using Emscripten 2.0.25
below cmake options are applied :
```
-G Ninja \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DBUILD_SHARED_LIBS:BOOL=OFF \
-DVTK_ENABLE_LOGGING:BOOL=OFF \
-DVTK_ENABLE_WRAPPING:BOOL=OFF \
-DVTK_LEGACY_REMOVE:BOOL=ON \
-DVTK_OPENGL_USE_GLES:BOOL=ON \
-DVTK_USE_SDL2:BOOL=ON \
-DVTK_NO_PLATFORM_SOCKETS:BOOL=ON \
-DVTK_MODULE_ENABLE_VTK_hdf5:STRING=NO \
```
It worked fine in Emscripten 1.38 version, but now it generates error in (looks like) every modules using `vtkIOStream.h` :
```
.
.
.
#6 1777.6 In file included from /VTK/Common/Core/vtkIOStream.h:29:
#6 1777.6 In file included from /emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/fstream:184:
#6 1777.6 In file included from /emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/ostream:137:
#6 1777.6 In file included from /emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/ios:215:
#6 1777.6 In file included from /emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__locale:15:
#6 1777.6 In file included from /emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/string:511:
#6 1777.6 In file included from /emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/string_view:179:
#6 1777.6 In file included from /emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__string:57:
#6 1777.6 In file included from /emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/algorithm:653:
#6 1777.6 In file included from /emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/memory:687:
#6 1777.6 In file included from /emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/atomic:579:
#6 1777.6 In file included from /emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__threading_support:17:
#6 1777.6 In file included from /emsdk/upstream/emscripten/cache/sysroot/include/errno.h:10:
#6 1777.6 In file included from /emsdk/upstream/emscripten/cache/sysroot/include/bits/errno.h:1:
#6 1777.6 In file included from /emsdk/upstream/emscripten/cache/sysroot/include/wasi/api.h:29:
#6 1777.6 In file included from /emsdk/upstream/emscripten/cache/sysroot/include/stddef.h:17:
#6 1777.6 /emsdk/upstream/emscripten/cache/sysroot/include/bits/alltypes.h:291:54: error: typedef redefinition with different types ('struct max_align_t' vs 'struct max_align_t')
#6 1777.6 typedef struct { long long __ll; long double __ld; } max_align_t;
#6 1777.6 ^
#6 1777.6 /emsdk/upstream/lib/clang/13.0.0/include/__stddef_max_align_t.h:24:3: note: previous definition is here
#6 1777.6 } max_align_t;
.
.
.
```https://gitlab.kitware.com/vtk/vtk/-/issues/18697About SetPoint1DisplayPosition and GetPoint1DisplayPosition Errors2022-11-01T21:56:22-04:00ma1282029525About SetPoint1DisplayPosition and GetPoint1DisplayPosition ErrorsI'm doing a function of dragging distancewidget, but I found that the distance will change during dragging. The final problem is located in SetPoint1DisplayPosition and GetPoint1DisplayPosition. I get it immediately after setting, but th...I'm doing a function of dragging distancewidget, but I found that the distance will change during dragging. The final problem is located in SetPoint1DisplayPosition and GetPoint1DisplayPosition. I get it immediately after setting, but the results are different, with a pixel error. The probability of occurrence during dragging is very high. How can I solve this problem.https://gitlab.kitware.com/vtk/vtk/-/issues/18702ETA for Python 3.11 packages?2022-11-01T21:53:36-04:00Alexander HegerETA for Python 3.11 packages?Is there an ETA for packages for Python 3.11?
Even some pre-release packages that mostly work although not your full quality standards and testing regime would probably quite useful for most users.
For example, could be flagged as pre...Is there an ETA for packages for Python 3.11?
Even some pre-release packages that mostly work although not your full quality standards and testing regime would probably quite useful for most users.
For example, could be flagged as pre-release on PyPI.
In the meanwhile, any special instructions for building from source fo 3.11 or known issues?https://gitlab.kitware.com/vtk/vtk/-/issues/18608vtkCellLocator::FindClosestPointWithinRadius does not check return value of E...2022-10-25T21:03:18-04:00Arno MayrhofervtkCellLocator::FindClosestPointWithinRadius does not check return value of EvaluatePosition`vtkCellLocator::FindClosestPointWithinRadius` uses `EvaluatePosition` twice:
https://gitlab.kitware.com/vtk/vtk/-/blob/master/Common/DataModel/vtkCellLocator.cxx#L413-L414
https://gitlab.kitware.com/vtk/vtk/-/blob/master/Common/DataMo...`vtkCellLocator::FindClosestPointWithinRadius` uses `EvaluatePosition` twice:
https://gitlab.kitware.com/vtk/vtk/-/blob/master/Common/DataModel/vtkCellLocator.cxx#L413-L414
https://gitlab.kitware.com/vtk/vtk/-/blob/master/Common/DataModel/vtkCellLocator.cxx#L530-L532
The `if`s that follow these calls should be modified to become
```
if (tmpInside != -1 && dist2 < minDist2)
```
If this does not happen invalid data is written to the output as the returned `dist2` is -1 and in my case this eventually leads to a segfault.