improfile() through 3D image?

4 次查看(过去 30 天)
Hello,
I have a 3D image set (i.e., a stack of CT images), I would like to get a line profile through this 3D image set similar to what improfile() does on a normal 2D image. I can't find anything that does this. Help!
Thanks, Justin

采纳的回答

Walter Roberson
Walter Roberson 2012-7-8
If you can calculate the coordinates that you want to sample at, then you can use interp3(). But calculating the coordinates might require using something like http://en.wikipedia.org/wiki/Bresenham's_line_algorithm
  1 个评论
Justin Solomon
Justin Solomon 2012-7-10
Thanks for the advice. I was able to find an implementation of Bresenham's line algorithm.
I have a follow up question about interp3().
I've got a 3D image, I, and I've defined a coordinate system (x,y,z) for I. Note that because I'm dealing with images, x actually corresponds to the second dimension (columns) of I,. Further, I have a list of points [Xprof Yprof Zprof] that define a line through the image (i.e., Xprof, Yprof, and Zprof are all vectors of length n where n is the number of points in the line). Now I would like to use interp3() to get values of I along the line defined by [Xprof Yprof Zprof].
I'm worried that I'm mixing up the x and y axis when I call interp3(). Should I do
1. HUs = interp3(y,x,z,I,Yprof,Xprof,Zprof);
or
2. HUs = interp3(x,y,z,I,Xprof,Yprof,Zprof);
Below is the calling sequence for interp3() described in the help menu.
VI = interp3(X,Y,Z,V,XI,YI,ZI)
I don't know if X is associated with the rows or columns of V. Any insight would be helpful.
Thanks, Justin

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Image Segmentation and Analysis 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by