funROI

funROI: A package for functional region of interest analysis in fMRI data.

class funROI.FROIConfig(task: str, contrasts: List[str], threshold_type: str, threshold_value: float, parcels: str | ParcelsConfig, conjunction_type: str | None = None)[source]

Functional region of interest (fROI) configuration.

Parameters:
  • task (str) – The task label.

  • contrasts (List[str]) – List of contrast labels.

  • threshold_type (str) – The threshold type. Options are ‘none’, ‘bonferroni’, ‘fdr’, ‘n’, ‘percent’.

  • threshold_value (float) – The threshold value.

  • parcels (Union[str, ParcelsConfig]) – The parcels configuration. If a string is provided, it is assumed to be the path to the parcels file.

  • conjunction_type (str, optional) – The conjunction type if multiple contrasts are provided. Options are ‘min’, ‘max’, ‘sum’, ‘prod’, ‘and’, ‘or’, or None.

class funROI.ParcelsConfig(parcels_path: str | Path, labels_path: str | Path | None = None)[source]

Configuration for parcels.

Parameters:
  • parcels_path (Union[str, Path]) – Path to the parcels image.

  • labels_path (Optional[Union[str, Path]]) – Path to the labels file. The labels file can be a JSON file mapping numerical labels to label names, or a text file with one label name per line.

static from_analysis_output(name: str, smoothing_kernel_size: int, overlap_thr_vox: float, overlap_thr_roi: float, min_voxel_size: int, use_spm_smooth: bool = True)[source]

Create a ParcelsConfig object from the analysis output folder.

funROI.get_analysis_output_folder() Path

Get the analysis output folder path.

funROI.get_bids_data_folder() Path

Get the BIDS data folder path.

funROI.get_bids_deriv_folder() Path

Get the BIDS derivatives folder path.

funROI.get_bids_preprocessed_folder() Path

Get the BIDS preprocessed folder path.

funROI.get_bids_preprocessed_folder_relative() str

Get the BIDS preprocessed folder path relative to the data folder.

funROI.reset_settings()

Reset all path settings to None.

funROI.set_analysis_output_folder(path: str | Path)

Set the analysis output folder path.

funROI.set_bids_data_folder(path: str | Path)

Set the BIDS data folder path.

funROI.set_bids_deriv_folder(path: str | Path)

Set the BIDS derivatives folder path.

funROI.set_bids_preprocessed_folder(path: str | Path)

Set the BIDS preprocessed folder path.