Imgradient3 what input it take

1 次查看(过去 30 天)
Saurav
Saurav 2024-3-27
评论: Saurav 2024-4-3
Input of imgradient3 there is 3d binary image or gray scacle.
I have 2 d slices of dicom file which I processed it(binarized all the slices)
Now i am trying to find the gradient of interface that is surface coordinates not of whole volume.
I didn't understand the what input actually Imgradient3 function is taking.
I example they have taken lod(mri).
https://in.mathworks.com/help/images/ref/imgradient3.html#d126e166304

回答(1 个)

Brahmadev
Brahmadev 2024-4-1
The "imgradient3" function in MATLAB is designed to compute the gradient magnitude and direction of a 3-dimensional grayscale image. The input to this function can indeed be a 3D binary image or a 3D grayscale image. When you're working with DICOM slices, which are typically 2D slices of a 3D volume, you need to stack these slices together to form a 3D volume before you can use "imgradient3".
You can read the dicom files using the "dicomread" function, then create a 3D image by stacking the slices and then feed into the "imgradient3" function and get the gradient magnitude and direction. You can refer to the following MATLAB Answer for more information on how to do this:
In case of the example you have mentioned, "vol" that is fed into "imgradient3" is a 128×128×27 uint8 array, i.e. It has 27 images each of the size 128x128 pixels.
Hope this helps!

类别

Help CenterFile Exchange 中查找有关 3-D Volumetric Image Processing 的更多信息

产品


版本

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by