neuropoly / template

A framework for creating unbiased MRI templates of the spinal cord
MIT License
5 stars 4 forks source link

Creation of `subjects.csv` under the parent folder and not in the subject derivative folder #83

Closed rohanbanerjee closed 11 months ago

rohanbanerjee commented 1 year ago

Description:

The generate_template.py script needs the subjects.csv file in order to generate the template. https://github.com/neuropoly/template/blob/a7915f4ccfa075a5d31f4ea84bb9761d42710e9e/generate_template.py#L14

This subjects.csv file is created as a part of the preprocess_normalize.py script. https://github.com/neuropoly/template/blob/a7915f4ccfa075a5d31f4ea84bb9761d42710e9e/preprocess_normalize.py#L650

Current behaviour:

As per the current preprocess_normalize.py script, the subjects.csv gets created under the last subjects derivatives folder, specifically: PARENT_FOLDER/DATASET_NAME/derivatives/sct_straighten_spinalcord/LAST_SUBJECT_FOLDER/subjects.csv

Expected behaviour:

The subjects.csv should be created under the derivatives/template/ for easier access and less confusion.

rohanbanerjee commented 11 months ago

Another minor related issue to the subjects.csv file is related to the pathname. The pathname of the template.mnc gets written as /derivatives/template//template_mask.mnc. The extra \ has to be removed and for that the value the method create_mask_template returns has to be changed.