Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added docs/_static/.gitkeep
Empty file.
20 changes: 10 additions & 10 deletions docs/api_reference_flat.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@ quickflat
.. autosummary::
:toctree:generated/

add_curvature
add_data
add_rois
add_sulci
add_hatch
add_colorbar
add_custom
add_cutout
make_figure
make_png
make_svg
get_flatmask
get_flatcache
composite.add_curvature
composite.add_data
composite.add_rois
composite.add_sulci
composite.add_hatch
composite.add_colorbar
composite.add_custom
composite.add_cutout
utils.get_flatmask
utils.get_flatcache


webgl
Expand Down
9 changes: 5 additions & 4 deletions docs/database.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Reference volumes are typically in Nifti_ format (*.nii), but can be any format


Accessing transforms
^^^^^^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~~~~~~
Similar to the surfaces, transforms can be access through two methods: direct command access, and the tab interface.

Command access looks like this::
Expand Down Expand Up @@ -150,7 +150,7 @@ Tab complete looks like this::


Adding new transforms
^^^^^^^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~~~~~~~
Transforms from anatomical space to functional space are notoriously tricky. Automated algorithms generally give results optimized for various global energy metrics, but do not attempt to target the alignments for your ROIs. It is highly recommended that you use the included aligner to make your affine transforms. To add a transform, either directly create a transform json in ``{$FILESTORE}/transforms/``, or use this command::

import cortex
Expand All @@ -159,7 +159,8 @@ Transforms from anatomical space to functional space are notoriously tricky. Aut
.. _database-masks:

Masks
^^^^^
~~~~~

One of the fundamental reasons for carefully aligning surfaces is to allow the creation and use of cortical masks. This limits the number of voxels you need to model. Traditionally, these masks are created by selecting the set of nearest neighbor voxels for each vertex on the transformed surface. Unfortunately, pycortex's advanced per-pixel mapping precludes the use of this simple mask, since faces could potentially intersect with voxel corners which are not in this simple mask. Thus, the default masks in pycortex use a distance metric to compute mask membership.

Masks were added into pycortex in May 2013, due to previous issues with masked data and the addition of the per-pixel mapping. Masked datasets are further discussed in the datasets page.
Expand Down Expand Up @@ -203,7 +204,7 @@ Where, ``'subject'`` is the subject identifier and ``'name'`` is a unique name f
``overlays.svg``
----------------

Overlays are stored as SVG_'s. This is where surface ROIs are defined. Since these surface ROIs are invariant to transform, only one ROI map is needed for each subject. These SVGs are automatically created for a subject if you call ``cortex.add_roi``. ROI overlays are created and edited in Inkscape_. For more information, see :module:`svgroi.py`.
Overlays are stored as SVG_'s. This is where surface ROIs are defined. Since these surface ROIs are invariant to transform, only one ROI map is needed for each subject. These SVGs are automatically created for a subject if you call ``cortex.add_roi``. ROI overlays are created and edited in Inkscape_. For more information, see ``svgroi.py``.


``rois.svg``
Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ User Guide
align
.. dataset
rois
userguide/webgl
roidraw
transforms
colormaps
Expand Down
4 changes: 2 additions & 2 deletions docs/transforms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ Transform formats
=================
Functional data, usually collected by an epi sequence, typically does not have the same scan parameters as the anatomical MPRAGE scan used to generate the surfaces. Additionally, fMRI sequences which are usually optimized for T2* have drastically different and larger distortions than a typical T1 anatomical sequence. While automatic algorithms exist to align these two scan types, they will sometimes fail spectacularly, especially if a partial volume slice prescription is necessary.

pycortex includes a tool based on mayavi_ to do manual **affine** alignments. Please see the :module:`align` module for more information. Alternatively, if an automatic algorithm works well enough, you can also commit your own transform to the database. Transforms in pycortex always go from **fiducial to functional** space. They have four variables associated:
pycortex includes a tool based on mayavi_ to do manual **affine** alignments. Please see the :mod:`cortex.align` module for more information. Alternatively, if an automatic algorithm works well enough, you can also commit your own transform to the database. Transforms in pycortex always go from **fiducial to functional** space. They have four variables associated:

* **Subject** : name of the subject, must match the surfaces used to create the transform
* **Name** : A unique identifier for this transform
* **type** : The type of transform -- from fiducial to functional **magnet** space, or fiducial to **coord** innate space
* **epifile** : the filename of the functional data that the fiducial is aligned to

Transforms always store the epifile in order to allow visual validation of alignment using the :module:`align` module.
Transforms always store the epifile in order to allow visual validation of alignment using the :mod:`cortex.align` module.

.. _mayavi: http://docs.enthought.com/mayavi/mayavi/
4 changes: 2 additions & 2 deletions examples/datasets/plot_data_with_alpha.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
==========================
===========================
Plot Data with Alpha Values
==========================
===========================

It is often useful to plot a primary map (the "data" you are interested in)
masked or attenuated by a secondary map (a "confidence" or "weight"
Expand Down
4 changes: 2 additions & 2 deletions examples/fsaverage/upsample_to_fsaverage.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
===================
=========================================================================================
Upsample data from a lower resolution fsaverage template to fsaverage for visualization
===================
=========================================================================================

This example shows how data in a lower resolution fsaverage template
(e.g., fsaverage5 or fsaverage6) can be upsampled to the high resolution fsaverage
Expand Down
4 changes: 2 additions & 2 deletions examples/import_surface/import_fmriprep.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
==================
======================
Import fmriprep output
==================
======================

Recently, many people have start to use fmriprep as a complete preprocessing workflow of anatomical and functional data. Pycortex has a convenience function to import
the output of this workflow.
Expand Down
4 changes: 2 additions & 2 deletions examples/quickflat/plot_thickness_nanmean.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
===================================
=======================================================
Ignore NaN (not-a-number) values in thickness mapping
===================================
=======================================================

By default, pycortex quickshow averages across the thickness of the cortex
for each pixel in the resulting flatmap. If any of these layers contain a value
Expand Down
2 changes: 1 addition & 1 deletion examples/utils/plot_get_roi_vertices.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
=======================

In this example we show how to get the vertices that are inside an ROI that was
defined in the SVG ROI file (see :doc:`/rois.rst`).
defined in the SVG ROI file (see :doc:`/rois`).

"""
import cortex
Expand Down