[vtkusers] scaling a volume

Lisa Avila lisa.avila at kitware.com
Thu Feb 21 11:58:36 EST 2002


Hi Melanie,

You probably aren't doing anything "wrong"  (setting the scale by some 
uniform value should work - you have encountered a bug I suspect) - but 
this is not the preferred way to change the size of the volume. Instead, 
change the origin and the spacing of the input vtkImageData to indicate the 
location and size of the volume. This allows you to scale independently 
along the three axes whereas this will produce incorrect results (in both 
volume and surface rendering shading will be wrong) in VTK if done in the 
prop's matrix.

Lisa


At 05:31 PM 2/20/2002, Melanie Tory wrote:
>Hi all,
>
>I am creating a subvolume using vtkImageReslice, and I want to volume
>render the subvolume and magnify it in size relative to other objects in
>the scene. I create a vtkVolume using the subvolume data and render it
>using ray-casting.  (I have the opacities all set to 1 and the colours set
>to the original image colours, so that each side of the subvolume object
>just shows an image at that position in the original volume.)
>This all works fine. However, when I try to enlarge my vtkVolume using
>
>volume->SetScale(2.0)
>
>I get a weird effect.  The image appears to get magnified by 2, but the
>volume object itself only gets enlarged a little bit.  The effect is that
>the magnified image only contains part of the original image, as though it
>were zoomed instead of made larger.
>
>Any idea what I'm doing wrong?  I'd appreciate your help.
>
>Thanks,
>Melanie Tory
>Simon Fraser University
>
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at: 
><http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://public.kitware.com/mailman/listinfo/vtkusers




More information about the vtkusers mailing list