improfile() through 3D image?

2 ビュー (過去 30 日間)
Justin Solomon
Justin Solomon 2012 年 7 月 8 日
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 Center および File ExchangeImage Segmentation and Analysis についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by