Code Monkey home page Code Monkey logo

Comments (6)

ssilburn avatar ssilburn commented on August 18, 2024

This appears to be because of a change in behaviour of vtk.vtkRenderLargeImage(), when magnification is set > 1, from VTK 8.2 onward. I can't find any documentation that suggests this is an intentional change, or any way to work around it.

I've opened an issue about this against VTK: https://gitlab.kitware.com/vtk/vtk/-/issues/17964

from calcam.

ssilburn avatar ssilburn commented on August 18, 2024

I think there's a solution! Thanks to: http://vtk.1045678.n5.nabble.com/Offscreen-rendering-beyond-screen-resolution-with-WindowToImageFilter-magnification-td5724102.html . It looks like the answer is simply to use SetBorders(0) on the offscreen render window and then not use vtkRenderLargeImage at all.

from calcam.

TomFarley avatar TomFarley commented on August 18, 2024

Great! Does this mean the latest version of vtk is safe for Calcam now? (I'm about to request a python 3.9 distribution on freia with an appropriate version of vtk.)

from calcam.

ssilburn avatar ssilburn commented on August 18, 2024

Not the version on master yet, but very nearly...I'm working on it on a new branch called offscreen_render_dev. In a fever of optimism and ambition I took the approach of not just implementing the minimum laziest fix but trying to keep the code nice and clean at the same time....and now benchmarking that branch against master shows the wireframe alignment is coming out slightly different again, but I think that's a new bug which is a side-effect of what I've done.

I'm confident enough that the underlying problem is fixed that I'd say go ahead and request up-to-date VTK for the new python env, but if you want to hang on until I can confirm it's really fixed I'll try to look at it over the next couple of days.

from calcam.

TomFarley avatar TomFarley commented on August 18, 2024

Ok great, good to know. I'll go ahead and request the latest version then. Thanks Scott!

from calcam.

ssilburn avatar ssilburn commented on August 18, 2024

OK, as above - now merged on to master, the code on master tests OK for me on "old" VTK < 8.2 and also on VTK 9.0.1. I'm going to (finally) close this issue!

After I've delt with a few more issues I'll do a new release for this which will be Calcam 2.7 :)

from calcam.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.