How to divide the brain segmented slices in left and right compartments (halves)?
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi. I have a series of brain CT images, the goal is to segment brain followed by separating brain into left and right halves to compute brain area and blood area in each half.
I am attaching a zip file of 7 sample segmented brain images selected from a sequence (not continuous slices just slices that may cover all types of slices).
For this question, I am trying to divide the brain into left and right compartments.
I have been using to find left and right start indexes of the image to split into half. But this didn't give accurate results to divide into left and right halves.
My approach so far:
img_dir = pwd;
fileList = dir(img_dir);
fileList = fileList(~ismember({fileList.name},{'.','..'}));
num_of_slices = length(fileList);
for idx = 1: num_of_slices
fileName = fileList(idx).name;
img_slice_path = fullfile(img_dir,fileName);
imgs{idx} = imread(img_slice_path);
figure(1), imshow(imgs{idx},[]);
pause(0.5);
end
seperate left and right based on midpoint of left_idx and right_idx
[nrow, ncol] = size(imgs{1});
[leftBrain_imgs,rightBrain_imgs] = deal(cell(1,length(imgs)));
for val = 1: length(imgs)
tempImg = imgs{val};
columnsWithAllZeros = all(tempImg == 0);
left_idx = find(~columnsWithAllZeros,1,'first');
right_idx = find(~columnsWithAllZeros,1,'last');
cent_idx = floor(mean([left_idx,right_idx]));
rightImg_idxs = 1:cent_idx; % right side is shown left
leftImg_idxs = cent_idx+1:ncol; % left side is shown right
[leftBrain_img,rightBrain_img] = deal(zeros(nrow, ncol));
rightBrain_img(:,rightImg_idxs) = tempImg(:,rightImg_idxs);
leftBrain_img(:,leftImg_idxs) = tempImg(:,leftImg_idxs);
leftBrain_imgs{val} = leftBrain_img;
rightBrain_imgs{val} = rightBrain_img;
figure(2),
subplot(121), imshow(rightBrain_imgs{val},[]), title('right brain');
subplot(122), imshow(leftBrain_imgs{val},[]), title('left brain');
pause(0.5)
end
Note: The brain may be slightly tilted slightly to the left or right.
Any ideas on how to do this?
Thanks, Gopi
2 Commenti
Alina tom
il 30 Mag 2018
I have downloaded you sample images its just black image .. can you check your fine again
Risposte (1)
Anton Semechko
il 31 Mag 2018
The simplest way to approach your problem is to
(1) Aggregate all (segmented) slices from a given 3D image to form a volume that represents your object of interest (i.e., brain).
(2) Compute either inertia-tensor-based or minimum volume bounding box (BB) of the object. Directions of the BB edges form an object-based anatomical reference frame.
(3) Partition object using the plane that passes trough the BB centroid and has normal corresponding to the anatomical direction of interest.
My guess is that this approach will only give a rough estimate of what you are looking for. However, this estimate can be used to initialize search for a plane of (reflectional) symmetry, that should give a more accurate partition.
0 Commenti
Vedere anche
Categorie
Scopri di più su Biomedical Imaging in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!