[vtkusers] Help! How to slice a volume data arbitrary?

Roland Schwarz roland.schwarz at chello.at
Thu Apr 4 02:34:07 EST 2002


Hi Plato,

I am not sure what you want, but cutting points in 3-d basically is a
dot-product of a plane vector with the respective point.
Say, you have a plane defined by its homogenous coordinates: (a,b,c,d) then
have your point defined in its homeogenous coordinates (x,y,z,1).

Then calculate d = a*x + b*y + c*z +d*1. If d > 0 the point is on one side
of the plane, if not it is on the other.
Also have a look what is called (Hessesche-) Normal-Form of the plane
equation.

Again I am not sure what you really need.

Roland

  ----- Original Message -----
  From: platogao
  To: vtkusers at public.kitware.com
  Sent: Thursday, April 04, 2002 9:14 AM
  Subject: [vtkusers] Help! How to slice a volume data arbitrary?


  Hi,
  I have a volume data set. I want to get the arbitrary slice of the volume.
That is: you can define your our plane function to cut or slice the volume,
and then get the slice image.
  I know this is very easy if use vtkCutter or vtkProbe or vtkImageReslice.
But they are 'black box' to me. I cannot control every step of the
operation. I need to do this operation use C++ and OpenGL.
  My idea is that: use a point and a normal to define the plane. Then
convert every points in the plane(use 2d coordinate,say image[i,j]) to 3d
coordinate(x,y,z). Then see if (x,y,z) is in the volume. If it is in, use
linear interplation to get the Value(x,y,z).
  My idea seems straight forword, but I think it is also very slow. I wonder
if anyone can give me some advise on this operation, or how to convert (i,j)
from a plane to world coordiante (x,y,z).
  Thank you very much!
  Plato Gao






More information about the vtkusers mailing list