Changes between Version 1 and Version 2 of Examples/Brain


Ignore:
Timestamp:
04/11/17 11:45:34 (7 years ago)
Author:
Herwig Zilken
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Examples/Brain

    v1 v2  
    55At FZJ, the institute for [http://www.fz-juelich.de/inm/inm-1/EN/Home/home_node.html structural and functional organisation of the brain (INM-1)] develops a 3-D model of the human brain which considers cortical architecture, connectivity, genetics and function. The INM-1 research group [http://www.fz-juelich.de/inm/inm-1/EN/Forschung/Fibre%20Architecture/Fibre%20Architecture_node.html Fiber Architecture] develops techniques to reconstruct the three-dimensional nerve fiber architecture in mouse, rat, monkey, and human brains at microscopic resolution. As a key technology, the neuroimaging technique Three-dimensional Polarized Light Imaging (3D-PLI) is used. To determine the spatial orientations of the nerve fibers, a fixated and frozen postmortem brain is cut with a cryotome into histological sections (≤ 70 µm). Every slice is then scanned by high resolution microscopes.
    66
    7 == Data
    8 The datset used in this visualisation scenario consists of 234 slices of gridsize 31076x28721, resulting in a rectilinear uniform grid of size 31076x28721x234, ~200 GB memory usage in total. The data was stored as raw binary unsigned char data, one file for each slice.
     7The datset used in this visualisation scenario consists of 234 slices of gridsize 31076x28721 each, resulting in a rectilinear uniform grid of size 31076x28721x234 (~200 GB memory usage in total). The data was stored as raw binary unsigned char data, one file for each slice.
    98
    109== Conversion to HDF5
    11 Because !ParaView has a very decent XDMF/HDF5 reader, we decided to convert the raw data to hdf5 first.
     10Because !ParaView has a very usable XDMF/HDF5 reader, we decided to convert the raw data to hdf5 first.
    1211This was done using a Python script. Before Python can be used on our JURECA cluster, the necessary modules have to be loaded first:
    1312{{{
     
    1817}}}
    1918
    20 In the Python-script, the directory containing the 234 slice files is scanned for the filenames. Every file is opened and the raw content is read into a numpy array. This numpy array is written into a hdf5 file, which was created first.
     19In the Python-script, the directory containing the 234 slice files is scanned for the names of the raw-files. Every file is opened and the raw content is read into a numpy array. This numpy array is written into a hdf5 file, which was created first.
    2120
    2221{{{
     
    6463
    6564== Creating XDMF Files
     65!ParaView needs proper XDMF files to be able to read the data from a hdf5 file. We generated two xdfm files by hand. One for the fullsize dataset, and one for loading a spatial subsampled version via a hyperslab.
    6666
     67The xdmf file for the fullsize dataset is quite simple an defines just the uniform rectilinear grid with one attribute. It is a very good practize to normalize the spatial extend of the grid by setting the grid spacing accordingly. We decided that the grid should have the extend "1.0" in the direction on its largest axis.
     68So the grid spacing is 1.0/31076=3.21792e-5 for the Y- and Z-axis. The X-axis is the direction of the slice cutting, therefore it's grid spacing is larger by a factor of 40, resulting in 40*3.21792e-5=1.2872e-3.
     69
     70
     71{{{
     72#!xml
     73<?xml version ="1.0" ?>
     74<!DOCTYPE xdmf SYSTEM "Xdmf.dtd" []>
     75<Xdmf Version="2.0">
     76<Domain>
     77<Grid Name="Brain" GridType="Uniform">
     78<Topology TopologyType="3DCoRectMesh" NumberOfElements="234 28721 31076"/>
     79<Geometry GeometryType="ORIGIN_DXDYDZ">
     80        <DataItem Dimensions="3" NumberType="Float" Precision="4" Format="XML">
     81                 -0.151 -.4621 -0.5
     82        </DataItem>
     83        <DataItem Dimensions="3" NumberType="Float" Precision="4" Format="XML">
     84                1.2872e-3  3.21792e-5 3.21792e-5
     85        </DataItem>
     86</Geometry>
     87<Attribute Name="PLI" AttributeType="Scalar" Center="Node">
     88        <DataItem Dimensions="234 28721 31076" NumberType="UChar" Precision="1" Format="HDF">
     89                Vervet_Sehrinde.h5:/PLI
     90        </DataItem>
     91</Attribute>
     92</Grid>
     93</Domain>
     94</Xdmf>
     95}}}
     96
     97To
     98