Imgradient3 what input it take
1 view (last 30 days)
Show older comments
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
0 Comments
Answers (1)
Brahmadev
on 1 Apr 2024
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!
See Also
Categories
Find more on 3-D Volumetric Image Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!