Identify the subjects you wish to unpack from DICOM to nifti format and create a case list text file of the subjects you wish to unpack. The case list text file should be formatted as follows:
sub-<subject_label>
sub-<subject_label>
sub-
Identify the subjects you wish to unpack from DICOM to nifti format and create a case list text file of the subjects you wish to unpack. The case list text file should be formatted as follows:
sub-<subject_label>
sub-<subject_label>
sub-
BUILDING TMUX LOCALLY
Set HOME directory: export HOME=/data/pnlx/home/$USER
Install OpenSSL
| #!/bin/bash | |
| # Initialize variables | |
| input_dir="/path/to/input/directory" | |
| bids_root="/path/to/BIDS/rawdata/" | |
| log_file="logs/$(date +%Y%m%d_%H%M%S)_renameToBIDSAnySession.log" | |
| cases="" | |
| case_list="" | |
| # Function to display help message |
| #!/bin/bash | |
| # Usage: | |
| # ./copy_random_subjects.sh s3://nda-enclave-c3371/HCP/HCPD/ 10 /local/destination/path | |
| S3_PATH="$1" # S3 bucket and path without trailing slash | |
| NUM_SUBJECTS="$2" # Number of subjects to randomly select | |
| DESTINATION_PATH="$3" # Local destination path | |
| # Ensure awscli is installed |
| import os | |
| import pandas as pd | |
| import glob | |
| import argparse | |
| from tqdm import tqdm | |
| DEBUG = True | |
| error_log = [] | |
| log = [] |
| #!/bin/bash | |
| # Directory to scan; you can modify this to be the root '/' or any specific directory | |
| TARGET_DIRECTORY="/" | |
| # Output directory for the reports | |
| REPORT_DIR="/var/log/space_reports" | |
| mkdir -p "${REPORT_DIR}" | |
| # Filename includes date for weekly tracking |
| set number | |
| syntax on | |
| filetype plugin on | |
| set autoindent | |
| set smartindent | |
| set tabstop=4 | |
| set shiftwidth=4 | |
| set expandtab | |
| set wrap | |
| set showcmd |
| import nibabel as nib | |
| import numpy as np | |
| import csv | |
| import sys | |
| from tqdm import tqdm | |
| def dice_coefficient(mask1, mask2): | |
| """ | |
| Compute the Dice coefficient, a measure of set similarity. | |
| Parameters |
| #!/bin/bash | |
| # Usage: ./symlink_full_dir.sh /path/to/source /path/to/target | |
| SOURCE_DIR=$1 | |
| TARGET_DIR=$2 | |
| # Check if the source directory exists | |
| if [ ! -d "$SOURCE_DIR" ]; then | |
| echo "Source directory does not exist: $SOURCE_DIR" |