[vtkusers] Relationship between MinZBound and Position for a vtkVolume
David Gobbi
david.gobbi at gmail.com
Fri Sep 16 08:23:22 EDT 2016
I might have time for a longer answer later, but for now, I suggest you
look at vtkImageChangeInformation.
- David
On Fri, Sep 16, 2016 at 6:19 AM, Elvis Stansvik <
elvis.stansvik at orexplore.com> wrote:
> 2016-09-16 14:15 GMT+02:00 Elvis Stansvik <elvis.stansvik at orexplore.com>:
> > 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 :/
>
> A perhaps important piece of information is that the vtkVolume uses a
> vtkImageData that was the result of a vtkExtractVOI (taking a piece of
> the image in the Z direction). So.. is there something special I
> should watch out for regarding the bounds of the resulting image when
> using vtkExtractVOI?
>
> I found this old and unanswered post from 2006 where someone else was
> seeing strange bounds after a vtkExtractVOI:
>
> http://www.vtk.org/pipermail/vtkusers/2006-December/039113.html
>
> Or perhaps that poster also suffers from the same confusions I am at the
> moment?
>
> Elvis
>
> >
> > Elvis
> >
> >>
> >> Elvis
> _______________________________________________
> 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/20160916/5cf67b22/attachment.html>
More information about the vtkusers
mailing list