Gray Matter Area and Volume Calculations
Show older comments
Hello, I am working on gray matter area and volume calculation of brain MRI image. I have some doubts with my code below:
% Area Calculation
Pixel_Numbers = sum(J(:));
DistanceinUnit = 1.796875; %Based on pixel spacing (in mm?)
DistanceinPixel = sqrt(x^2+y^2);
DistancePerPixel = DistanceinUnit/DistanceinPixel;
Area = (Pixel_Numbers)*(DistancePerPixel^2); %Is it in mm^2 or mm^2/pixel?
% Volume Calculation (Is the formula correct?)
LengthinPixel = length(find(J(:)==1));
Length = LengthinPixel*DistanceinUnit;
Volume = Area*Length;
The information about pixel spacing is 1.796875\1.796875. I'd be glad if you can help me to figure out the answer. Here is the picture. Thank you.
2 Comments
Image Analyst
on 22 Apr 2020
What are the doubts? Does (the badly-named) J include that white frame around the image?
Qvna Lhyvnav
on 24 Apr 2020
Accepted Answer
More Answers (0)
Categories
Find more on Convert Image Type 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!