Skip to content

Instantly share code, notes, and snippets.

@ncweiler
Last active December 31, 2015 07:19
Show Gist options
  • Save ncweiler/7953436 to your computer and use it in GitHub Desktop.
Save ncweiler/7953436 to your computer and use it in GitHub Desktop.
%% Ex10R55 dataset single channel
% option to display contrast-enhanced cutout
enhance = 1;
% output filename
tmpfile = 'Ex10R55_GFP-4.png';
% url arguments
server_base = 'braingraph2.cs.jhu.edu';
%server_base = 'openconnecto.me';
webservice_name = 'ocp/ocpca';
project_token = 'Ex10R55';
chan_name = 'GFP-4';
% restful arguments
res = '1';
xbounds = '250,750';
ybounds = '250,750';
zoffset = '20';
restful_str = strjoin({res,xbounds,ybounds,zoffset},'/');
url_str = sprintf('http://%s/%s/%s/xy/%s/%s/',...
server_base, webservice_name, project_token, chan_name,restful_str)
% download cutout
urlwrite(url_str,tmpfile);
A = imread(tmpfile,'png');
% display cutout
figure
if enhance
imshow(imnorm(A));
else
imshow(A);
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment