The Scan Session Tool is a graphical application for documenting (f)MRI scan sessions and automatized data archiving. Information about the scan session itself, used forms and documents, as well as the single measurements can be entered and saved into a protocol file. This information can furthermore be used to copy acquired data (DICOM images as well as optional stimulation protocols, logfiles and Turbo-Brain Voyager files) into a specific hierarchical folder structure for unified archiving purposes.

ScanSessionTool_Screenshot.png

Installation

The Scan Session Tool is a Python script and will hence run wherever Python (and TKinter and Pyyaml) are installed.

If Python cannot be installed, self-contained binary versions for Windows (.exe) and OS X (.app) are also available at the release page.

Documentation

Usage

The user interface is organized into three different content areas, each hol- ding different information about the scan session, as well as an additional control area for opening and saving session information and for automatically archiving acquired data, based on the session information.

The "General Information" area

This area provides input fields for basic information about the scan session. Some of the fields allow for a selection of pre-specified values taken from a config file (see below), while others take freely typed characters. Fields that are marked with a red background, are mandatory and need to be filled in. Fields that are marked with an orange background are automatically filled in, but need to be checked. The following fields are available:

    "Project"        - The project identifier
                       (free-type and selection)
    "Subject"        - The subject number
                       (001-999)
                     - The subject identifier
                       (free-type and selection)
    "Session"        - The session number
                       (001-999)
                     - The session identifier
                       (free-type and selection)
    "Date"           - The date of the scan session
                       (free-type, auto-filled)
    "Booked Time"    - The time period the scanner was booked
                       (free-type)
    "Actual Time"    - The time period the scanner was actually used
                       (free-type)
    "Certified User" - The responsible user
                       (free-type and selection)
    "Backup Person"  - An additional person
                       (free-type and selection)
    "Notes"          - Any additional notes about the session
                       (free-type)

The "Documents" area

This area provides checkboxes to specify which forms and documents have been collected from the participant. Additional documents can be specified in a configuration file (see "Config File" section). The following checkboxes are available:

    "Files"       - A newline separated list of all session logfiles and ad-
                    ditional documents; wildcard masks (*) will be completed
                    during archiving
                    (free-type)
    "Checklist"   - Checkboxes to specify which forms and documents have been 
                    collected from the participant. Additional documents can 
                    be specified in a configuration file (see "Config File" 
                    section). The following checkboxes are available:
                    "MR Safety Screening Form"            - The (f)MRI scree-
                                                            ning from provi-
                                                            ded by the scan-
                                                            ning institution
                    "Participation Informed Consent Form" - The official MRI 
                                                            written consent 
                                                            form

The "Measurements" area

This area provides several input fields for each measurement of the session. When starting the application, only one (empty) measurement is shown. Click- ing on "Add Measurement" will create additional measurements. Fields that are marked with a red background, are mandatory and need to be filled in. Fields that are marked with an orange background are automatically filled in, but need to be checked. The following input fields are available per measurement:

    "No"                   - The number of the measurement
                             (001-999)
    "Type"                 - "anatomical", "functional" or "misc"
                             (selection)
    "Vols"                 - The number of volumes of the measurement
                             (free-type)
    "Name"                 - The name of the measurement
                             (free-type, selection)
    "Logfiles"             - A newline separated list of all connected
                             logfiles; wildcard masks (*) will be completed
                             during archiving (please note that a stimulation
                             protocol mask will be included automatically,
                             based on the session information)
                             (free-type)
    "Comments"             - Any additional comments about the measurement
                             (free-type)

The control area

The control area consists of the following three buttons:

    "Open"    - Opens previously saved information from a text file
    "Save"    - Saves the entered session information into a text file
    "Archive" - Copies acquired data from specified location into a time-
                stamped sub-folder <~Archiveyyymmdd>. Please note that all
                data is expected to be within the specified folder. That is,
                all DICOM files (*.dcm OR *.IMA; with or without sub-folders),
                all stimulation protocols, all logfiles as well as all Turbo-
                BrainVoyager files (all *.tbv files in a folder called
                'TBVFiles').
                The data will be copied into the following folder hierarchy:
                    DICOMs -->
                      //////
                    BrainVoyager files (links only) -->
                      ////
                    Logfiles -->
                      /////
                    Files -->
                      ///
                    Turbo-BrainVoyager files (links only) -->
                      ////
                    Scan Session Protocol -->
                      ///

Config File

A configuration file can be created to pre-define the values to be used as selection options for the "Group", "Session", "Certified User", "Backup Person", "Notes", the measurement "Name", "Vols" and "Comments" on a per project basis, as well as additional items in the "Documents" section. The Scan Session Tool will look for a configuration file with the name "sst.yaml", located in the same directory as the application itself (does not work for the OS X compiled .app) or in the $HOME folder.

The syntax is YAML. Here is an example:

Project 1:
    SubjectTypes:
        - Group1
        - Group2

    SessionTypes:
        - Sess1
        - Sess2

    Users:
        - User1
        - User2

    Backups:
        - User1
        - User2

    Notes: |
           Subject details
           ---------------

           Age:
           Gender: m[ ] f[ ]

    Files: 
        - "*.txt"

    Checklist: 
        - Pre-Scan Questionnaire
        - Post-Scan Questionnaire

    Measurements anatomical:
        - Name:        Localizer
          Vols:        3

        - Name:        Anatomy
          Vols:        192

    Measurements functional:
        - Name:        Run1
          Vols:        300
          Comments:    |
                       Answer 1:

        - Name:        Run2
          Vols:        400
          Comments:    |
                       Answer 2:

        - Name:        Run3
          Vols:        200
          Comments:    |
                       Answer 3:

    Measurements misc:
        - Name:        Run1incomplete
          Vols:
          Comments:


Project 2:
    SubjectTypes:
        - GroupA
        - GroupB

    SessionTypes:
        - SessA
        - SessB

    Users:
        - UserA
        - UserB

    Backups:
        - UserA
        - UserB

    Notes: |
           Subject details
           ---------------

           Age:
           Gender: m[ ] f[ ]

    Files: 
        - "*.txt"

    Checklist:
        - Participation Reimbursement Form

    Measurements anatomical:
        - Name:        Localizer
          Vols:        3

        - Name:        MPRAGE
          Vols:        192

    Measurements functional:
        - Name:        RunA
          Vols:        300
          Comments:    |
                       Answer 1:

        - Name:        RunB
          Vols:        400
          Comments:    |
                       Answer 2:

        - Name:        RunC
          Vols:        200
          Comments:    |
                       Answer 3:

    Measurements misc:
        - Name:        RunAImcomplete
          Vols:
          Comments: