[vtkusers] VTK-JS: How to get Position of actor
Sebastien Jourdain
sebastien.jourdain at kitware.com
Mon Sep 18 10:38:26 EDT 2017
Hi Katrin,
The actor position only describe the relative position to the data, that's
why by default they are always (0,0,0).
Which means its your source or dataset that has the information about the
position that you are looking for.
For example to find the bounds of a rendered dataset you can do as follow.
dataset = mapper.getInputData();
bounds = dataset.getBounds();
// bounds is an array as follow:
// [ minX, maxX, minY, maxY, minZ, maxZ]
Hope that helps,
Otherwise you can learn more on the basic concepts behind VTK here:
https://www.vtk.org/vtk-users-guide/
Seb
On Mon, Sep 18, 2017 at 7:31 AM, Katrin Hartwig <katrin_hartwig at gmx.de>
wrote:
> Dear all,
>
> I am using a visualization of several actors with VTK-js. Unfortunately,
> when using *actor.getPosition() *I always get [0,0,0] as a result, no
> matter which actor I checked, although they appear on different positions
> in my rendering window.
> How can I get the real positions or centers of the different actors?
>
> As I am completely new to VTK-js and I could not find any solutions to my
> problem, any help would be great!
>
> Thank you
> Katrin
>
> _______________________________________________
> 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
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170918/70fdef7b/attachment.html>
More information about the vtkusers
mailing list