-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
using image actor #11
Comments
It should work on current master |
Hello! |
I solved it. It occurred vtk files[using the cmake]. (vtk version latest version 9.2) |
I'm faced with another problem as below. ============================== #define vtkRenderingCore_AUTOINIT 3(vtkRenderingOpenGL2,vtkInteractionStyle, vtkRenderingFreeType) #include <vtkActor.h> static vtkSmartPointer SetupDemoCylinder()
} |
Thanks for this excellent example using vtk with imgui+glfw. Unfortunately, I am a novice at both, and I am having problems adapting it to use a ``vtkImageActor`. In the snippet below, the reader and actor code (up to the dynamic_cast) came from the vtk example ImageReader2Factory. But when I use the actor returned by my SetupImagePipeline() instead of your SetupDemoPipeline(), I do not get the image shown in the imgui window. (I am able to run the standalone vtk example, so my vtk+glfw environment is working.)
Is there something special that is needed to make your example work with a vtkImageActor?
I appreciate any help, and, of course, I will be glad to provide you a PR if I able to get this to work. (By the way, I am doing this on windows with a vcpkg build of imgui and vtk.)
(Note: in the snippet above I have a hack where the initial actor is static. I do this because I am trying to focus on the main problem where the image actor is not showing the image in the imgui window. This is here to avoid the secondary problem to correct my ignorance of how to work with both vtkNew and vtkSmartPointer. I thought a vtkSmartPointer would automatcally convert to a vtkSmartPointer but that does not seem to compile. So the last two lines in the snippet are a hack to make the compiler happy and avoid crashing when the inital actor goes out of scope. I will fix that if/when I am able to get the vtkImageActor to work.)
The text was updated successfully, but these errors were encountered: