background noise and nearst point

조회 수: 2 (최근 30일)
zawaiter
zawaiter 2013년 1월 9일
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.

채택된 답변

Image Analyst
Image Analyst 2013년 1월 9일
% 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.
  댓글 수: 2
zawaiter
zawaiter 2013년 1월 10일
thanks image analyst for your help.i didn't yet try your code, a little busy but i think i know the idea now. from what i understand, can the thresholdvalue be computed with a formula so i can use the code for different images without need to look at the gray levels each time? also can bwdist() get the coordinate of the nearest point not just the distance.
Image Analyst
Image Analyst 2013년 1월 10일
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.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Amith Kamath
Amith Kamath 2013년 1월 9일
For either case, I would imagine you will need a mask for the brain regions. This can be done either manually using http://www.mathworks.com/help/images/ref/imfreehand.html (which would be painful indeed) or you could also use tools like http://www.mathworks.com/matlabcentral/fileexchange/19567-active-contour-segmentation for a 3D dataset like yours.
for 1. http://www.mathworks.com/help/images/ref/bwareaopen.html is the best way to eliminate small noisy regions.
  댓글 수: 1
zawaiter
zawaiter 2013년 1월 10일
thank AMITH for help i need some time to try your help.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 3-D Volumetric Image Processing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by