Classification of Brain tumor
Show older comments
I am working on a project of Brain tumor detection. I have extracted the tumor using k means clustering, can anyone tell me how can i classify the tumor as benign or malignant, or calculate the stage of tumor depending upon the features like area, solidity etc. during searching i have found about Knnclassify, can any one tell me how can i use it
7 Comments
Sarah Mohamed
on 21 Feb 2016
Hey there, I was wondering if you get any information about this project as I was searching about the same topic. Thanks in advance.
Manu BN
on 13 Mar 2016
Here is a sample code which might help https://in.mathworks.com/matlabcentral/fileexchange/55107-brain-mri-tumor-detection-and-classification
Helen Kirby
on 12 Dec 2016
How about looking at it's shape and then any change of shape over time. Is there a database which describes malignant tumors vs nonmalignant? Of course, if you are looking at a brand new phenomena then you would not find it in a database. Are there characteristics of a malignant, like e.g. does it throw out "roots" to anchor itself whereas a non malignant just grows equally in all directions and has no characteristic shape? Just a few ideas.
sam CP
on 17 Mar 2017
I have segmented the MRI by using K-means clustering method and the features are extracted from the segmented image.. How can i detect the tumor from the MRI by using classifier ? Let me know the syntax for detection
Walter Roberson
on 17 Mar 2017
Which exact classifier? There are a number of possibilities with different syntaxes. There is not just one classifier.
Walter Roberson
on 17 Mar 2017
Mdl = fitcsvm(X,Y)
Answers (3)
Image Analyst
on 10 Jul 2012
3 votes
Although I've worked in radiology, I'm not a radiologist. I suggest you ask one to see if there are any visual clues that can distinguish a benign tumor from a malignant one. Or ask a pathologist if you're looking at biopsies instead of radiological images.
When I worked in radiology they didn't even like software to claim to make diagnoses (usurping their job). Software engineers were also reluctant to do so because of liability concerns. Would you want your software to claim it was benign, only to be sued when it turned out the patient died because it was actually malignant?
Ryan
on 14 Jul 2012
1 vote
In addition to IA's answer, this seems to be a question requesting a novel idea of how to differentiate tumor types accurately using current MRI technology. Honestly, if I knew how to do that I would not tell you how to do it and would instead write the program myself and copyright it.
Walter Roberson
on 22 Jul 2012
0 votes
The people I worked with found that it was much more effective to make classifications based upon MRS (Magnetic Resonance Spectroscopy) rather than MRI (Magnetic Resonance Imaging). We pretty much dropped automated MRI classification somewhere around a dozen years ago. The clues we were able to dig out of the relative chemical composition (MRS) often found signature chemical differences that could not be visually distinguished.
7 Comments
Star Strider
on 23 Jul 2012
That is genuinely fascinating! We were interested in using MRS to investigate intermediary metabolism a while ago, but the available instrumentation wasn't fast enough to track the dynamic changes, even of the various phosphate compounds.
Walter Roberson
on 23 Jul 2012
Fortunately the cases we were dealing with did not require dynamic readings. Mostly we worked with cancer, but also some bowel disease.
The more dynamic work, we used to do with infrared.
Sehrish
on 23 Jul 2012
Image Analyst
on 23 Jul 2012
Have you asked the radiologist yet?
Walter Roberson
on 23 Jul 2012
Ritesh Barache
on 26 Dec 2020
sir i am classifying brain tumor using cnn. i am not able to understand how i can resize my images in datastore and pass to cnn classifier????? sir plz help me
Image Analyst
on 26 Dec 2020
Edited: Image Analyst
on 26 Dec 2020
You could use a script like this:
% Resizes images to a size of 227x227, which AlexNet needs, and saves the resized images in a "Resized to 227x227" subfolder of the images folder.
clc; % Clear the command window.
fprintf('Beginning to run %s.m.\n', mfilename);
close all; % Close all figures (except those of imtool.)
clear; % Erase all existing variables. Or clearvars if you want.
workspace; % Make sure the workspace panel is showing.
format long g;
format compact;
fontSize = 15;
% Specify the folder where the files live.
inputImagesFolder = 'D:\Ritesh\Original'; % Change it to whatever you need, if you want/need to.
% Check to make sure that folder actually exists. Warn user if it doesn't.
if ~isfolder(inputImagesFolder)
errorMessage = sprintf('Error: The following folder does not exist:\n\n%s\n\nPlease specify to an existing folder.', inputImagesFolder);
uiwait(warndlg(errorMessage));
% Try to find the highest level folder in that path that DOES exist.
while ~isfolder(inputImagesFolder) && length(inputImagesFolder) > 3
[inputImagesFolder, ~, ~] = fileparts(inputImagesFolder);
end
% Should have a good starting folder now.
inputImagesFolder = uigetdir(inputImagesFolder);
if inputImagesFolder == 0
return;
end
end
% Create output folder
outputImagesFolder = fullfile(inputImagesFolder, '/Resized to 227x227');
if ~isfolder(outputImagesFolder)
mkdir(outputImagesFolder);
end
% Get a list of all files in the folder with the desired file name pattern.
filePattern = fullfile(inputImagesFolder, '*.jpg'); % Change to whatever pattern you need.
theFiles = dir(filePattern)
numFiles = length(theFiles);
hFig = figure;
hFig.WindowState = 'maximized';
for k = 1 : numFiles
% Get the input file name.
baseFileName = theFiles(k).name;
fullFileName = fullfile(inputImagesFolder, baseFileName);
% Get the output file name.
outputFullFileName = fullfile(outputImagesFolder, baseFileName);
fprintf(1, 'Now reading %d of %d "%s"\n', k, numFiles, fullFileName);
% Read in input image with imread().
inputImage = imread(fullFileName);
% Resize it.
outputImage = imresize(inputImage, [227, 227]);
% Display input and output images.
subplot(1, 2, 1);
imshow(inputImage); % Display image.
caption = sprintf('Input image (%d of %d):\n"%s", %d by %d', k, numFiles, baseFileName, size(inputImage, 1), size(inputImage, 2));
title(caption, 'FontSize', fontSize, 'Interpreter', 'none');
subplot(1, 2, 2);
imshow(outputImage); % Display image.
caption = sprintf('Output image: "%s", %d by %d', baseFileName, size(outputImage, 1), size(outputImage, 2));
title(caption, 'FontSize', fontSize, 'Interpreter', 'none');
drawnow; % Force display to update immediately.
% Write out the resized output file to the output folder.
imwrite(outputImage, outputFullFileName);
end
fprintf('Done running %s.m.\n', mfilename);
% Open the output folder in File Explorer.
winopen(outputImagesFolder);
Categories
Find more on Neuroimaging in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!