background noise and nearst point

1 view (last 30 days)
hi experts , i have two questions and hope you can help me.
1- i was able to form a 3d image of a brain from a 2d slices. but i want to set all the gray level values out side the brain to zero (i.e eliminate the noise at the background)
2- A(x,y,z) is a point within the 3 D volume , it could be within the brain or outside the brain. i wish to find the nearest point to A(x,y,z) on the surface of the brain.

Accepted Answer

Image Analyst
Image Analyst on 9 Jan 2013
% Make a mask:
mask3D = image3D > thresholdValue;
% Fill it so we don't change low gray level voxels inside the head.
mask3D = imfill(mask3D, 'holes');
% Mask volume outside the mask
image3D(~mask3D) = 0;
% Then call bwdist() to get the closest distance from each point to the outer surface.
Image Analyst
Image Analyst on 10 Jan 2013
Look at the second return argument from bwdist(). I've never used it though. Be aware that there can be several voxels that are the closest one to a particular reference voxel.

Sign in to comment.

More Answers (1)

Amith Kamath
Amith Kamath on 9 Jan 2013
For either case, I would imagine you will need a mask for the brain regions. This can be done either manually using (which would be painful indeed) or you could also use tools like for a 3D dataset like yours.
for 1. is the best way to eliminate small noisy regions.
  1 Comment
zawaiter on 10 Jan 2013
thank AMITH for help i need some time to try your help.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!