Metadata-Version: 2.1
Name: dive-mri
Version: 1.0.4
Summary: The Diffusion Visualization Explorer (DiVE) Tool
License: Unless otherwise specified by LICENSE.txt files in individual
        directories, or within individual files or functions, all code is:
        
        Copyright (c) 2024, DiVE developers
        All rights reserved.
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are
        met:
        
            * Redistributions of source code must retain the above copyright
               notice, this list of conditions and the following disclaimer.
        
            * Redistributions in binary form must reproduce the above
               copyright notice, this list of conditions and the following
               disclaimer in the documentation and/or other materials provided
               with the distribution.
        
            * Neither the name of the DiVE developers nor the names of any
               contributors may be used to endorse or promote products derived
               from this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
        "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
        LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
        A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
        OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
        SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
        LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
        DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
        THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
        (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
Project-URL: Repository, https://github.com/USC-LoBeS/dive
Keywords: Diffusion MRI,along-tract visualization,tractography,white matter bundle
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: distinctipy>=1.2.3
Requires-Dist: fury>=0.9.0
Requires-Dist: matplotlib
Requires-Dist: nibabel
Requires-Dist: numpy<2.0.0
Requires-Dist: ordered-set
Requires-Dist: pandas
Requires-Dist: pyvista
Requires-Dist: trx-python>0.2.9
Requires-Dist: vtk>=9.3.0
Requires-Dist: webcolors
Requires-Dist: setuptools>=69.5
Requires-Dist: dipy

<a name="readme-top"></a>

<br />
<div align="center">
  <a href="https://raw.githubusercontent.com/USC-LoBeS/dive/main/images/Logo.svg">
    <img src="https://raw.githubusercontent.com/USC-LoBeS/dive/main/images/Logo.svg" alt="Logo" width="80" height="80">
  </a>

<h3 align="center">DiVE</h3>

  <p align="center">
    Diffusion Visualization and Explorer
    <br />
    <a href="https://github.com/USC-LoBeS/dive/tree/main/example#readme"><strong>Explore the docs »</strong></a>
    <br />
    <br />
    <a href="https://github.com/USC-LoBeS/DiVE/issues">Report Bug</a>
    ·
    <a href="https://github.com/USC-LoBeS/DiVE/issues">Request Feature</a>
  </p>
</div>



<!-- TABLE OF CONTENTS -->
<details>
  <summary>Table of Contents</summary>
  <ol>
  <li><a href="#built-with">Built With</a></li>
    <li>
      <a href="#about-the-project">About The Project</a>
    </li>
    <li>
      <a href="#getting-started">Getting Started</a>
      <ul>
        <li><a href="#installation">Installation</a></li>
      </ul>
    </li>
    <li><a href="#ui-interaction">UI Interaction</a></li>
    <li><a href="#usage-cli">Usage CLI</a></li>
    <li><a href="#contributing">Contributing</a></li>
    <li><a href="#contact">Contact</a></li>
    <li><a href="#acknowledgments">Acknowledgments</a></li>
  </ol>
</details>

### Built With

[![Fury][Fury.]][Fury-url]
[![OpenGL][OpenGL.]][OpenGL-url]
[![distinctipy][dist.]][dist-url]
[![pypi][pypi.]][pypi-url]
<p align="right">(<a href="#readme-top">back to top</a>)</p>



<!-- ABOUT THE PROJECT -->
## About The Project

 Diffusion Visualization and Explorer (DiVE) is a tool designed for visualizing medical imaging data. It allows users to visualize tractography in various formats (TRK, TCK, TRX, VTK), binary masks in NIfTI format, and meshes in VTK format. Users also have the flexibility to load multiple Regions of Interest (ROIs) in different combinations, whether they are exclusively of one type (mesh, mask, or tract) or a combination of types. Additionally, users can toggle between 3D visualization and saving the output by specifying a designated path.

<p align="right">(<a href="#readme-top">back to top</a>)</p>





<!-- GETTING STARTED -->
## Getting Started

This is an example of how you may give instructions on setting up your project locally.
To get a local copy up and running follow these simple example steps.


### Installation

   ```sh
   pip install dive-mri
   ```
<p align="right">(<a href="#readme-top">back to top</a>)</p>



<!-- UI Interaction -->

## UI Interaction
1. <strong>Choose Type:</strong> Use the type of ROI type (Mask/Mesh/Tract/Brain) to open the drop down having the names of all the files of that type, to select that required ROI.
2. <strong>Change View:</strong> Click on the buttons to change the view to Sagittal/Coronal/Axial view.
3. <strong>Choose Slice:</strong> Change the brain slice value based on the selected view (a brain_2d file is required to use this)
4. <strong>Change Opacity (Streamlines, Mask, Mesh, Slice):</strong> 
Use the sliders to change the opacity of the file for a selected file.
5. <strong> Add Button: </strong> To add more items, click the add button and choose the type of file you want to add.
6. <strong> Remove Button: </strong> To remove a specific file, select it using the Choose type and then click this button.
   
![Image][ui-image]

<!-- USAGE -->
## USAGE CLI

Here are few example of how to use the code for specific features.

<strong>Rendering Tract/Mask/Mesh :</strong> 
![Image][fig1-image]
```
The user can give a 3D region of interest label image in NIFTI format and the tool will render it as a set of 3D contours (Figure A). Tract rendering can be conducted across all common formats (trk, tck, trx, vtk), with user defined coloring options, as well as available defaults (Figure B). Each fiber tract is displayed as tubes with a user-defined width. The tool applies either the color specified by the user or a random color for single labeled masks and chooses a set of distinct colors for multi-labeled masks using “distinctipy” or uses the colormap specified by the user (Figure C). DiVE also allows for the overlay of NIFTI masks and surface meshes on the fiber tracts, which can map scalar values to color or opacity, providing insights into tissue microstructure. The tool supports backgrounds using either a 3D glass brain or 2D slices. Visualization can be done in any stereotaxic space.
```
  <strong> Note: Specific Use cases can be found in [open Examples](https://github.com/USC-LoBeS/dive/tree/main/example) </strong>


<p align="right">(<a href="#readme-top">back to top</a>)</p>


<!-- CONTACT -->
## Contact

Lobes - [Siddharth Narula](mailto:narulas@usc.edu), [Iyad Ba Gari](mailto:bagari@usc.edu), [Neda Janahshad](mailto:njahansh@usc.edu)

<p align="right">(<a href="#readme-top">back to top</a>)</p>



<!-- ACKNOWLEDGMENTS -->
## Acknowledgments

* [Siddharth Narula, Iyad Ba Gari, Shruti P. Gadewar, Sunanda Somu, Neda Jahanshad, "Diffusion Visualization Explorer (DiVE) Organization for Human Brain Mapping (OHBM 2024) June 26,2024](https://ww6.aievolution.com/hbm2401/index.cfm?do=abs.viewAbstract&style=1&abstractID=2661)

* [Iyad Ba Gari, Shayan Javid, Alyssa H. Zhu, Shruti P. Gadewar, Siddharth Narula, Abhinaav Ramesh, Sophia I. Thomopoulos et al. "Along-Tract Parameterization of White Matter Microstructure using Medial Tractography Analysis (MeTA)." In 2023 19th International Symposium on Medical Information Processing and Analysis (SIPAIM), pp. 1-5. IEEE, 2023.](https://doi.org/10.1109/SIPAIM56729.2023.10373540)

<p align="right">(<a href="#readme-top">back to top</a>)</p>



<!-- MARKDOWN LINKS & IMAGES -->
[contributors-url]: https://github.com/USC-LoBeS/DiVE/graphs/contributors
[forks-shield]: https://github.com/USC-LoBeS/DiVE/repo_name.svg?style=for-the-badge
[issues-url]: https://github.com/USC-LoBeS/DiVE/issues

[ui-image]: https://raw.githubusercontent.com/USC-LoBeS/dive/main/images/UI.png
[fig1-image]: https://raw.githubusercontent.com/USC-LoBeS/dive/main/images/Figure_1.png

[Fury.]: https://img.shields.io/badge/Fury-red?logo=https%3A%2F%2Ffury.gl%2Flatest%2F_static%2Fimages%2Flogo.svg
[Fury-url]: https://fury.gl/latest/index.html
[OpenGL.]: https://img.shields.io/badge/OpenGL-%235586A4?logo=https%3A%2F%2Ffury.gl%2Flatest%2F_static%2Fimages%2Flogo.svg
[OpenGL-url]:https://www.opengl.org/
[dist.]:https://img.shields.io/badge/distinctipy-blue?logo=https%3A%2F%2Ffury.gl%2Flatest%2F_static%2Fimages%2Flogo.svg
[dist-url]: https://doi.org/10.5281/zenodo.3985191
[pypi.]:https://img.shields.io/badge/pypi-v1.4-blue
[pypi-url]: https://pypi.org/project/dive-mri/
