Skip to content

Commit

Permalink
Modification of layout appearance, as well as the template, change te…
Browse files Browse the repository at this point in the history
…mplate to cosmo
  • Loading branch information
Jinyao Tian committed Sep 6, 2024
1 parent 760a22d commit b4696b0
Show file tree
Hide file tree
Showing 9 changed files with 193 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .Rproj.user/6A9A55E1/pcs/files-pane.pper
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"ascending": true
}
],
"path": "~/Desktop/WHIMs"
"path": "~/Desktop/WHIMs/R"
}
4 changes: 2 additions & 2 deletions .Rproj.user/6A9A55E1/pcs/windowlayoutstate.pper
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"left": {
"splitterpos": 351,
"splitterpos": 345,
"topwindowstate": "NORMAL",
"panelheight": 682,
"windowheight": 720
},
"right": {
"splitterpos": 523,
"splitterpos": 373,
"topwindowstate": "NORMAL",
"panelheight": 682,
"windowheight": 720
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Generated by roxygen2: do not edit by hand

export(PartitionPipeline)
export(eve_Fl)
export(eve_T1)
export(run_partition_pipeline)
Expand Down
8 changes: 7 additions & 1 deletion R/PartitionPipeline.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#Purpose: Make an object for this pipeline, to streamline them
#' Partition Pipeline for Image Analysis
#'
#' This R6 class is designed to streamline the processing pipeline for image analysis,
#' including steps from initial processing to combining independent variables with
#' reduced variables by tissue type by ROI.
#'
#' @import R6
#' @export
PartitionPipeline <- R6Class("PartitionPipeline",
public = list(
tind = NULL,
Expand Down
5 changes: 5 additions & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ knitr::opts_chunk$set(echo = TRUE)
[![USC IMAGE](https://raw.githubusercontent.com/USCbiostats/badges/master/tommy-image-badge.svg)](https://image.usc.edu)
<!-- badges: end -->

## Introduction

NeuroPartitioner is an advanced R package designed to convert NIfTI format T1/FL neuroimages into structured, high-dimensional 2D data frames, focusing on region of interest (ROI) based processing. This package incorporates a key algorithm called ‘partition’, which offers a fast, flexible framework for agglomerative partitioning based on the Direct-Measure-Reduce approach. This method ensures that each reduced variable maintains a user-specified minimum level of information while being interpretable, as each maps uniquely to one variable in the reduced dataset. The ‘partition’ algorithm, detailed in Millstein et al. (2020), allows for customization in variable selection, measurement of information loss, and data reduction methods. NeuroPartitioner is indispensable for researchers requiring efficient, accurate preparation of neuroimaging data for detailed statistical analysis and machine learning applications, enhancing the interpretability and utility of neuroimaging studies.


## Installation Instructions

This document provides detailed steps to install the necessary dependencies for the package. Please follow the instructions carefully to ensure all dependencies are correctly installed.
Expand Down
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,24 @@ NeuroPartitioner
IMAGE](https://raw.githubusercontent.com/USCbiostats/badges/master/tommy-image-badge.svg)](https://image.usc.edu)
<!-- badges: end -->

## Introduction

NeuroPartitioner is an advanced R package designed to convert NIfTI
format T1/FL neuroimages into structured, high-dimensional 2D data
frames, focusing on region of interest (ROI) based processing. This
package incorporates a key algorithm called ‘partition’, which offers a
fast, flexible framework for agglomerative partitioning based on the
Direct-Measure-Reduce approach. This method ensures that each reduced
variable maintains a user-specified minimum level of information while
being interpretable, as each maps uniquely to one variable in the
reduced dataset. The ‘partition’ algorithm, detailed in Millstein et
al. (2020), allows for customization in variable selection, measurement
of information loss, and data reduction methods. NeuroPartitioner is
indispensable for researchers requiring efficient, accurate preparation
of neuroimaging data for detailed statistical analysis and machine
learning applications, enhancing the interpretability and utility of
neuroimaging studies.

## Installation Instructions

This document provides detailed steps to install the necessary
Expand Down
14 changes: 14 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
url: https://jtian123.github.io/WHIMs/
template:
bootstrap: 5
bootswatch: cosmo # Using the Flatly theme from Bootswatch

navbar:
title: NeuroPartitioner
left:
- text: Home
href: index.html
- text: Get Started
href: articles/NeuroPartitioner.html # Link directly to your vignette
- text: Reference
href: reference/index.html
right:
- text: View on source code
href: https://github.com/jtian123/WHIMs
icon: fab fa-github
135 changes: 135 additions & 0 deletions man/PartitionPipeline.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion vignettes/NeuroPartitioner.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ datatable(lab_df[c("integer_label", "text_label", "structure")],
caption = 'Interactive table of complete data from the brain regions dataset.')
```

## Process T1-weighted Brain MRI Data with FSL and Register to EVE Atlas
<br><br> <!-- Adds two line breaks -->

## Process T1-weighted Brain MRI Data with FSL and Register to EVE Atlas

Ensure FSL is installed as per the instructions provided in the [package README](https://github.com/jtian123/WHIMs).

Expand All @@ -59,23 +60,31 @@ eve_T1(fpath, outpath, fsl_path , fsl_outputtype = "NIFTI_GZ")

**fpath**: A character string specifying the path to one T1-weighted MRI file. The file should be in NIFTI file format (.nii.gz). Processing may take some time, so please be patient. For handling multiple MRI files, consider using parallel processing with R's parallel computation packages or through high-performance computing resources to improve efficiency.

<br><br> <!-- Adds two line breaks -->

## Run Partition Pipeline on Neuroimaging Data

This section describes how to utilize the pipeline for processing neuroimaging data through sequential application of sophisticated algorithms and segmentation based on Regions of Interest (ROIs).

<br> <!-- Adds one line breaks -->

### Pipeline Overview:

- **Super-Partition**: Applies Josh's super-partition algorithm, which considers 3D locations to group data based on ROIs.
- **Partition Algorithm**: Processes data post Super-Partition using the [Partition algorithm](https://github.com/USCbiostats/partition), enhancing data structuring.
- **Tissue Segmentation**: Segments the processed data by tissue type within each ROI.

<br> <!-- Adds one line breaks -->

### Practical Example:

To process the ROI named "inferior_frontal_gyrus", identify the corresponding `tind` (in this example, `tind = 5`) from the **Region Labels and Structures** section. You'll need to set up a directory to manage all processing files and datasets. Note that the outputs from this pipeline will not be returned directly but will be stored at specified locations:

- Intensity data: **/main_dir/partition/roi/thresh/tissue_type/cmb/intensities_whole.rds**
- Volume data: **/main_dir/partition/roi/thresh/tissue_type/cmb/volume_whole.rds**

<br> <!-- Adds one line breaks -->

### Parallel Processing:

This function is equipped with parallel processing capabilities, allowing users to specify the number of cores they wish to utilize. Increasing the number of cores will proportionally speed up the Partition process, offering significant time savings for large datasets.
Expand Down

0 comments on commit b4696b0

Please sign in to comment.