[vtkusers] Relationship between MinZBound and Position for a vtkVolume

Elvis Stansvik elvis.stansvik at orexplore.com
Fri Sep 16 08:15:03 EDT 2016


2016-09-16 13:26 GMT+02:00 Elvis Stansvik <elvis.stansvik at orexplore.com>:
> This is a very basic question, but I feel like I've missed something
> fundamental.
>
> I have a volume which I set the position for using SetPosition. I'm
> not applying any other transformations such as rotation or scale.
>
> What surprises me is that after having set the position, if I look at
> the MinZBound of the volume, it doesn't correspond to the Z position I
> set.
>
> E.g. if I (after I set the position of the volume) do
>
>     qDebug() << "MinZBound:" << volume->GetMinZBound();
>     qDebug() << "Position[3]" << volume->GetPosition()[2];
>
> I can get output such as:
>
>     MinZBound: -0.162738
>     Position[3] -0.165138
>
> I thought that the bounds of a volume was in VTK world coordinates. If
> so, shouldn't MinZBound be exactly the Z position?
>
> Thanks for any clarifications, I've probably missed something simple.

I forgot to say that in the X and Y axes, there seems to always be a
correspondance after my SetPosition(..):

MinXBound: -0.0299
Position[0] -0.0299
MinYBound: -0.0299
Position[1] -0.0299

I can't see what's special about the Z direction. What else affects
the bounds of the vtkVolume? The reason I'm asking, and what made me
discover this, is that my volumes don't show up at the positions I
expect them to.

I'm sure I've missed something trivial, but I'm at a loss as to what it is :/

Elvis

>
> Elvis


More information about the vtkusers mailing list