Can we extract ROI of MRI images automatically?
2 次查看(过去 30 天)
显示 更早的评论
Hi every one, I have a set of dicom files and I am trying to extract ROI of approximate region of knee cartilage automatically? I don't need the whole image, because the size of voxels is big. I want to extract an approximate small area around the tibiofemoral joint (knee joints). Does anyone know how can I do ROI extraction automatically? Or is there any commands to crop a rectangular part of image as ROI automatically?Is there any function that can automatically do that ? Your help is appreciated.
0 个评论
回答(2 个)
Image Analyst
2015-12-13
You might try the grayconnected() function, but I think that that ROI might be connected to a bunch of other pixels that you don't want. You could perhaps try to repair it afterwards with activecontour(), but no guarantees. Alternatively freehand tracing is probably your best option. I'm attaching demos for that.
Walter Roberson
2015-12-13
If you knew the ROI location in the image then you could imcrop() passing in the bounding box. Or simply index into the image array.
If you do not know the exact location then the difficulty is going to depend upon how difficult it is to recognize the appropriate area. We would find it easier to advise you on that if you were to post a few different images -- at least two different patients, and if the MRI is taken at different Z coordinates then at least two different Z for one of the patients.
3 个评论
Walter Roberson
2015-12-13
I think it is going to be tricky to get that ROI.
Once you have an ROI, you can use roi2mask and then use the mask to set values (and use the logical negation to set the other value). For example,
imgclass = zeros(size(TheROI), 'uint8');
rmask = roi2mask(TheROI);
imgclass(rmask) = 1; %foreground
imgclass(~rmask) = 0; %background
However in the particular case of those two values, you could use
rmask = roi2mask(TheROI);
imgclass = uint8(rmask);
as the mask is going to be logical 1 where the ROI is and logical 0 elsewhere. The uint8() part can be omitted if you are not planning to store values other than 0 and 1 there.
另请参阅
类别
在 Help Center 和 File 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!