[vtkusers] question about mapping textures to arbitrary shapes

John Biddiscombe jbiddiscombe at skippingmouse.co.uk
Wed Nov 13 03:51:14 EST 2002


> Well, let me explain the big picture of what i'm trying to do, and maybe
> that'll shed some light.

Much better. If you take a slice, you get a rounded surface like a layer of
an onion truncated to 60deg by 60deg. The obvious first though is ...
can you define a transformation that maps a plane onto your curved base? (or
curved onion layer at height h)? If so, then can you also use
vtkImageReslice with a user specified transform? If so, then you ought to be
able to use your volume, presumably stored as a standard vtkImageData (ie
rectilinear), but really with curved voxel spacings, then imagereslice will
do it's work as expected, but actually be cutting a curved region out.

Presumably the custom transform will be a fairly simple cos(theta)
sin(theta) type jobby with the curvature and radius you need.

I've never tried anything like this, but David Gobbi is the Transform and
Reslice king so let's hope he reads your message.

JB


>
>     Our data set is really a 3-D volume data set of ultrasound images.
What
> the data set represents in 3-d physical space is if you took a globe, and
> took a 60 degrees of latitude and 60 degrees of longitude wedge out of it,
> much like a 4-sided pyramid with a rounded bottom.  The rounded bottom is
> one of the points where I'm having trouble.
>
>     Now like i mentioned before, ultrasound is strange in that it isnt
> rectilinear.  Our data has 64 x 64 x 256 voxels, with the 64x64
representing
> the sides of the pyramid, and the 256 representing the height of the
pyramid
> (from the tip of the pyramid to any voxel in the curved base).  What makes
> this even more weird is that if you select a particular "height," say 150
> for example, the 64x64 set of voxels at that height do not lie on a plane,
> but rather on a curved surface.
>
>     I would like to use some of the vtk slicers to visualized any
arbitrary
> plane through this data set.  And, if you followed me so far, i'm
impressed
> because my explaination probably wasnt that good.  Can anyone offer any
> help?
>
> Thanks for your help,
>
> wilson
>
>
>
> ----- Original Message -----
> From: "John Biddiscombe" <jbiddiscombe at skippingmouse.co.uk>
> To: "Wilson" <wilson at cs.wisc.edu>; <vtkusers at public.kitware.com>
> Sent: Tuesday, November 12, 2002 5:06 PM
> Subject: Re: [vtkusers] question about mapping textures to arbitrary
shapes
>
>
> > Look at vtkTextureMapToPlane. If I read you right, you've got a 2D image
> > that you want to stick on a pie shaped 2d polygon. Just project the
image
> > onto the polygon.
> >
> > Probably its not as simple as that...
> >
> > JB
> >
> > ----- Original Message -----
> > From: "Wilson" <wilson at cs.wisc.edu>
> > To: <vtkusers at public.kitware.com>
> > Sent: Tuesday, November 12, 2002 9:54 PM
> > Subject: [vtkusers] question about mapping textures to arbitrary shapes
> >
> >
> > hi,
> >     I am new to using VTK and I have a quesiton about how to map
textures
> to
> > arbitrary shapes.  In my particular case, I am trying to visualize
> > ultrasound data.  In this case, the data does not posess a rectilinear
> > distribution, but rather it looks more like a pie wedge.
> >     So, if my texture consists of a 2D array, how would I map it to a
> wedge
> > shape given I know where each texture/data point should map to in
physical
> > 2-D space?  I have taken a look at the vtkDataSetMapper, and I believe
> that
> > this is the right way to procede, but the details allude me.  Could
anyone
> > offer any insight on this matter?
> >
> > Wilson Chang
> > MD/PhD Program
> > University of Pittsburgh
> > School of Medicine
> > Dept of Bioengineering
> >
> >
> > _______________________________________________
> > 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
> >
>
>
> _______________________________________________
> 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