File Exchange

image thumbnail

BrainMaps Analyze

version 1.0.0.0 (991 KB) by Shawn Mikula
BrainMaps Analyze is a powerful tool for applying image analysis routines to BrainMaps.org high reso

3 Downloads

Updated 14 Jun 2006

No License

BrainMaps Analyze is a powerful tool for applying image analysis routines to massive, high resolution brain image data at BrainMaps.org (or elsewhere)

The thumbnail image is a screenshot of BrainMaps Analyze (Matlab version) performing granulometry analysis on this image. The top left image is a thumbnail of the mouse brain section. The top right image shows the average (over tiles) granulometry spectrum, showing prominent peaks for different sized cells. The bottom left image contains a plot of cell size (x axis) vs tile number (y axis). The bottom right image is a plot of cell sizes, starting from radius equal to 1 pixel in the upper left, and incrementing by one in left to right, until it reaches radius of 36 pixels in the bottom right image. Note that the original image is over 22,000 pixels wide, and that the computation of granulometry was done on a per-image-tile basis, where each image tile is 256x256 pixels.

The BrainMaps Analyze code can be readily extended to include any types of image analysis.

Documentation:

function h = bmanalyze( varargin )
% BMANALYZE Run analysis routines on BrainMaps.org high resolution tiled brain image data.
% H = BMANALYZE(url) applies granulometry analysis on a per image
% tile basis to brain image at url at the highest level of resolution.
%
% H = BMANALYZE(url,function) applies 'function' on a per image
% tile basis to brain image at url at the highest level of resolution.
% Current functions are 'granulometry', 'mean', and 'var'. It is
% straightforward to add your own functions by editing the code below.
%
% H = BMANALYZE(url,function,level) applies 'function' on a per image
% tile basis to brain image at url at the given level of resolution.
%
% Notes
% -------
% BMANALYZE may take several hours or even days to run. If you want to see the type
% of results BMANALYZE produces, try BMANALYZEPLOT.
%
% To obtain image url's to use with BMANALYZE, use BMANALYZEGETPATHS, or
% alternatively, 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
% -------
% Run Granulometry analysis on coronal mouse brain Nissl section.
%
% bmanalyze(' http://brainmaps.org/HBP2/mus.musculus/cor/002-nissl/m08a/', 'granulometry');
% bmanalyzePlot;

function h = bmanalyzePlot( )
% BMANALYZEPLOT Plot BMANALYZE results.
% H = BMANALYZEPLOT() plots BMANALYZE results
%
% Example
% -------
% Plot results from granulometry analysis on coronal mouse brain Nissl section.
%
% bmanalyze('http://brainmaps.org/HBP2/mus.musculus/cor/002-nissl/m08a/', 'granulometry');
% bmanalyzePlot;

function h = bmanalyzeInfo( varargin )
% BMANALYZEINFO(url) Returns image info of corresponding image 'url' from BrainMaps.org, including image
% height, width, number of tiles, and approximate computation time (assuming 1 sec per tile computation)
%
% Notes
% -------
% To obtain image url's to use with BMANALYZE, use BMANALYZEGETPATHS, or
% alternatively, 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
% -------
% Grab image info for brain image located at
% http://brainmaps.org/HBP2/mus.musculus/cor/002-nissl/m08a/
%
% bmanalyzeInfo(' http://brainmaps.org/HBP2/mus.musculus/cor/002-nissl/m08a/');

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)

Cite As

Shawn Mikula (2020). BrainMaps Analyze (https://www.mathworks.com/matlabcentral/fileexchange/11360-brainmaps-analyze), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (1)

Bo Wang

Updates

1.0.0.0

a bug fixed, additional functions and documentation added

minor update to downloadable code and miscellaneous corrections in description

MATLAB Release Compatibility
Created with R14SP3
Compatible with any release
Platform Compatibility
Windows macOS Linux