Greetings to all ! I have a 3D matrix which represnts a Sheep_Logan Phantom. Is there any way to plot the intensity ogf the image matrix both in horizontal and vertical direction? I can do the same things with saving an image but I want it from the matrix that I have attached.

 採用された回答

Image Analyst
Image Analyst 2022 年 7 月 11 日

0 投票

Do you want the profile along some certain row or columns, like
rowProfile = squeeze(image3d(rowNumber, :, sliceNumber));
columnProfile = squeeze(image3d(:, colNumber, sliceNumber));
or do you want the average profile across the entire plane? Or the max projection? Have you seen slice?

5 件のコメント

Amit Chakraborty
Amit Chakraborty 2022 年 7 月 11 日
編集済み: Amit Chakraborty 2022 年 7 月 11 日
@Image Analyst, Thank you for your reply. Yes I want the Intensity profile along some certain row or columns ( for a specific slice) for a specific direction (Horizontal/Vertical).
It should be 2D plot ( Having the shape of Gaussing Bell). Kind of Following.
Image Analyst
Image Analyst 2022 年 7 月 11 日
OK, but did my code not work? Did you even try it? It should produce a 1-D plot of the gray scale, like you showed. If you want a 2-D profile, then that is an image and you'd replace one of the number variables by a colon.
Amit Chakraborty
Amit Chakraborty 2022 年 7 月 11 日
編集済み: Amit Chakraborty 2022 年 7 月 11 日
@Image Analyst, Thank you so much for helping this novice. your code is perfectly fine.
Another thing for my own knowledge:
How I do them : average profile across the entire plane and the max projection ?
Image Analyst
Image Analyst 2022 年 7 月 12 日
I would first get the entire plane as a 2-D image and then use max for the direction you want. For example
image2d = randi(255, 5, 4)
image2d = 5×4
135 151 116 211 98 187 192 160 112 179 167 117 107 77 125 114 35 113 144 28
verticalMaxProjection = max(image2d, [], 2)
verticalMaxProjection = 5×1
211 192 179 125 144
horizontalMaxProjection = max(image2d, [], 1)
horizontalMaxProjection = 1×4
135 187 192 211
Amit Chakraborty
Amit Chakraborty 2022 年 7 月 12 日
@Image Analyst Thank you SO MUCH !!!!!!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Image Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by