[vtkusers] vtkImageData -> vtkVolumeMapper looks backwards

powerhouseofexcellence powerhouseofexcellence at gmail.com
Mon Aug 29 13:57:31 EDT 2005


Hi Amy,

I could use the image flip, but I have a bunch of actors annotating my
slices. So now if I do this flip, my actors are going to still be all
backwards.

My goal was to be able to place these actors in my '2d' view mode that
would be correctly positioned when I look in '3d' mode. But it looks
like I'm stuck, unless there is a way to ask VTK/opengl to flip the z
axis? Otherwise I guess I'll have to bite the bullet and everytime I
switch between viewing mode recalculate all these actors' positions.

The other easy option is to set the z spacing of the image data to be
negative, as well as the z loc of all the actors to be negative. But
this seems to have a detrimental effect on the volume rendering
performance.

What do you think?

Thanks as always


On 8/29/05, Amy Squillacote <amy.squillacote at kitware.com> wrote:
> Try vtkImageFlip:
> http://www.vtk.org/doc/nightly/html/classvtkImageFlip.html.  You
> probably want to set FlipAboutOrigin to 1.
> 
> - Amy
> 
> At 11:45 PM 8/26/2005, powerhouseofexcellence wrote:
> >Hi all,
> >
> >I load 50 images into a vtkImageData object one at a time. When I hand
> >this image data object to one of the volume renderers, it seems my
> >slices are 'backwards', in that I loaded my first slice at position 0,
> >next slice at position 1, etc. But my slices come towards the viewer,
> >instead of marching away from the viewer, I guess this is because
> >VTK's z axis goes positive towards the viewer. I changed the spacing
> >of my image data object to be negative along the z axis to flip this
> >so it looks correct, but the render time is slowed down and is choppy
> >if I do that. Is there anyways to reconfigure the coordinate system or
> >do I manually have to load slice 0 into slot # 50 to get this to be
> >volume rendered in the 'right' order?
> >
> >Thanks
> >_______________________________________________
> >This is the private VTK discussion list.
> >Please keep messages on-topic. Check the FAQ at:
> >http://www.vtk.org/Wiki/VTK_FAQ
> >Follow this link to subscribe/unsubscribe:
> >http://www.vtk.org/mailman/listinfo/vtkusers
> 
>



More information about the vtkusers mailing list