Classification of Brain tumor

4 次查看(过去 30 天)
Sehrish
Sehrish 2012-7-10
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 个评论
sam  CP
sam CP 2017-3-17
编辑:sam CP 2017-3-17
I would like to apply SVM Classifier for detection..I am looking for the syntax for that

请先登录,再进行评论。

回答(3 个)

Image Analyst
Image Analyst 2012-7-10
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
Ryan 2012-7-14
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
Walter Roberson 2012-7-22
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 个评论
Ritesh Barache
Ritesh Barache 2020-12-26
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
Image Analyst 2020-12-26
编辑:Image Analyst 2020-12-26
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);

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Medical Physics 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by