필터 지우기
필터 지우기

Segmentation using dicom slices from a folder

조회 수: 6 (최근 30일)
Dark
Dark 2014년 5월 3일
편집: gargoyle 2014년 5월 13일
I have around 500 CT dicom slices of a bone in a folder. I need to load all these dicom slices from the folder into Matlab, apply some filter and do segmentation and then visualize the result. Is there any tool or code in matlab that can do this ? Awaiting your suggestion.

답변 (2개)

Image Analyst
Image Analyst 2014년 5월 3일
Put your code to analyze and display the image(s) at the middle of the for loop.
  댓글 수: 2
Image Analyst
Image Analyst 2014년 5월 12일
Dark's "Answer" moved here:
Dear Image Analyst,
Thank you for the answer. I also saw that you have helped a lot of newbies like me and hence I thought of asking your help. I find it quite interesting that there is no such example in File exchange which does segmentation with a series of dicom files. Am I missing something ?
Thanks..
Image Analyst
Image Analyst 2014년 5월 12일
Dark, I don't use dicom images. If it's a multi frame file, isn't there some way to find out how many slice/frames are in that file? If so just do something like the faq but instead of building a filename and calling imread(), just call dicomread().

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


gargoyle
gargoyle 2014년 5월 13일
편집: gargoyle 2014년 5월 13일
I use the following code to access images 2 folders deep. i.e. Y:\Data\image_folder\img.tiff i pasted the excess code so that you can also iterate across multiple folders. If you don't need to use multiple folders remove the outer for loop and define root as the folder with images
root_root='Y:\Data\'; %path to multiple folders containing images. This same %code can be run across folders
fold_list=dir(root_root); %this will list all folders and store names in fold_list
for fold_count=3:size(fold_list,1)%3 is on windows system linux/mac might need %1,2,or 4
root=[root_root fold_list(fold_count).name '\']; %adds folder name to path
file_list=dir([root '*.tiff']); %HERE THE .tiff CAN BE REPLACED WITH ANY %FILE EXTENSION
for img_count=1:num_series
file_path=[root, file_list(img_count).name]; %access particular filename in series
in_img =imread(file_path);
%RUN CODE
end
end

카테고리

Help CenterFile Exchange에서 DICOM Format에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by