Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Example Matlab code snippet to read in the 100 50 µm projection_density grid volume and average_template:

Code Block
% -------------------------------
%
% Download anda unzipNRRD thereader
density% grid file for VISp SectionDataSet
% For example:
% http://www.mathworks.com/matlabcentral/fileexchange/34653-nrrd-format-file-reader
%
% Requires: MATLAB 7.13 (R2011b)
%
% Download average_template_50.nrrd
% Download projection_density at 50 micron for SectionDataSet id = 287495026
%
% ---------------------------------

%
% gridRead image volume sizewith sizeGridNRRD =reader
[133, 81, 115];

% DENSITY % Note that reader swaps the order of the first two axes
%
% AVGT = 3-D matrix of projectionaverage_template
density% gridPDENS volume= fid3-D = fopen('11_wks_coronal_126862385/density.raw', 'r', 'l' );
DENSITY = fread( fid, prod(sizeGrid), 'float' );
fclose( fid );
DENSITY = reshape(DENSITY,sizeGridmstrix of projection_density
%
[AVGT, metaAVGT] = nrrdread('average_template_50.nrrd');
[PDENS, metaPDENS] = nrrdread('11_wks_coronal_287495026_50um_projection_density.nrrd');

% Display one coronal and one sagittal section
figure;imagesc(squeeze(DENSITYAVGT(73,:,184,:)));colormap(hotgray(256));caxis([0 1]) axis equal;
figure;imagesc(squeeze(DENSITYPDENS(:,184,:,78)));colormap(hotjet(256));caxis([0 1]) axis equal;

Anchor
ExpressionStructures
ExpressionStructures
Projection Structure Unionization

...