Can we extract ROI of MRI images automatically?

2 views (last 30 days)
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.

Answers (2)

Image Analyst
Image Analyst on 13 Dec 2015
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.
  1 Comment
Sara Salimi
Sara Salimi on 14 Dec 2015
Dear Image Analyst,
Many Thanks for your help.
I really appreciate your help.
Regards Sara

Sign in to comment.


Walter Roberson
Walter Roberson on 13 Dec 2015
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 Comments
Walter Roberson
Walter Roberson on 13 Dec 2015
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.
Sara Salimi
Sara Salimi on 14 Dec 2015
Dear Walter,
Many thanks for your help.
I really appreciate your help.
Regards
Sara

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!