from
BrainMaps Analyze
by Shawn Mikula
BrainMaps Analyze is a powerful tool for applying image analysis routines to BrainMaps.org high reso
|
| bmanalyzeGetPaths( varargin )
|
function h = bmanalyzeGetPaths( varargin )
% BMANALYZEGETPATHS Retrieves URLs for brain images from BrainMaps.org.
% H = BMANALYZEGETPATHS(datid) retrieves URLs for BrainMaps.org for
% given dataset (specified by datid). Datid (which is a contraction of 'Data ID') is
% an integer representing the unique ID of datasets. You can find out the
% datid of a given dataset by hovering over the dataset's thumbnail at
% brainmaps.org. The value of datid ranges from 1 to however many
% datasets are available (as of 06/13/2006, there are 43
% datasets available).
%
% Notes
% -------
% URLs retrieved by BMANALYZEGETPATHS may be used for BMANALYZE input.
%
% An alternative way to obtain image url's for use with BMANALYZE is to find a brain dataset you
% want to use at http://brainmaps.org, click on the 'Metadata' link, and
% then click on 'Generate Paths' to generate a list of all url's for the
% selected brain dataset.
%
% Example
% -------
% Retrieve image URLs for dataset with datid=43
%
% bmanalyzeGetPaths(43)
%
% See also BMANALYZE, BMANALYZEPLOT, BMANALYZEINFO.
%
% Copyright 2006 BrainMaps.org.
try
datid = varargin{1};
catch
error('try "help bmanalyzeGetPaths"')
end
url2=strcat('http://brainmaps.org/genpaths.php?datid=',num2str(datid));
theStruct = [ urlread(url2) ];
s = textscan(theStruct, '%s', 'delimiter', '[');
[x y]=size(s{1});
for i=1:x
out(i,:)=s{1}{i};
end
out
url=out(floor(x/2),:);
a_pre=imread(strcat(url,'TileGroup0/0-0-0.jpg'));
figure,imagesc(a_pre),axis equal, title(['Sample Thumbnail Image for this Dataset (datid=',int2str(datid),')'])
|
|
Contact us at files@mathworks.com