Skip to content
Merged
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
13 changes: 13 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [ main ]
paths:
- 'docsite/**'
- 'src/**'

permissions:
contents: read
Expand All @@ -26,6 +27,18 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set up JDK 11
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'

- name: Build QIT
run: ant build

- name: Generate module library
run: dist/bin/qit --markdown-all > docsite/docs/library.md

- name: Set up Python
uses: actions/setup-python@v5
with:
Expand Down
6 changes: 3 additions & 3 deletions docsite/docs/datasets.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ Supported file formats:

Supported file formats:

- Input: [http://www.vtk.org/VTK/img/file-formats.pdf VTK], [http://mrtrix.readthedocs.io/en/latest/getting_started/image_data.html MRtrix], [http://trackvis.org TrackVis], [http://www.bic.mni.mcgill.ca/users/mishkin/mni_obj_format.pdf MNI OBJ], [http://graphics.stanford.edu/projects/dti/software/pdb_format.html PDB], [http://jdtournier.github.io/mrtrix-0.2/appendix/mrtrix.html MRtrix], Brown VRL, Text
- Input: [VTK](http://www.vtk.org/VTK/img/file-formats.pdf), [MRtrix](http://mrtrix.readthedocs.io/en/latest/getting_started/image_data.html), [TrackVis](http://trackvis.org), [MNI OBJ](http://www.bic.mni.mcgill.ca/users/mishkin/mni_obj_format.pdf), [PDB](http://graphics.stanford.edu/projects/dti/software/pdb_format.html), [MRtrix](http://jdtournier.github.io/mrtrix-0.2/appendix/mrtrix.html), Brown VRL, Text

- Output: [http://www.vtk.org/VTK/img/file-formats.pdf VTK], [http://mrtrix.readthedocs.io/en/latest/getting_started/image_data.html MRtrix], [http://trackvis.org TrackVis], [http://www.bic.mni.mcgill.ca/users/mishkin/mni_obj_format.pdf MNI OBJ], [http://graphics.stanford.edu/projects/dti/software/pdb_format.html PDB], [http://jdtournier.github.io/mrtrix-0.2/appendix/mrtrix.html MRtrix], Brown VRL, Text, CSV
- Output: [VTK](http://www.vtk.org/VTK/img/file-formats.pdf), [MRtrix](http://mrtrix.readthedocs.io/en/latest/getting_started/image_data.html), [TrackVis](http://trackvis.org), [MNI OBJ](http://www.bic.mni.mcgill.ca/users/mishkin/mni_obj_format.pdf), [PDB](http://graphics.stanford.edu/projects/dti/software/pdb_format.html), [MRtrix](http://jdtournier.github.io/mrtrix-0.2/appendix/mrtrix.html), Brown VRL, Text, CSV

## Solids

Expand Down Expand Up @@ -95,7 +95,7 @@ Supported file formats:

Supported file formats:

- Input: Text, CSV, [http://www.grahamwideman.com/gw/brain/fs/surfacefileformats.htm Freesurfer Annot]
- Input: Text, CSV, [Freesurfer Annot](http://www.grahamwideman.com/gw/brain/fs/surfacefileformats.htm)
- Output: Text, CSV, JSON

## Matrix
Expand Down
2 changes: 1 addition & 1 deletion docsite/docs/dmri-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Before starting the tutorial, you'll need a few things. First, we will make sur

## Installation

First, make sure you've installed QIT and its dependencies by following the [[Installation]] instructions. You won't need the advanced dependencies for this tutorial, so you can skip that.
First, make sure you've installed QIT and its dependencies by following the [Installation](install.md) instructions. You won't need the advanced dependencies for this tutorial, so you can skip that.

## Downloading the sample dataset

Expand Down
8 changes: 4 additions & 4 deletions docsite/docs/freesurfer.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Exploring Freesurfer data with QIT

This page provides a tutorial for visualizing
[https://surfer.nmr.mgh.harvard.edu/ FreeSurfer] results with QIT. You'll
[FreeSurfer](https://surfer.nmr.mgh.harvard.edu/) results with QIT. You'll
learn how to visualize volumetric segmentations of T1 MR images and visualize
surface models of cortical and subcortical structures.

## Setup

Before starting the tutorial, you'll need a few things. First, make sure
you've installed QIT and its dependencies by following the
[Installation](installation.md) instructions. You won't need the advanced
[Installation](install.md) instructions. You won't need the advanced
dependencies for this tutorial, so you can skip that.

## Downloading the sample dataset
Expand Down Expand Up @@ -37,7 +37,7 @@ FreeSurfer uses its own file formats, and to visualize the results in QIT, you h
qit FreesurferImport --input freesurfer --brain --segmentations --surfaces --output fsimport
```

This program assumes you've installed FreeSurfer on your machine and put the binaries on the path, like described in the advanced section of the [[Installation]] page.
This program assumes you've installed FreeSurfer on your machine and put the binaries on the path, like described in the advanced section of the [Installation](install.md) page.

## Tutorial

Expand Down Expand Up @@ -100,7 +100,7 @@ Next, we will visualize the surface models of the subcortical structures. First

## View the cortical surface

Next, we will visualize the cortical surface. First, you should hide the other objects by unchecking their visibility boxes. Then, you should check the boxes next to `lh.pial.vtk` and `rh.pial.vtk.`. This should show the two hemispheres:
Next, we will visualize the cortical surface. First, you should hide the other objects by unchecking their visibility boxes. Then, you should check the boxes next to `lh.pial.vtk` and `rh.pial.vtk`. This should show the two hemispheres:

![](images/Fs.tutorial.screen08.png)

Expand Down
2 changes: 1 addition & 1 deletion docsite/docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ subdirectory.

You can open the viewer by double-clicking `qitview`, and you can access the command line interface by running `qit` from the command prompt.

If you have restrictions on what apps can be run, e.g. the default on macOS Catalina, you may get a message about app signing. You can fix this issue by opening the System Preferences > Security & Privacy and clicking the button to allow it. You can read more about this [https://support.apple.com/en-us/HT202491 here]. You can also try running the script `bin/qitfixmac`, which fixes quarantine attributes that can cause problems in macOS Big Sur.
If you have restrictions on what apps can be run, e.g. the default on macOS Catalina, you may get a message about app signing. You can fix this issue by opening the System Preferences > Security & Privacy and clicking the button to allow it. You can read more about this [here](https://support.apple.com/en-us/HT202491). You can also try running the script `bin/qitfixmac`, which fixes quarantine attributes that can cause problems in macOS Big Sur.

Note: if for some reason you do not have Python installed, you could also start qitview by running the script `qitview.sh`

Expand Down
2 changes: 1 addition & 1 deletion docsite/docs/license.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Use of the Quantitative Imaging Toolkit (QIT) is limited by the following
license terms:

```lang-none
Quantitative Imaging Toolkit (QIT) (c) 2012-2021 Ryan Cabeen
Quantitative Imaging Toolkit (QIT) (c) 2012-2026 Ryan Cabeen
All rights reserved.

The Software remains the property of Ryan Cabeen ("the Author").
Expand Down
8 changes: 3 additions & 5 deletions docsite/docs/masters-workshop.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Masters Program Workshop for QIT

This page provides a guide for a QIT workshop held as part of the [USC
Master's of Science in Neuroimaging program](http://niin.usc.edu USC
Master's of Science in Neuroimaging program). The goal of the workshop is
This page provides a guide for a QIT workshop held as part of the [USC Master's of Science in Neuroimaging program](http://niin.usc.edu). The goal of the workshop is
to provide an opportunity to work directly with neuroimaging data and to
gain hands-on experience with various diffusion MRI techniques. The
workshop doesn't require any prior programming experience, and it is
Expand Down Expand Up @@ -40,7 +38,7 @@ groups of data:
- `meshes`: various surface models (a set of Mesh datasets)
- `masks`: brain and white matter masks (Mask datasets)

`Volume` and `Mask` datasets are typically stored in the nifti format with the `nii.gz` extension. `Mask` files typically have a `csv` stored alongside them that indicates the name of each label. Diffusion models are stored as multiple volumes inside a directory, and while you can load the individual files, to do tractography or render glyphs you need to load the directory itself, e.g. `models.xfib`. `Mesh` and `Curves` data are ''both'' stored as VTK files with the `vtk.gz` extension. `qitview` should detect which is which based on the filename, but you should make sure the file loader correctly identifies the dataset type (the type can be changed using the combo box to the left of the filename). You can read more about the various dataset types [[Datasets|here]].
`Volume` and `Mask` datasets are typically stored in the nifti format with the `nii.gz` extension. `Mask` files typically have a `csv` stored alongside them that indicates the name of each label. Diffusion models are stored as multiple volumes inside a directory, and while you can load the individual files, to do tractography or render glyphs you need to load the directory itself, e.g. `models.xfib`. `Mesh` and `Curves` data are ''both'' stored as VTK files with the `vtk.gz` extension. `qitview` should detect which is which based on the filename, but you should make sure the file loader correctly identifies the dataset type (the type can be changed using the combo box to the left of the filename). You can read more about the various dataset types [here](datasets.md).

## Agenda

Expand Down Expand Up @@ -174,5 +172,5 @@ Your browser does not support the video tag.

## Fin

That's it, congratulations on finishing the workshop! Hopefully, you're now more familiar with a few common diffusion MRI tasks, and you have an idea of how to use `qitview` for other tasks you may encounter in the future. Many of the tasks you completed in `qitview` can be scripted or run on the command line using the `qit` program. To learn more, please feel free to explore the rest of the documentation on this site, experiment the features in `qitview`, or [mailto:rcabeen@loni.usc.edu email me] with any questions!
That's it, congratulations on finishing the workshop! Hopefully, you're now more familiar with a few common diffusion MRI tasks, and you have an idea of how to use `qitview` for other tasks you may encounter in the future. Many of the tasks you completed in `qitview` can be scripted or run on the command line using the `qit` program. To learn more, please feel free to explore the rest of the documentation on this site, experiment the features in `qitview`, or [email me](mailto:cabeen@gmail.com) with any questions!

8 changes: 4 additions & 4 deletions docsite/docs/models.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ The `Fibers` model is used for representing the multi-compartment ball and stick

## Spharm

The `Spharm` model represents an arbitrary spherical function describing a fiber orientation distribution...
The `Spharm` model represents a fiber orientation distribution (FOD) using a spherical harmonic basis. Spherical harmonics decompose a function on the sphere into a set of basis coefficients, analogous to a Fourier transform on a sphere. QIT supports even-order harmonics (orders 0, 2, 4, 6, 8, 10, 12, 14, and 16), with the number of coefficients increasing with the maximum order (e.g. 1, 6, 15, 28, 45 coefficients for orders 0 through 8). This representation provides a compact and rotationally convenient encoding of complex directional diffusion patterns, particularly in regions with crossing fibers where the tensor model is insufficient. FODs estimated by constrained spherical deconvolution can be stored and manipulated using this model, and they can be sampled in any direction to obtain the orientation distribution function value. Features include the baseline coefficient (related to total signal), as well as summary statistics of the coefficients. The `Spharm` model is commonly used with glyph visualizations and fiber tractography algorithms that support orientation distribution functions.

## Noddi

The `Noddi` model is a biophysical model representing multiple compartments for intra- and extra-axonal water and fiber orientation dispersion...
The `Noddi` model is a biophysical model of brain tissue microstructure based on Neurite Orientation Dispersion and Density Imaging (NODDI). It decomposes the diffusion signal into three compartments: an intracellular compartment representing neurites (axons and dendrites), an extracellular compartment representing the space around neurites, and an isotropic compartment representing free water such as cerebrospinal fluid. The model is parameterized by a baseline signal, an intracellular volume fraction (FICVF, representing neurite density), an isotropic volume fraction (FISO), a concentration parameter (kappa) for the Watson distribution describing fiber orientation dispersion, and a 3D fiber direction. Several derived features can be extracted: the orientation dispersion index (ODI), which indicates the degree of fiber fanning or crossing; the extracellular volume fraction (ECVF); and tortuosity-related diffusivity measures. NODDI provides more biologically interpretable tissue parameters than standard DTI, making it valuable for characterizing white matter pathology, development, and aging.

## Kurtosis

The `Kurtosis` model is the basis for a higher-order extension of the diffusion tensor model...
The `Kurtosis` model is the basis for diffusion kurtosis imaging (DKI), which extends the diffusion tensor model to capture non-Gaussian diffusion behavior. While DTI models signal decay with a second-order tensor (6 unique elements), DKI adds a fourth-order kurtosis tensor (15 unique elements), for a total of 22 model parameters plus a baseline signal. The kurtosis tensor characterizes the degree to which diffusion deviates from a Gaussian distribution, which is informative about tissue microstructural complexity. Key features include mean kurtosis (MK), axial kurtosis (AK), and radial kurtosis (RK), in addition to the standard DTI features (FA, MD, AD, RD). DKI requires multi-shell diffusion data (at least two non-zero b-values) and is particularly sensitive to microstructural changes in pathological conditions such as stroke, traumatic brain injury, and neurodegeneration. The implementation in QIT includes support for computing the diffusion and kurtosis orientation distribution functions.

## ExpDecay

The `ExpDecay` model is a general model for representing processes that exhibit a pattern of exponential decay in the MR signal over time.
The `ExpDecay` model represents a simple exponential decay process of the form `y = alpha * exp(-beta * x)`. The model has two parameters: alpha, representing the baseline signal amplitude, and beta, representing the decay rate. In the context of diffusion MRI, alpha corresponds to the unweighted signal intensity (S0) and beta corresponds to the apparent diffusion coefficient (ADC). This model provides a straightforward way to characterize signal attenuation without directional information and is commonly used for basic ADC mapping in clinical diffusion-weighted imaging, or as an initial fit before applying more complex models.

2 changes: 1 addition & 1 deletion docsite/docs/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ All of these things are automatically handled by QIT once a `Module`
has been implemented, making it easy to share a new tool with a wider audience.
Any QIT `Module` can be run on the command line, applied to data
interactively in `qitview`, or run on the
[http://pipeline.loni.usc.edu LONI Pipeline]. In addition, documentation can
[LONI Pipeline](http://pipeline.loni.usc.edu). In addition, documentation can
be made from a `Module` and a preferred set of parameter settings
can be saved for later use or archival purposes.

Expand Down
8 changes: 4 additions & 4 deletions docsite/docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,19 @@ Then, you can plug in your data to run the command, for example:

## Handling file formats

One benefit of the toolkit is that it handles many file formats automatically. In the above help page, you'll notice that the input and output flags only ask for `Volume` and `Mask` objects. These could be NIFTI, VTK, or a variety of others. There is a more comprehensive discussion of this in the page on [[Datasets]].
One benefit of the toolkit is that it handles many file formats automatically. In the above help page, you'll notice that the input and output flags only ask for `Volume` and `Mask` objects. These could be NIFTI, VTK, or a variety of others. There is a more comprehensive discussion of this in the page on [Datasets](datasets.md).

## Scripting

You can use your favorite programs to write scripts using `qit`, but there is also a convenient Python scripting interface that is built-in. This uses a Java implementation of Python called [http://www.jython.org Jython] to directly connect your script with the data objects available in the toolkit. This is a advanced topic that will be described in later pages, but you can see and example script at `lib/modules/qit/VolumeBrainExtract.py`.
You can use your favorite programs to write scripts using `qit`, but there is also a convenient Python scripting interface that is built-in. This uses a Java implementation of Python called [Jython](http://www.jython.org) to directly connect your script with the data objects available in the toolkit. This is a advanced topic that will be described in later pages, but you can see and example script at `lib/modules/qit/VolumeBrainExtract.py`.

## Starting the Viewer

This section will help you get started with the toolkit's viewer, and with any luck, you'll be able to explore and visualize your data in no time!

## Starting the Program

The viewer is a single 3D rendering application named `qitview`. If you followed the [[Installation]], you should only have to type this command in your terminal. Then, the graphical interface will open and look like this:
The viewer is a single 3D rendering application named `qitview`. If you followed the [Installation](install.md), you should only have to type this command in your terminal. Then, the graphical interface will open and look like this:

![](images/Gui.png)

Expand Down Expand Up @@ -116,7 +116,7 @@ If you only have one mouse button, you can also use keyboard options:
- **Mouse Primary Button + Control + Drag**: zoom in the camera
- **Mouse Primary Button + Shift + Drag**: pan the camera (translate in orthogonal to the view)

Again, the specific functions will depend on the datatype, and you can learn more in the [[Interaction]] section.
Again, the specific functions will depend on the datatype, and you can learn more in the [Interaction](interaction.md) section.

## Processing data

Expand Down
2 changes: 1 addition & 1 deletion docsite/docs/support.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ rm -rf ~/.serverauth* && rm -rf ~/.Xauthorit* && rm -rf ~/.cache && rm -rf ~/.rn
rm -rf ~/Library/Caches/org.macosforge.xquartz.X11 && rm -rf ~/Library/Logs/X11
```

- Download XQuartz 2.7.8 from [https://dl.bintray.com/xquartz/downloads/XQuartz-2.7.8.dmg](https://dl.bintray.com/xquartz/downloads/XQuartz-2.7.8.dmg) and install the package.
- Download XQuartz 2.7.8 from [XQuartz-2.7.8.dmg](https://github.com/XQuartz/XQuartz/releases/tag/XQuartz-2.7.8) and install the package.

- Log out, and log back in.

Expand Down
Loading
Loading