BrainVoyager v23.0

DICOM to NIfTI and BIDS

When creating documents from source (DICOM) files using the Create Document Wizard, the presented Target Location page offers the possibility to store the document that will be created directly as a NIfTI file. This can be enabled by turning on the Save document in NIfTI format with associated JSON file option (see red arrow in screenshot below).

DICOM-to-NIfTI

If this opton is checked, the program will create first a BrainVoyager documet in the same way as when not using this option but it will then convert and the created document in a NIfTI file and stores it to disk using the name provided earlier in the Document name field of the Select Data Location page. In case of large datasets, e.g. when converting a functional scan with many volumes, the conversion to a compressed NIfTI file might take a while (usually less than a minute) and progress of the conversion is shown in the Log tab. When the conversion is completed, the BrainVoyager document is closed only leaving the converted NIfTI file on disk.

NIfTI-Result-Folder

In the example screenshot of the output folder above, the compressed NIfTI file is named 'Visualbold.nii.gz'. The main name 'Visual' has been provided by the user (default name would be 'untitled'). The 'bold' part of the name identifies the contents as a functional MRI (BOLD) dataset. This is followed by the '.nii' extension identifying the folder entry as a NIfTI file. This is usually followed by the additional '.gz' extension indicating that the image contents of the file has been compressed using the 'gzip' standard. In addition to the NIfTI file itself, two sidecar files have been created. The JSON file ('Visualbold.json') contains information from the DICOM header (plus BrainVoyager-specific entries) as described in the next topic. The TSV (tab-separated value) file ('Visual_events.tsv') represents the protocol for the functional run dataset in BIDS format. This file is only created in case the user has provided a BrainVoyager protocol in the Number of Volumes page of the Create Document Wizard but it can also be created later.

NOTE. While it is possible to convert BrainVoyager documents to NIfTI at any time using the Save NIfTI item in the File menu, converting DICOM files diectly at the end of document creation has the advantage that information from the DICOM header is still available and can be placed in a NIfTI 'sidecar' JSON file in addition to the core information that is kept in BrainVoyager's document files. It is also possible to do this in two steps by first creating the BrainVoyager document and then saving it to NIfTI using the Save NIfTI menu item since the DICOM header information is kept in memory until the document is closed.

When turning on the Save document in NIfTI format with associated JSON file option as described above, the wizard automatically turns on also the option Add NIfTI plus sidecar files to (new) BIDS project (this option was turned off above to demonstrate the creation of NIfTI files without placing it in a BIDS directory tree). When this option is turned on (see screenshot below), several options in the Target Location page are enabled that can be used to put the created NIfTI file in an existing or newly created BIDS project tree, including the Subject ID, Sessio ID, Run ID (for functional and diffusion-weighted documents) and Task name (for functional documents).

DICOM-to-NIfTI-BIDS

When finishing the wizard, the NIfTI file will be created as described above but the name of the file will be based on the specified BIDS information. Instead of Visiual_bold.nii.gz the resulting NIfTI file will be named sub-01_ses-01_task-images_run-01_bold.nii.gz (see entry in func folder below).

DICOM-to-NIfTI-BIDS

Besides specifying the name of the resulting file(s), the values entered in the Subject ID ("sub-01") and Session ID ("ses-01") will also be used to put the data in the respective folders in the BIDS tree of the respective project inside the chosen project. The project will be selected (or created) in the current Projects folder (default: [user]/Documents/BrainVoyager/Projects) that can be modified in the In directory field. In the example above, the Vision folder is created inside the Projects folder since the resulting NIfTI file has been assigned to a new project, whcih has been named "Vision". If the name of an existing project would have been chosen in the selection box, the data would be placed in the appropriate location inside the chosen (existing) project. If not already present, the rawdata folder and the derivatives folder will be created under the project folder to store the converted raw data and any (later) analyzed data, respectively. Note that the name of the deepest folder (here func) is created based on the specified document type in the Document Type page of the Create Document Wizard. If a folder in the modified project tree is not yet present, it will be created as needed. For more details about the BIDS tree, see topic BIDS Compatibility in the Data Analysis Manager chapter. The next topic provides more information about the created NIfTI sidecar files.


Copyright © 2023 Rainer Goebel. All rights reserved.