-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'topic/v1.1-prep' into release
* topic/v1.1-prep: Bumping the version Global cleanup and end-to-end processing of nifti input files
- Loading branch information
Showing
43 changed files
with
677,664 additions
and
914 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
*.vtk | ||
*.pvsm | ||
*.pyc | ||
|
||
!thesis_complete.pdf | ||
|
||
build/ | ||
data/ | ||
aux/ | ||
.vscode |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
File conversion utilities | ||
========================= | ||
|
||
.. contents:: | ||
:local: | ||
|
||
.. _nifti_edge_file_generating: | ||
|
||
Connectivity file from Nifti | ||
---------------------------- | ||
The set of connection between two different sites of the brain is contained in a **edge file** file, that makes it | ||
convenient to read in the visualization filter in Paraview. | ||
|
||
Generating the edge file is done through the command ``generate_brain_connectivity_edge_file`` and requires: | ||
|
||
* the ``nifti`` file that can be read with ``nibabel``, | ||
* the ``csv`` file encoding the connections between sites in the brain, | ||
* the output file. | ||
|
||
.. warning:: | ||
|
||
This functionality requires the installation of the ``nibabel`` python package. Please make sure you followed | ||
the :doc:`installation` procedures. | ||
|
||
|
||
End-points volume image | ||
----------------------- | ||
The 3D volume containing all the end-points of the connexels can be generated from the command line in the same | ||
manner as for the connectivity file. The generated file is in the VTK format. | ||
|
||
.. warning:: | ||
|
||
Requires ``nibabel`` (see above) and ``VTK`` (see installation instructions). | ||
|
||
Volume image | ||
------------ | ||
The 3D volumetric image may be generated from the command line with the command ``generate_brain_connectivity_volume_file``. | ||
This call is a wrapper | ||
around the function :py:func:`.generate_volume_file`. | ||
|
||
.. _clusters_generating: | ||
|
||
Clustering | ||
---------- | ||
A script for performing the clustering of all the edges is provided. This scripts generates a file that can | ||
be given to the visualization filter, which makes the exploration of the different edge clusters much faster. | ||
|
||
The command to generate the cluster file is ``generate_brain_connectivity_cluster_file``. The command | ||
requires: | ||
|
||
* the mesh file, | ||
* the edge file, | ||
* the number of desired clusters, | ||
* the output file | ||
|
||
The output file can be given to the visualization filter in Paraview to avoid expensive computations | ||
during the visualization. | ||
|
||
.. warning:: | ||
|
||
Requires ``nibabel`` (see above) and ``VTK`` (see installation instructions). | ||
|
||
.. tip:: | ||
|
||
``scipy`` may be used to speed-up the computation of the k-means if installed. | ||
|
||
References | ||
---------- | ||
|
||
.. automodule:: src.utils.generate_processing | ||
:members: | ||
|
||
.. automodule:: src.utils.generate_plugin_xml | ||
:members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,59 @@ | ||
Paraview plugin | ||
=============== | ||
Paraview visualization filter | ||
============================= | ||
|
||
.. contents:: | ||
:local: | ||
|
||
|
||
We describe in this page how to use the plugin inside Paraview: | ||
This page describes how to use the brain visualization filter inside Paraview: | ||
|
||
# the plugin acts on a mesh of point representing the surface of the brain | ||
# several visualization algorithm and parameters are shown in the user interface. | ||
#. the plugin acts on a mesh of point representing the surface of the brain | ||
#. several visualization algorithm and parameters are shown in the user interface | ||
#. the plugin needs external files in order to render the connectivity edges | ||
|
||
Input data | ||
---------- | ||
In order to function, the visualization needs: | ||
For the plugin to compute the visualization, the following elements are required: | ||
|
||
* the mesh on which computation will be performed. This is usually a mesh file that Paraview | ||
can understand, | ||
* the connectivity file, that contains the topology of connection network in the brain. This | ||
connectivity file is a mapping between pair of mesh locations and a weight. | ||
|
||
The way the connectivity file is created is detailed in another section. | ||
can understand/load without extra requirements, | ||
* the connectivity (or edges) file that contains the topology of connection network in the brain. | ||
This connectivity file is a mapping between pair of mesh or volume location and a weight. | ||
In its current form, it is a python ``numpy`` file that is generated with a command line tool form | ||
the brain connectivity package, and that is described in the section :ref:`nifti_edge_file_generating`. | ||
* *Optionally* it is also possible to provide a preprocessed clusters file, which would avoid the live | ||
computation of the clustering for the selected edges. See section :ref:`clusters_generating` for | ||
more details. | ||
|
||
Parameters | ||
---------- | ||
|
||
The parameters exposed to the user by the plugin are shown in the picture below: | ||
|
||
.. image:: /_static/plugin_panel.png | ||
.. image:: /_static/brain_clusters1000_selected100_plugin.png | ||
:height: 300 | ||
|
||
The meaning of the parameters are: | ||
|
||
* ``Edge res``: indicates the edges resolution, ie. the number of intermediate steps a trajectory | ||
connecting two sites is divided into. The higher, the smoother the trajectory but also the | ||
* ``resolution``: indicates the edges resolution, ie. the number of intermediate steps a path | ||
connecting two sites is divided into. The higher this number, the smoother the trajectory but also the | ||
heavier the on-screen drawing, | ||
* ``Edge selection``: a range of edges on which the processing will be performed. Any edge falling | ||
outside of this range is ignored in the visualization and the computation, | ||
* ``Edge path``: the **absolute** path of the file containing the definition of the topology, | ||
* ``show edges``: if checked, | ||
|
||
* ``edge selection``: a range of edge indices on which the processing will be performed. Any edge falling | ||
outside of this range is ignored in the visualization and the computation. This entry is ignored when | ||
a cluster file is provided. | ||
* ``edge file``: the **absolute** path of the file containing the definition of the topology, | ||
* ``show edges``: if checked, the edges will be shown | ||
* ``clusters file``: the **absolute** path to the file containing the results of the clustering. | ||
This file contains a preprocessed version | ||
of the clustering. If not present, a clustering of the selected edges will be computed during the visualization, | ||
which may take some time. For offline computation of the clustering, see the corresponding section. | ||
* ``nb_clusters``: indicates the number of desired clusters. This applies on the range of edges that has | ||
been selected or the full range if no selection has been made, and is ignored if the ``clustering file`` is | ||
given. | ||
* ``cluster index``: if given, a specific cluster to show on screen. All other clusters are discarded. The | ||
edges that are in the specified cluster are also shown. | ||
* ``hierarchy index``: the level of the hierarchy to which the cluster index applies. | ||
|
||
.. note:: | ||
|
||
The hierarchical part is not functional. |
Oops, something went wrong.