BasicUsageOfCIVET

 

Preparing Your Data for Processing

CIVET requires the image files to follow a strict naming convention. The native MRI files must have the following filename structure:

  • $source_t1 = prefix_id_t1.mnc
  • $source_t2 = prefix_id_t2.mnc
  • $source_pd = prefix_id_pd.mnc
  • $source_mask = prefix_id_mask.mnc

where $source_t1 is the T1-weighted image file, $source_t2 is the T2-weighted image file, $source_pd is the proton-density-weighted image file, $source_mask is the native brain mask (optional), prefix is the prefix you chose for the project you are working with, and id is the subject identification number. .mnc is the extension that indicates the MINC file format. Images are internally compressed in the MINC2 format to save space.

Converting other file types to MINC

It is convenient to keep the source files in a distinct directory. The T1-weighted image must always exist; the T2- and PD-weighted images and mask are optional. Given that most image files come with naming conventions that are very different than the CIVET requirement, we suggest creating a directory that contains symbolic links to the original image files, and use the CIVET naming convention to name the symbolic links.

The T2- and PD-weighted images can be used, if present, to obtain a multi-spectral brain mask and/or for a multi-spectral tissue classification. The input mask, if present, will be transformed to stereotaxic space and be used as a white matter brain mask. The user-supplied brain mask can be useful for eliminating meninges and dura when the automatic masking procedure fails to do so.

Anonymize your files

You may use the following process to make sure that your .mnc files do not contain any sensitive patient information, such as name. You may prefer to script the process if you have a large number of files. Of course, replace firstname and lastname below with your particular subject’s first and last names.

First, if it is not already in the proper (anonymous) naming convention of <prefix>_<id>_t1.mnc, do so now:

mv lastname_firstname_20100610_134507_2_mri.mnc StudyName_01_t1.mnc

Next, search the header for instances of the subject’s name. In this example, we search by first name, but you could equally search by last name.

mincheader StudyName_01_t1.mnc |grep firstname

The output will reveal the fields, if any, where the name is listed.

patient:full_name = “firstname lastname” ;
dicom_0×0010:el_0×0010 = “lastname firstname” ;
:history = “Fri May 10 11:27:08 2013>>> dcm2mnc -anon -usecoordinates dicom-0005-lastname_firstname_20100610_134507_2_mri <prefix>_<id>_t1

Selectively replace those affected fields with a string (or empty string):

minc_modify_header StudyName_01_t1.mnc -sinsert patient:full_name=‘anonymous’
minc_modify_header StudyName_01_t1.mnc -sinsert dicom_0×0010:el_0×0010=‘anonymous’
minc_modify_header StudyName_01_t1.mnc -sinsert :history=‘’

Search your file again for your subject’s name. This time, it should come up blank.

mincheader StudyName_01_t1.mnc |grep firstname

If desired, you may do the same for age or gender:

minc_modify_header StudyName_01_t1.mnc -sinsert patient:age=‘’
minc_modify_header StudyName_01_t1.mnc -sinsert patient:birthdate=‘’
minc_modify_header StudyName_01_t1.mnc -sinsert patient:sex=‘’

To see a list of all patient fields (with potentially sensitive information), type:

mincheader StudyName_01_t1.mnc |grep patient:

 


 

                           

The Neuro logoMcGill logoMcGill University Health Centre logoKillam logo

                                                                                                                 FacebookinstagramtwitterlinkedInyoutube

Back to top