[vtkusers] re:Re: vtkImageMapper and GetWholeZMax() question
Yixun Liu
yxliu at fudan.edu.cn
Tue Aug 29 21:10:26 EDT 2006
Hi,
To display the image in 2D plane the spacing should be taken into account to ensure a correct ratio in each direction. For example, you can set the same spacing to the 3D image and you will find the extents are not change in XY, YZ or XZ plane.
Cheers,
Yixun Liu
Another observation:
When I have the slicer working with the whole volume (output dimensionality
3) then the whole extent is returned as follows:
XY: 0, 255:0, 255:0, 119
YZ: 0, 199:0, 186:0, 199
XZ: 0, 199:0, 186:0, 199
However, when I am working in the 2D mode (output dimensionality 2) then, I
have the following domain for the data:
XY: 0, 255:0, 255:0, 119
YZ: 0, 255:0, 119:0, 255
XZ: 0, 255:0, 119:0, 255
I can verify this by changing the SetResliceAxesOrigin of the reslicer and
it returns the correct slice.
I am wondering why this extent should be different when working with the
whole volume.... Is it taking the spacing into account and returning the
real world coordinates. Does not seem so though...
Any explanation would be really appreciated.
Cheers,
Anja
On 29/08/06, Anja Ende <anja.ende at googlemail.com> wrote:
>
> Ok, upon looking into the vtkImageMapper class, the values are produced by
> calling the GetWholeExtent() on the input.
>
> The values returned by it are:
>
> XY: 0, 255:0, 255:0, 119
> YZ: 0, 199:0, 186:0, 199
> XZ: 0, 199:0, 186:0, 199
>
> Now, what exactly is the difference between the different extents... I
> thought the extent would be the dimension of the object...
>
> Please enlighten me!
>
> Thanks,
> Anja
>
>
>
> On 29/08/06, Anja Ende <anja.ende at googlemail.com> wrote:
> >
> > Hi everyone,
> >
> > I have a question about the vtkImageMapper class and the GetWholeZMax()
> > function.
> >
> > I have an input volume of the following dimensions:
> >
> > x = 256 .
> > y = 256
> > z = 120.
> >
> > When I use the vtkImageViewer to display the data in the X, Y plane it
> > returns 120 as the number of Z slices available for display.
> >
> > However, in the YZ and the XZ plane the number of Z slices is 199 (200).
> > I actually thought it should be 255. I was wondering if someone can explain
> > to me how exactly this calculation is done...
> >
> > Thanks,
> >
> > Anja.
> >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060830/cb797e20/attachment.htm>
More information about the vtkusers
mailing list