Last active
August 29, 2015 13:57
-
-
Save kmader/9503137 to your computer and use it in GitHub Desktop.
Exercise 4 Setup and K-Means Code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% change to your home directory | |
cd('~') | |
% download and extract the latest version of fiji | |
unzip('http://jenkins.imagej.net/job/Stable-Fiji/lastSuccessfulBuild/artifact/fiji-nojre.zip','./') | |
% add the Fiji scripts folder to the matlab path | |
addpath 'Fiji.app/scripts' | |
% start Miji | |
Miji | |
% for some reason Miji changes to directory so go back to the home directory | |
cd('~') | |
% to test if it works | |
% Miji_Test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MIJ.run('Embryos (42K)'); | |
imData = double(MIJ.getCurrentImage); | |
% raster scan image to 3 , 1D arrays | |
imList=reshape(imData,[],3); | |
% peform k-means | |
[groupList,centers]=kmeans(imList,3); | |
% reshape into an image | |
groupIm=reshape(groupList,size(imData,1),size(imData,2)); | |
% show the result | |
imagesc(groupIm); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
curl does not work on these matlab versions because of library issues