Loading file from my directory?

Dear I would like to download imagej-nii and also ROI (from imageJ software) and calculate the mean and std of the voxels within adjacent 5 slices (3D volume) for 6 animals. I have created code but many errors I have,,,, cause I am so beginner to use matlab.
I do not know what is the ROI format, because it is appear as text. When I search on the ImageJ website, there is no specific format for the ROI.
% for multi animal calculation.
Sabjects={'animal1', 'animal2', 'animal3','animal4', 'animal5,'animal6'};
for i =1: size(subjects,2);
image = load - nii(['\MRI\..\'subjects(i)'\roi.nii']);
for j = 0:1
region = voxel (mod = = i);
deviation (j,i+1)= std (region,[],3);
end
end
%%this is for one animal
image = load-nii ("name of the file");
roi = load-nii ("name of the file");
view-nii (roi); view-nii (image);
region1= voxels ((mod (roi ,2) == 1).* (roi > 0));
region2= voxels ((mod (roi ,2) == 0).* (roi > 0));
deviation = std (region ,[] ,3);

3 Commenti

Ben11
Ben11 il 4 Ago 2014
Can you post what kind of text you get as the ROI? Is there any way you could do everything in Matlab, i.e. select the ROI in Matlab in the first place with imrect or rbbox for example?
Dhafer
Dhafer il 4 Ago 2014
Modificato: Image Analyst il 4 Ago 2014
I do not know what is the roi and how to read the file by matlab?
What about the File Exchange submission suggested in your duplicate post?

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Read, Write, and Modify Image in Centro assistenza e File Exchange

Richiesto:

il 4 Ago 2014

Commentato:

il 4 Ago 2014

Community Treasure Hunt

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

Start Hunting!

Translated by