-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
105 additions
and
143 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
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,70 +1,5 @@ | ||
NiChart\_DLMUSE source code | ||
Developers - API | ||
=========================== | ||
|
||
Submodules | ||
---------- | ||
|
||
DLMUSE pipeline | ||
-------------------------------------------- | ||
|
||
.. automodule:: NiChart_DLMUSE.dlmuse_pipeline | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
Calculate ROI Volume module | ||
----------------------------------------- | ||
|
||
.. automodule:: NiChart_DLMUSE.CalcROIVol | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
|
||
Mask Image | ||
-------------------------------- | ||
|
||
.. automodule:: NiChart_DLMUSE.MaskImage | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
Relabel ROI | ||
-------------------------------- | ||
|
||
.. automodule:: NiChart_DLMUSE.RelabelROI | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
Reorient Image | ||
------------------------------------------ | ||
|
||
.. automodule:: NiChart_DLMUSE.ReorientImage | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
Segment Image | ||
--------------------------------------------- | ||
|
||
.. automodule:: NiChart_DLMUSE.SegmentImage | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
util functions | ||
---------------------------- | ||
|
||
.. automodule:: NiChart_DLMUSE.utils | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
Module contents | ||
--------------- | ||
|
||
.. automodule:: NiChart_DLMUSE | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
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,35 @@ | ||
########## | ||
Components | ||
########## | ||
|
||
NiChart is designed as a framework that integrates independent image processing and analysis pipelines. The following sections describe NiChart pipelines. | ||
|
||
***************** | ||
Active Pipelines | ||
***************** | ||
|
||
These pipelines are currently active and running within the NiChart Project | ||
|
||
------------------------------------ | ||
A1. sMRI Biomarkers of Disease and Aging | ||
------------------------------------ | ||
|
||
Neuroimaging pipeline for computing AI biomarkers of disease and aging from T1-weighted MRI scans | ||
|
||
---------------------- | ||
A2. WM Lesion Segmentation | ||
---------------------- | ||
|
||
**************** | ||
Work in Progress | ||
**************** | ||
|
||
These pipelines will be integrated into NiChart Project in the next releases | ||
|
||
------------------------------------ | ||
B1. DTI Biomarkers of Disease and Aging | ||
------------------------------------ | ||
|
||
------------------------------------ | ||
B2. fMRI Biomarkers of Disease and Aging | ||
------------------------------------ |
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 |
---|---|---|
|
@@ -9,6 +9,8 @@ Contents | |
|
||
installation | ||
usage | ||
components | ||
contributors | ||
api | ||
help | ||
license |
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,5 @@ | ||
####### | ||
License | ||
####### | ||
|
||
NiChart application, web site, the content and the logo of NiChart are intellectual property of CBICA, UPENN. For details, please see `the licence <https://github.com/CBICA/NiChart_Project/blob/main/LICENSE>`. |
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,7 +1,7 @@ | ||
NiChart_DLMUSE | ||
NiChart_Project | ||
============== | ||
|
||
.. toctree:: | ||
:maxdepth: 4 | ||
:maxdepth: 2 | ||
|
||
NiChart_DLMUSE | ||
NiChart_Project |
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,74 +1,27 @@ | ||
##### | ||
Usage | ||
##### | ||
|
||
Pre-trained nnUNet models for the skull-stripping can be found in `HuggingFace nichart/DLICV <https://huggingface.co/nichart/DLICV/tree/main>`_ and | ||
segmentation tasks can be found in `HuggingFace nichart/DLMUSE <https://huggingface.co/nichart/DLMUSE/tree/main>`_. Feel free to use it under the package's license. | ||
|
||
********* | ||
Using CLI | ||
********* | ||
|
||
Our CLI is simply to use as it just takes 2 required parameters: :: | ||
|
||
$ NiChart_DLMUSE -i <input path> -o <output path> | ||
|
||
By default, our CLI runs on CPU. You can run it on GPU with CUDA or MPS just by specifying the device: :: | ||
########### | ||
Quick Start | ||
########### | ||
|
||
$ NiChart_DLMUSE -i <input path> -o <output path> -d cuda | ||
******* | ||
Desktop | ||
******* | ||
|
||
The following steps describe how to run NiChart after installation: :: | ||
|
||
$ cd src/viewer | ||
$ streamlit run NiChartProject.py | ||
.. note:: | ||
The app will start running at http://localhost:8501. If your browser doesn't automatically open, please copy and paste this address into your browser. | ||
|
||
**MPS** Can be used if your chip supports 3d convolution(M1 chips do not support 3d convolution, thus, you can't use MPS with M1 macbooks) | ||
|
||
|
||
We use batch splitting and paralellization to accelerate the procedure. By default, we split the input data into | ||
4 subfolders. You can specify the number of subfolders with the ``-c`` or ``--cores`` option: :: | ||
|
||
$ NiChart_DLMUSE ... -c 6 | ||
|
||
This will create 6 subfolders instead of the default 4. | ||
|
||
We also support ``BIDS`` I/O in our latest stable release. In order to run NiChart DLMUSE with a BIDS folder as the input you | ||
need to have one T1 image under the anat subfolder. After the run NiChart DLMUSE will return the segmented images in the same | ||
subfolders. If you have a `BIDS` input folder you have to specify it at the CLI command: :: | ||
***** | ||
Cloud | ||
***** | ||
|
||
$ NiChart_DLMUSE ... --bids 1 | ||
The cloud app can be launched at https://cloud.neuroimagingchart.com . Users need to create an account to access the cloud app. | ||
|
||
For further explanation please refer to the complete CLI documentation: :: | ||
|
||
$ NiChart_DLMUSE -h | ||
|
||
|
||
************************** | ||
Using the docker container | ||
************************** | ||
|
||
Using the file structure explained above, an example command using the `docker container <https://hub.docker.com/r/cbica/nichart_dlmuse/tags>`_ | ||
is the following: :: | ||
|
||
# For GPU | ||
$ CUDA_VERSION=11.8 docker pull cbica/nichart_dlmuse:1.0.1-cuda${CUDA_VERSION} | ||
|
||
# For CPU | ||
docker pull cbica/nichart_dlmuse:1.0.4-default | ||
|
||
$ # Run the container with proper mounts, GPU enabled | ||
# Place input in /path/to/input/on/host. | ||
# Replace "-d cuda" with "-d mps" or "-d cpu" as needed... | ||
# or don't pass at all to automatically use CPU. | ||
# Each "/path/to/.../on/host" is a placeholder, use your actual paths! | ||
docker run -it --name DLMUSE_inference --rm | ||
--mount type=bind,source=/path/to/input/on/host,target=/input,readonly | ||
--mount type=bind,source=/path/to/output/on/host,target=/output | ||
--gpus all cbica/nichart_dlmuse -d cuda | ||
|
||
|
||
******************************* | ||
Using the singularity container | ||
******************************* | ||
|
||
We do not recommend using the singularity container as is currently outdated and not maintaned: :: | ||
***** | ||
Usage | ||
***** | ||
|
||
$ singularity run --nv --containall --bind /path/to/.\:/workspace/ nichart_dlmuse.simg NiChart_DLMUSE -i /workspace/temp/nnUNet_raw_data_base/nnUNet_raw_data/ -o /workspace/temp/nnUNet_out -p structural --derived_ROI_mappings_file /NiChart_DLMUSE/shared/dicts/MUSE_mapping_derived_rois.csv --MUSE_ROI_mappings_file /NiChart_DLMUSE/shared/dicts/MUSE_mapping_consecutive_indices.csv --nnUNet_raw_data_base /workspace/temp/nnUNet_raw_data_base/ --nnUNet_preprocessed /workspace/temp/nnUNet_preprocessed/ --model_folder /workspace/temp/nnUNet_model/ --all_in_gpu True --mode fastest --disable_tta | ||
After launching the application, users can select a pipeline and apply it to their data. For detailed instructions on each pipeline, please refer to the **Overview** and **Tutorial** pages accessible from the left-hand menu. |