Link Search Menu Expand Document

converting NifTi (Legacy)

Table of contents

  1. Quick access of metadata
  2. brkraw command-line tool
    1. Common features for all conversion
    2. tonii: Convert single scan to NifTi
    3. tonii_all: Convert whole study to NifTi

Quick access of metadata

  • Printing out dataset information
$ brkraw info <input raw data>

brkraw info Example of printed out dataset information

brkraw command-line tool

Common features for all conversion

  • If the data is aquired with DWI sequence, the bvals and bvecs will automatically generated.
  • In the case you want to ignore data rescale, use the ‘–ignore-rescale’ option.

tonii: Convert single scan to NifTi

  • This method has been inherited from old brk2nii and PyBruker which has been removed from repository and archived. This function is useful if you want to convert whole datasets without needing to consider data structure or converting specific Scan and Reco IDs.
  • If you want to convert a specific Scan, provide the option ‘–scanid’ with corresponding Scan ID.
  • If a Scan has multiple Reco images, provide ‘–recoid’ with corresponding Reco ID. Without this option, the default Reco ID would be 1.
$ brkraw tonii <input raw data> [-s <scan id>] [-r <reco id>]
  • Without the –scanid (-s), all scan images in the raw data will be converted.
$ brkraw tonii <input raw data>

tonii_all: Convert whole study to NifTi

  • The function to convert multiple raw dataset.
  • You must provide the parent folder where more than one raw data is existing.
  • By adding option ‘-b’ or ‘–bids’, it will generate JSON file that contains META parameters.
  • All dataset under parent folder will be converted into ./Data folder with BIDS structure, but filename will not follow the BIDS standard. If you need to share your data, we recommend to use bids_convert function instead.
$ brkraw tonii_all <input dir>