comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: random slice through a volume of catscan data
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: random slice through a volume of catscan data [message #34942 is a reply to message #34940] Thu, 01 May 2003 11:32 Go to previous message
Sergey Koposov is currently offline  Sergey Koposov
Messages: 7
Registered: April 2003
Junior Member
Hello, Jeff,
I think , if your data volume is presented as 3-dimensinal array (i.e.
your data is uniformly spaced ), you can use the EXTRACT_SLICE function.

Otherwise , (if your data is presented , for example, as 1-dimensional
array with x,y & z coordinates ) you can
1) define the function distance(x,y,z) , which will compute the distance
from the point to the plane
function distance,x,y,z
common plane ,A,B,C,D ; on the assumption that A*x+B*y+C*z+D=0 return
,(A*x+B*y+C*z+D)/sqrt(A^2+B^2+C^2) ;define the plane
end
2) Select the points for the slice by using WHERE
indices=WHERE(dist(X,Y,Z) lt 1) ;where X,Y,Z are 1-d arrays of x,y,z
coordinates
3) Image the necessary characteristics for X[indices],Y[indices],Z[..]
with some interpolation (if you need of image , not of plot of points)
(for example the function GRID_TPS,and others (other functions are in
the IDL Online Help , "gridding and interpolation"))

You can also make the interpolation for slicing in the beginning by
means the GRID3 function (see also IDL Online Help , gridding and
interpolation) . And after that , you will can directly perform the
imaging.

I hope my considerations will be useful. But I don't insist that my
methods are optimal :)
Cheers,
Sergey

Jeff Nettles wrote:
> Hi All,
>
> I have some CT data that I would be able to take randomly-oriented slices
> through. (BTW, these are scans of meteorites, not people, in case you're
> thinking that it doesn't make any sense why i'd want to do this.) My
> approach so far has been to randomly select 3 sets of x,y, & z coordinates
> so that i have three points that define a plane. Now I want to extract a 2D
> image that represents that plane from the 3D CT data volume. My priority
> here is to preserve the shapes of the objects in the random slice. I know
> i'm going to have to do some interpolating since the slice won't always go
> through entire pixels. What i'm hoping that i can get help with is:
>
> 1) Is there by any chance a program someone has written (or included with
> IDL) that can do this already? (I'm a relatively inexperienced IDL
> programmer)
>
> 2) If I'm going to have to code this myself, are there IDL functions that
> would make this easier? I've looked at the WHERE function, but haven't
> convinced myself that it will help. I know to try to avoid for loops as
> much as possible so I'm trying to do that.
>
> 3) Any suggestions about a general approach to the problem would be very
> helpful.
>
> Thanks for your time (and hopefully your help!),
> Jeff
>
>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: sec : U Re: Parameters in event_pro
Next Topic: Threshold value from histogram plot

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Apr 25 18:45:29 PDT 2026

Total time taken to generate the page: 1.75996 seconds