[vtkusers] how to draw with exact physical dimension (on screen)

Elvis Chen elvis.chen at gmail.com
Fri Jun 6 17:18:54 EDT 2014


hi David/Maarten,

sounds like we have a Queen's/Robarts reunion :)

let say if I know (from manufacturer's specification) the exact size of the
pixel, is there a way to do this in VTK?  I guess I can try to set the
camera's position (with respect to the imaging plane) to get the correct
zoom factor, so the drawn object would appear as the correct/physical
size.  I haven't tried this, just want to throw this idea out.

any other suggestions?

thanks!



On Fri, Jun 6, 2014 at 11:17 AM, Maarten Beek <beekmaarten at yahoo.com> wrote:

> I quickly checked Qt, there are functions (e.g.:
> QPaintDevice::heightMM()), but the docs also say it is inaccurate.
>
> Maarten
>
>
>   On Friday, June 6, 2014 8:58:58 AM, David Gobbi <david.gobbi at gmail.com>
> wrote:
>
>
> Hi Elvis,
>
> I've tried doing this in the past, but the pixel sizes reported by the
> operating
> system are only approximate and are sometimes wildly inaccurate.  VTK
> itself has no way of retrieving this information, as far as I am aware.
>
> In the end, I just applied a ruler to the screen :)
>
>   David
>
>
>
> On Thu, Jun 5, 2014 at 7:17 AM, Elvis Chen <elvis.chen at gmail.com> wrote:
> > hi all,
> >
> > Is there a way to draw a geometrical objects that will show up on the
> screen
> > with known physical dimension in vtk?
> >
> > That is, say if I want to draw a square of 5cm in dimension, and I want
> it
> > to appear on screen as a square of 5cm^2, how do I specify vtkCamera that
> > takes the screen pixel dimension into consideration?
> >
> > or am I in the wrong track by looking into vtkCamera?
> >
> > any help is very much appreciated,
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140606/596d634e/attachment-0001.html>


More information about the vtkusers mailing list