diff --git a/CHANGES.rst b/CHANGES.rst index d593828..54ae40e 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -54,6 +54,15 @@ Unreleased -o DIR`` reads the label values of every segmentation, and the label tables of GIFTI files, into two tables keyed by md5, shipped with tfmanager (``migrate/data/labels-2.0.0.tsv``, ``labeltables-2.0.0.tsv``). +* The 54 segmentations of the Archive without a lookup table get one, and the + MNI152NLin6Asym Harvard-Oxford tables are rebuilt: 24 tables under + ``migrate/config/tables/``, each written from a cited upstream file (FSL, FreeSurfer, + HCP Pipelines, Mindboggle, the authors of MouseIn, the UNC infant atlases and the + Waxholm Space atlas, with their sha256) or, for the order of 4D probabilistic + segmentations and for tissue maps, from the data and the papers. A table a source + replaces is no longer converted first, and planning a migrated template writes it no + more. WHS's ``res-2`` ``atlas-v3`` image, a tissue map, becomes ``desc-tissues``. + Closes templateflow/templateflow#203. * New warning TF118 redundant-entity: a ``desc``, ``seg`` or ``label`` that tells its file apart from no other file of the template (``res``, ``den``, ``hemi`` and ``cohort`` aside). Masks keep ``desc``, probabilistic segmentations keep ``label``, and diff --git a/setup.cfg b/setup.cfg index eea0f89..f2b9432 100644 --- a/setup.cfg +++ b/setup.cfg @@ -40,6 +40,7 @@ tfmanager = migrate/data/*.tsv migrate/config/*.yaml migrate/config/*.json + migrate/config/tables/*.tsv [options.packages.find] exclude = diff --git a/tfmanager/migrate/config/2.0.0.yaml b/tfmanager/migrate/config/2.0.0.yaml index 35cb8a9..ebe4e4e 100644 --- a/tfmanager/migrate/config/2.0.0.yaml +++ b/tfmanager/migrate/config/2.0.0.yaml @@ -85,6 +85,14 @@ renames: why: >- Tissue maps are not atlases: desc-tissues, as dhcpVol. What atlas-WHS and desc-Cerebrum3TissueLabels said goes into the JSON sidecar. + - id: tissues-WHS + template: tpl-WHS + match: {atlas: v3, res: '2', desc: null, suffix: dseg} + set: {atlas: null, desc: tissues} + count: 1 + why: >- + Not the v3 atlas but RESILIENT's tissue image made from it (1 GM, 2 WM, 3 CSF): + tissue maps are desc-tissues (yours, 2026-12-05). - id: tissues-Fischer344 template: tpl-Fischer344 match: {atlas: null, desc: null, suffix: dseg} @@ -296,21 +304,6 @@ tables: tpl-MNI152NLin2009cAsym_res-2_desc-carpet_dseg.nii.gz (checked 2026-12-04, e.g. label 1 at 35.4, 57.7, 48.0 for 35, 58, 48). why: The table of the carpet-plot segmentation; xyz kept, described (yours, 2026-12-04). - - id: FSL-Harvard-Oxford-xyz - count: {tpl-MNI152NLin6Asym: 2} - header: [index, name, xyz] - columns: {index: index, name: name, xyz: xyz} - describe: - xyz: - Description: >- - Centre of gravity of the label, in voxel coordinates of the 2 mm images, from - FSL's description of the Harvard-Oxford atlas (attributes x, y and z). - evidence: >- - FSL, "FSL XML atlas description file format" (fsl.fmrib.ox.ac.uk/fsl/docs/other/ - atlas_xml.html): x, y and z are "the coordinates of a pre-calculated - centre-of-gravity for this region", "specified as voxel coordinates, relative to - the first image" (the 2 mm probabilistic image). - why: The HOSPA and HOCPAL tables of FSL's Harvard-Oxford atlas; xyz kept, described. - id: fsaverage-GIFTI count: {tpl-fsaverage: 39} header: [index, hemi, name, color] @@ -420,6 +413,290 @@ tables: Description: Remarks of the atlas authors about the label. why: The label table of the VALiDATe29 atlas (label is the index). + # Lookup tables written from their upstream source (T02): `file` is under tables/ next to + # this config; `replace` says the template has a table there already, which is not + # converted. Each evidence names the upstream file, its sha256 and how the table was + # written from it; the label check validates every table against its images. + sources: + - id: 6Asym-HOCPAL + template: tpl-MNI152NLin6Asym + path: tpl-MNI152NLin6Asym_atlas-HOCPAL_dseg.tsv + file: tpl-MNI152NLin6Asym_atlas-HOCPAL_dseg.tsv + replace: true + describe: &ho-xyz + xyz: + Description: >- + Centre of gravity of the label, in voxel coordinates of the 2 mm images of + MNI152NLin6Asym, from FSL's description of the Harvard-Oxford atlas (attributes + x, y and z). + evidence: &hocpal >- + HarvardOxford-Cortical-Lateralized.xml (sha256 + c4dcb7830b9006dc2f1f62ddb29f890122b0638a7418e0f6fb736f85f678f61b) of FSL 5's atlases + as nilearn fetches them (www.nitrc.org/frs/download.php/9902/HarvardOxford.tgz, + sha256 43f3cf29ea8b019d15247428c9a26569045f0637d5c40d144da821a6c324cfcf; FSL's + data_atlases repository has no lateralized atlas). index is FSL's index + 1, the + value of FSL's maxprob images, to which the 2 mm HOCPAL dseg images of + MNI152NLin6Asym are voxel-identical (checked 2026-12-05); x, y and z are "the + coordinates of a pre-calculated centre-of-gravity for this region", "specified as + voxel coordinates" (fsl.fmrib.ox.ac.uk/fsl/docs/other/atlas_xml.html). + why: >- + The table had FSL's 0-based index and 52 of the 96 labels: each image had 43 to 45 + values without a row (M206). + - id: 6Asym-HOCPA + template: tpl-MNI152NLin6Asym + path: tpl-MNI152NLin6Asym_atlas-HOCPA_dseg.tsv + file: tpl-MNI152NLin6Asym_atlas-HOCPA_dseg.tsv + replace: true + describe: *ho-xyz + evidence: &hocpa >- + HarvardOxford-Cortical.xml of FSL's data_atlases repository, tag 2103.0 + (git.fmrib.ox.ac.uk/fsl/data_atlases, commit b3ad6133f7, sha256 + b8eb5ba5e787a4d3b442f75041f533f31b278a83e467bd2ab22438c1cff36581). index is FSL's + index + 1, the value of FSL's maxprob images, to which the 2 mm HOCPA dseg images of + MNI152NLin6Asym are voxel-identical (checked 2026-12-05). + why: The same rows, with FSL's centres of gravity like the other HO tables of the template. + - id: 6Asym-HOSPA + template: tpl-MNI152NLin6Asym + path: tpl-MNI152NLin6Asym_atlas-HOSPA_dseg.tsv + file: tpl-MNI152NLin6Asym_atlas-HOSPA_dseg.tsv + replace: true + describe: *ho-xyz + evidence: &hospa >- + HarvardOxford-Subcortical.xml of FSL's data_atlases repository, tag 2103.0 (commit + b3ad6133f7, sha256 4aa369944d514843a07b5e6febac0c844e76fc1980ab203a0021b083de699650). + index is FSL's index + 1, the value of FSL's maxprob images, to which the 2 mm HOSPA + dseg images of MNI152NLin6Asym are voxel-identical (checked 2026-12-05). + why: >- + FSL's current names (Brain-Stem; Left Lateral Ventricle, which FSL 5 spelt + Ventrical; no trailing spaces), and no Background row, like the other HO tables. + - id: 6Asym-HOCPAL-probseg + template: tpl-MNI152NLin6Asym + path: tpl-MNI152NLin6Asym_atlas-HOCPAL_probseg.tsv + file: tpl-MNI152NLin6Asym_atlas-HOCPAL_probseg.tsv + describe: *ho-xyz + evidence: *hocpal + why: &ho-empty >- + Volume k of FSL's 4D probability image is the label of FSL index k - 1. The + template's two probseg images of this atlas are all zeros (added 2019-05-08); the + WP5 PR of MNI152NLin6Asym replaces them with FSL's images (yours, 2026-12-05). + - id: 6Asym-HOCPA-probseg + template: tpl-MNI152NLin6Asym + path: tpl-MNI152NLin6Asym_atlas-HOCPA_probseg.tsv + file: tpl-MNI152NLin6Asym_atlas-HOCPA_probseg.tsv + describe: *ho-xyz + evidence: *hocpa + why: *ho-empty + - id: 6Asym-HOSPA-probseg + template: tpl-MNI152NLin6Asym + path: tpl-MNI152NLin6Asym_atlas-HOSPA_probseg.tsv + file: tpl-MNI152NLin6Asym_atlas-HOSPA_probseg.tsv + describe: *ho-xyz + evidence: *hospa + why: >- + Volume k of FSL's 4D probability image is the label of FSL index k - 1; each volume + of the template's HOSPA probseg correlates 1.0 with FSL's (checked 2026-12-05). + - id: 2009cAsym-HOCPAL + template: tpl-MNI152NLin2009cAsym + path: tpl-MNI152NLin2009cAsym_atlas-HOCPAL_dseg.tsv + file: tpl-MNI152NLin2009cAsym_atlas-HOCPAL_dseg.tsv + evidence: *hocpal + why: &ho2009 >- + FSL's atlas resampled to MNI152NLin2009cAsym (added 2019-05-12 with no table): the + same values, each label's centroid within 2.7 mm of the same label in + MNI152NLin6Asym (checked 2026-12-05). FSL's centres of gravity are voxels of + MNI152NLin6Asym: no xyz here (yours, 2026-12-05). + - id: 2009cAsym-HOCPA + template: tpl-MNI152NLin2009cAsym + path: tpl-MNI152NLin2009cAsym_atlas-HOCPA_dseg.tsv + file: tpl-MNI152NLin2009cAsym_atlas-HOCPA_dseg.tsv + evidence: *hocpa + why: *ho2009 + - id: 2009cAsym-HOSPA + template: tpl-MNI152NLin2009cAsym + path: tpl-MNI152NLin2009cAsym_atlas-HOSPA_dseg.tsv + file: tpl-MNI152NLin2009cAsym_atlas-HOSPA_dseg.tsv + evidence: *hospa + why: *ho2009 + - id: 2009cAsym-aseg + template: tpl-MNI152NLin2009cAsym + path: tpl-MNI152NLin2009cAsym_seg-aseg_dseg.tsv + file: tpl-MNI152NLin2009cAsym_seg-aseg_dseg.tsv + evidence: >- + FreeSurferColorLUT.txt of FreeSurfer 7.4.1 (github.com/freesurfer/freesurfer, tag + v7.4.1, distribution/FreeSurferColorLUT.txt, sha256 + a9c498ee1071b5f7f83e9b4a53e814d71aed767e2d97576e611572e5d1083815): names and colors + of the 44 values of the res-1 image, 0 included like the other FreeSurfer tables of + the template. + why: FreeSurfer's aseg of the template (added 2025-05-02 with no table). + - id: 2009cAsym-aseg-probseg + template: tpl-MNI152NLin2009cAsym + path: tpl-MNI152NLin2009cAsym_seg-aseg_probseg.tsv + file: tpl-MNI152NLin2009cAsym_seg-aseg_probseg.tsv + describe: + freesurfer_label: + Description: >- + The FreeSurfer label of the volume: its value in the seg-aseg dseg images and in + FreeSurferColorLUT.txt. + evidence: >- + From the data (checked 2026-12-05): volume k is the k-th of the 44 values of the + res-1 aseg dseg, in ascending order. 41 volumes put most of their probability mass + inside that label; for the other three (labels 30, 62 and 77, of 18, 9 and 253 + voxels), the label's highest mean probability is in that volume. Names and colors + from FreeSurfer 7.4.1's FreeSurferColorLUT.txt (sha256 + a9c498ee1071b5f7f83e9b4a53e814d71aed767e2d97576e611572e5d1083815). + why: >- + No upstream states the order of the 44 volumes: inferred from the data, with the + FreeSurfer label of each volume in a described column (yours, 2026-12-05). + - id: 2009cAsym-DKT31 + template: tpl-MNI152NLin2009cAsym + path: tpl-MNI152NLin2009cAsym_atlas-DKT31_dseg.tsv + file: tpl-MNI152NLin2009cAsym_atlas-DKT31_dseg.tsv + evidence: >- + The 96 values of the image are Mindboggle's DKT31 cortical labels and its non-cortical + labels (Klein and Tourville 2012, doi 10.3389/fnins.2012.00171; Klein et al. 2017, + doi 10.1371/journal.pcbi.1005350). Names and colors from FreeSurfer 7.4.1's + FreeSurferColorLUT.txt (sha256 + a9c498ee1071b5f7f83e9b4a53e814d71aed767e2d97576e611572e5d1083815); 91, 92 and 630 + to 632, which that table does not have, named as Mindboggle's labels.py comments + them (github.com/nipy/mindboggle, commit bc10812979, mindboggle/mio/labels.py, + sha256 c1c354cf854af7a79582ca5b5c5daea7c7b8400691375c3c3aa4be81def218b9), with no + color. + why: The DKT31 atlas of the template (added 2019-01-16 as desc-DKT31, with no table). + - id: 6Asym-HCP + template: tpl-MNI152NLin6Asym + path: tpl-MNI152NLin6Asym_atlas-HCP_dseg.tsv + file: tpl-MNI152NLin6Asym_atlas-HCP_dseg.tsv + evidence: >- + HCP Pipelines v6.0.0 (github.com/Washington-University/HCPpipelines, commit + d6e7b9e9e2), global/config/FreeSurferSubcorticalLabelTableLut.txt (sha256 + 9a3032695f9257246048353a202eb7b0c7f60c04972e2d5e5b42a0247cce757e): the 19 + subcortical structures of the greyordinates with their FreeSurfer values and colors, + exactly the values of the images. + why: The HCP subcortical segmentation (added 2019-11-22 with no table). + - id: 2009cAsym-MIAL67-probseg + template: tpl-MNI152NLin2009cAsym + path: tpl-MNI152NLin2009cAsym_atlas-MIAL67ThalamicNuclei_probseg.tsv + file: tpl-MNI152NLin2009cAsym_atlas-MIAL67ThalamicNuclei_probseg.tsv + evidence: >- + The template's MIAL67ThalamicNuclei dseg table, whose order the probseg follows: + each of the 14 volumes puts most of its probability mass in the dseg label of the + same number, and each label has its highest mean probability in that volume + (checked 2026-12-05). + why: The 4D probabilistic atlas of the thalamic nuclei (14 volumes) had no table. + - id: SUIT-Diedrichsen2009-probseg + template: tpl-SUIT + path: tpl-SUIT_atlas-Diedrichsen2009_probseg.tsv + file: tpl-SUIT_atlas-Diedrichsen2009_probseg.tsv + evidence: >- + The template's Diedrichsen2009 dseg table (34 lobules and nuclei): each label has its + highest mean probability in the volume of the same number (checked 2026-12-05); 33 + volumes also put most of their mass in that label, and volume 9 (vermis Crus I, 27 + voxels in the dseg) is spread over its neighbours. + why: The 4D probabilistic atlas of the cerebellum (34 volumes) had no table. + - id: MouseIn-CCFv3 + template: tpl-MouseIn + path: tpl-MouseIn_atlas-CCFv3_dseg.tsv + file: tpl-MouseIn_atlas-CCFv3_dseg.tsv + evidence: >- + The authors' table, tpl-MouseIn_atlas-CCFv3_desc-DC_dseg.tsv in the template's OSF + project (osf.io/szyqe, osf.io/download/u49fz, sha256 + 7c5c3ac9e0061c9d71b9ea944f5f5becb6c263761a29d109e0210d56114c6279): 71 labels, + exactly the values of the image. + why: The table was left out when the image was added (2022-04-14). + - id: UNCInfant-AAL + template: tpl-UNCInfant + path: tpl-UNCInfant_atlas-AAL_dseg.tsv + file: tpl-UNCInfant_atlas-AAL_dseg.tsv + evidence: >- + The release document of the UNC 0-1-2 infant atlases + (www.nitrc.org/frs/download.php/6367, sha256 + c890c70dc287b6df3e64b52d5a568c311ed309394a928ca06a155ab8b3c1de33), Table 2, "Regions + of interest (ROI) defined in the infant-AAL template": index, region and abbreviation + of the 90 regions, the values of the three images. + why: The AAL images of the three cohorts had no table. + - id: UNCInfant-cerebrum + template: tpl-UNCInfant + path: tpl-UNCInfant_desc-cerebrum_dseg.tsv + file: tpl-UNCInfant_desc-cerebrum_dseg.tsv + evidence: >- + The release document (www.nitrc.org/frs/download.php/6367) lists the segmentation + with the GM, WM and CSF probability maps but not its values. From the data (checked + 2026-12-05): 150 has its highest mean probability in GM (0.75 to 0.83) and 250 in WM + (0.70 to 0.76) in every cohort; 10 in CSF in cohorts 2 and 3 (0.46 and 0.36), and + in GM in the neonates (0.56, CSF 0.30), as the class that is neither. + why: The tissue maps of the three cohorts had no table. + - id: WHS-Osen2019 + template: tpl-WHS + path: tpl-WHS_atlas-Osen2019_dseg.tsv + file: tpl-WHS_atlas-Osen2019_dseg.tsv + evidence: >- + WHS_SD_rat_atlas_v3.label (www.nitrc.org/frs/download.php/11404, sha256 + 566395d9e7655ec9a8dbccc009b18bc0f94f3382f2ffdcb04c09cc256e88f6ed), the ITK-SNAP + label file of the v3 atlas, whose image (download.php/11403) the res-1 atlas of the + template is voxel for voxel (checked 2026-12-05). The image also has 165 voxels of + 44, which v3's file does not list; WHS_SD_rat_atlas_v2.label (download.php/9439, + sha256 8c41d9f834e83dc859a92abef77d3c69112576841ab320e58ef1cf3b8b362bb3) names it + "inner ear". + why: The v3 atlas (Osen et al. 2019) had no table; 44 takes v2's name (yours, 2026-12-05). + - id: WHS-cerebrum + template: tpl-WHS + path: tpl-WHS_atlas-Osen2019_desc-cerebrum_dseg.tsv + file: tpl-WHS_atlas-Osen2019_desc-cerebrum_dseg.tsv + evidence: >- + From the data (checked 2026-12-05), against the v3 atlas: no v3 structure is split + between values. 46 structures are wholly 1 (neocortex, hippocampal formation, + striatum, thalamus, olfactory bulb, colliculi and other gray matter), 23 wholly 2 + (corpus callosum, commissures, fornix, fimbria and other white matter, and the + ventricular system), and the others wholly 0. + why: >- + The two classes of the cerebrum, made from the v3 atlas (added 2020-03-03 with no + table) (yours, 2026-12-05). + - id: WHS-tissues + template: tpl-WHS + path: tpl-WHS_desc-tissues_dseg.tsv + file: tpl-WHS_desc-tissues_dseg.tsv + evidence: &resilient >- + MacNicol et al. 2021 (doi 10.3389/fninf.2021.669049): "Regions from the Waxholm + atlas third edition (Osen et al., 2019) were categorized as GM (1), WM (2), or + cerebrospinal fluid (CSF; 3)". Abbreviations and mapping from the common + image-derived labels of BIDS 1.11.0. + why: >- + The res-2 image named atlas-v3 is this tissue image, not the atlas: renamed + desc-tissues (yours, 2026-12-05). Its label 1 lies on gray structures (neocortex, + brainstem, cerebellar cortex), 2 on white matter (55% corpus callosum) and 3 on the + ventricles (checked 2026-12-05). + - id: RESILIENT-tissues + template: tpl-RESILIENT + path: tpl-RESILIENT_desc-tissues_dseg.tsv + file: tpl-RESILIENT_desc-tissues_dseg.tsv + evidence: *resilient + why: >- + The tissue maps of the four cohorts had no table. In each cohort, each label has its + highest mean probability in the matching probseg (checked 2026-12-05). + - id: Fischer344-tissues + template: tpl-Fischer344 + path: tpl-Fischer344_desc-tissues_dseg.tsv + file: tpl-Fischer344_desc-tissues_dseg.tsv + evidence: >- + Goerzen et al. 2020 (doi 10.1038/s41598-020-63965-x): priors "for each tissue type + (GM, WM, CSF, and other)", in that order, for the Atropos classification + (Fischer344_tissueClassification.nii.gz in Zenodo record 3900544, v4). Each label of + the image has a mean probability of 0.89 to 0.99 in the matching probseg (checked + 2026-12-05). Abbreviations and mapping from BIDS 1.11.0 (no common label for other). + why: The tissue map (renamed desc-tissues in PR 4) had no table. + - id: NMT31Sym-tissues + template: tpl-NMT31Sym + path: tpl-NMT31Sym_desc-tissues_dseg.tsv + file: tpl-NMT31Sym_desc-tissues_dseg.tsv + evidence: >- + Jung et al. 2021 (doi 10.1016/j.neuroimage.2021.117997), Table 2: five classes, CSF, + cortical GM, subcortical GM (scGM), WM and blood vasculature (BV), with their volumes + and intensities. Labels 1 to 5 of the image match them in that order (checked + 2026-12-05): 13,987, 38,252, 16,649, 22,581 and 336 mm3 at res-1 (Table 2: 12,476, + 38,225, 15,732, 23,405 and 158), and mean intensities of labels 1 to 4 in the + table's order. Abbreviations and mapping from BIDS 1.11.0 (no common label for BV). + why: The five-class tissue segmentation of NMT v2 had no table. + # Participants tables (T03): participant_id is sub- and the letters and digits of the # original identifier, which source_id keeps. participants: diff --git a/tfmanager/migrate/config/tables/tpl-Fischer344_desc-tissues_dseg.tsv b/tfmanager/migrate/config/tables/tpl-Fischer344_desc-tissues_dseg.tsv new file mode 100644 index 0000000..354e26e --- /dev/null +++ b/tfmanager/migrate/config/tables/tpl-Fischer344_desc-tissues_dseg.tsv @@ -0,0 +1,6 @@ +index name abbreviation mapping +0 Background BG 0 +1 Gray Matter GM 1 +2 White Matter WM 2 +3 Cerebrospinal Fluid CSF 3 +4 Other n/a n/a diff --git a/tfmanager/migrate/config/tables/tpl-MNI152NLin2009cAsym_atlas-DKT31_dseg.tsv b/tfmanager/migrate/config/tables/tpl-MNI152NLin2009cAsym_atlas-DKT31_dseg.tsv new file mode 100644 index 0000000..ae805bc --- /dev/null +++ b/tfmanager/migrate/config/tables/tpl-MNI152NLin2009cAsym_atlas-DKT31_dseg.tsv @@ -0,0 +1,97 @@ +index name color +4 Left-Lateral-Ventricle #781286 +5 Left-Inf-Lat-Vent #c43afa +6 Left-Cerebellum-Exterior #009400 +7 Left-Cerebellum-White-Matter #dcf8a4 +10 Left-Thalamus #00760e +11 Left-Caudate #7abadc +12 Left-Putamen #ec0db0 +13 Left-Pallidum #0c30ff +14 3rd-Ventricle #ccb68e +15 4th-Ventricle #2acca4 +16 Brain-Stem #779fb0 +17 Left-Hippocampus #dcd814 +18 Left-Amygdala #67ffff +24 CSF #3c3c3c +26 Left-Accumbens-area #ffa500 +28 Left-VentralDC #a52a2a +30 Left-vessel #a020f0 +43 Right-Lateral-Ventricle #781286 +44 Right-Inf-Lat-Vent #c43afa +45 Right-Cerebellum-Exterior #009400 +46 Right-Cerebellum-White-Matter #dcf8a4 +49 Right-Thalamus #00760e +50 Right-Caudate #7abadc +51 Right-Putamen #ec0db0 +52 Right-Pallidum #0d30ff +53 Right-Hippocampus #dcd814 +54 Right-Amygdala #67ffff +58 Right-Accumbens-area #ffa500 +60 Right-VentralDC #a52a2a +91 left basal forebrain n/a +92 right basal forebrain n/a +630 cerebellar vermal lobules I-V n/a +631 cerebellar vermal lobules VI-VII n/a +632 cerebellar vermal lobules VIII-X n/a +1002 ctx-lh-caudalanteriorcingulate #7d64a0 +1003 ctx-lh-caudalmiddlefrontal #641900 +1005 ctx-lh-cuneus #dc1464 +1006 ctx-lh-entorhinal #dc140a +1007 ctx-lh-fusiform #b4dc8c +1008 ctx-lh-inferiorparietal #dc3cdc +1009 ctx-lh-inferiortemporal #b42878 +1010 ctx-lh-isthmuscingulate #8c148c +1011 ctx-lh-lateraloccipital #141e8c +1012 ctx-lh-lateralorbitofrontal #234b32 +1013 ctx-lh-lingual #e18c8c +1014 ctx-lh-medialorbitofrontal #c8234b +1015 ctx-lh-middletemporal #a06432 +1016 ctx-lh-parahippocampal #14dc3c +1017 ctx-lh-paracentral #3cdc3c +1018 ctx-lh-parsopercularis #dcb48c +1019 ctx-lh-parsorbitalis #146432 +1020 ctx-lh-parstriangularis #dc3c14 +1021 ctx-lh-pericalcarine #78643c +1022 ctx-lh-postcentral #dc1414 +1023 ctx-lh-posteriorcingulate #dcb4dc +1024 ctx-lh-precentral #3c14dc +1025 ctx-lh-precuneus #a08cb4 +1026 ctx-lh-rostralanteriorcingulate #50148c +1027 ctx-lh-rostralmiddlefrontal #4b327d +1028 ctx-lh-superiorfrontal #14dca0 +1029 ctx-lh-superiorparietal #14b48c +1030 ctx-lh-superiortemporal #8cdcdc +1031 ctx-lh-supramarginal #50a014 +1034 ctx-lh-transversetemporal #9696c8 +1035 ctx-lh-insula #ffc020 +2002 ctx-rh-caudalanteriorcingulate #7d64a0 +2003 ctx-rh-caudalmiddlefrontal #641900 +2005 ctx-rh-cuneus #dc1464 +2006 ctx-rh-entorhinal #dc140a +2007 ctx-rh-fusiform #b4dc8c +2008 ctx-rh-inferiorparietal #dc3cdc +2009 ctx-rh-inferiortemporal #b42878 +2010 ctx-rh-isthmuscingulate #8c148c +2011 ctx-rh-lateraloccipital #141e8c +2012 ctx-rh-lateralorbitofrontal #234b32 +2013 ctx-rh-lingual #e18c8c +2014 ctx-rh-medialorbitofrontal #c8234b +2015 ctx-rh-middletemporal #a06432 +2016 ctx-rh-parahippocampal #14dc3c +2017 ctx-rh-paracentral #3cdc3c +2018 ctx-rh-parsopercularis #dcb48c +2019 ctx-rh-parsorbitalis #146432 +2020 ctx-rh-parstriangularis #dc3c14 +2021 ctx-rh-pericalcarine #78643c +2022 ctx-rh-postcentral #dc1414 +2023 ctx-rh-posteriorcingulate #dcb4dc +2024 ctx-rh-precentral #3c14dc +2025 ctx-rh-precuneus #a08cb4 +2026 ctx-rh-rostralanteriorcingulate #50148c +2027 ctx-rh-rostralmiddlefrontal #4b327d +2028 ctx-rh-superiorfrontal #14dca0 +2029 ctx-rh-superiorparietal #14b48c +2030 ctx-rh-superiortemporal #8cdcdc +2031 ctx-rh-supramarginal #50a014 +2034 ctx-rh-transversetemporal #9696c8 +2035 ctx-rh-insula #ffc020 diff --git a/tfmanager/migrate/config/tables/tpl-MNI152NLin2009cAsym_atlas-HOCPAL_dseg.tsv b/tfmanager/migrate/config/tables/tpl-MNI152NLin2009cAsym_atlas-HOCPAL_dseg.tsv new file mode 100644 index 0000000..c99e587 --- /dev/null +++ b/tfmanager/migrate/config/tables/tpl-MNI152NLin2009cAsym_atlas-HOCPAL_dseg.tsv @@ -0,0 +1,97 @@ +index name +1 Left Frontal Pole +2 Right Frontal Pole +3 Left Insular Cortex +4 Right Insular Cortex +5 Left Superior Frontal Gyrus +6 Right Superior Frontal Gyrus +7 Left Middle Frontal Gyrus +8 Right Middle Frontal Gyrus +9 Left Inferior Frontal Gyrus, pars triangularis +10 Right Inferior Frontal Gyrus, pars triangularis +11 Left Inferior Frontal Gyrus, pars opercularis +12 Right Inferior Frontal Gyrus, pars opercularis +13 Left Precentral Gyrus +14 Right Precentral Gyrus +15 Left Temporal Pole +16 Right Temporal Pole +17 Left Superior Temporal Gyrus, anterior division +18 Right Superior Temporal Gyrus, anterior division +19 Left Superior Temporal Gyrus, posterior division +20 Right Superior Temporal Gyrus, posterior division +21 Left Middle Temporal Gyrus, anterior division +22 Right Middle Temporal Gyrus, anterior division +23 Left Middle Temporal Gyrus, posterior division +24 Right Middle Temporal Gyrus, posterior division +25 Left Middle Temporal Gyrus, temporooccipital part +26 Right Middle Temporal Gyrus, temporooccipital part +27 Left Inferior Temporal Gyrus, anterior division +28 Right Inferior Temporal Gyrus, anterior division +29 Left Inferior Temporal Gyrus, posterior division +30 Right Inferior Temporal Gyrus, posterior division +31 Left Inferior Temporal Gyrus, temporooccipital part +32 Right Inferior Temporal Gyrus, temporooccipital part +33 Left Postcentral Gyrus +34 Right Postcentral Gyrus +35 Left Superior Parietal Lobule +36 Right Superior Parietal Lobule +37 Left Supramarginal Gyrus, anterior division +38 Right Supramarginal Gyrus, anterior division +39 Left Supramarginal Gyrus, posterior division +40 Right Supramarginal Gyrus, posterior division +41 Left Angular Gyrus +42 Right Angular Gyrus +43 Left Lateral Occipital Cortex, superior division +44 Right Lateral Occipital Cortex, superior division +45 Left Lateral Occipital Cortex, inferior division +46 Right Lateral Occipital Cortex, inferior division +47 Left Intracalcarine Cortex +48 Right Intracalcarine Cortex +49 Left Frontal Medial Cortex +50 Right Frontal Medial Cortex +51 Left Juxtapositional Lobule Cortex (formerly Supplementary Motor Cortex) +52 Right Juxtapositional Lobule Cortex (formerly Supplementary Motor Cortex) +53 Left Subcallosal Cortex +54 Right Subcallosal Cortex +55 Left Paracingulate Gyrus +56 Right Paracingulate Gyrus +57 Left Cingulate Gyrus, anterior division +58 Right Cingulate Gyrus, anterior division +59 Left Cingulate Gyrus, posterior division +60 Right Cingulate Gyrus, posterior division +61 Left Precuneous Cortex +62 Right Precuneous Cortex +63 Left Cuneal Cortex +64 Right Cuneal Cortex +65 Left Frontal Orbital Cortex +66 Right Frontal Orbital Cortex +67 Left Parahippocampal Gyrus, anterior division +68 Right Parahippocampal Gyrus, anterior division +69 Left Parahippocampal Gyrus, posterior division +70 Right Parahippocampal Gyrus, posterior division +71 Left Lingual Gyrus +72 Right Lingual Gyrus +73 Left Temporal Fusiform Cortex, anterior division +74 Right Temporal Fusiform Cortex, anterior division +75 Left Temporal Fusiform Cortex, posterior division +76 Right Temporal Fusiform Cortex, posterior division +77 Left Temporal Occipital Fusiform Cortex +78 Right Temporal Occipital Fusiform Cortex +79 Left Occipital Fusiform Gyrus +80 Right Occipital Fusiform Gyrus +81 Left Frontal Operculum Cortex +82 Right Frontal Operculum Cortex +83 Left Central Opercular Cortex +84 Right Central Opercular Cortex +85 Left Parietal Operculum Cortex +86 Right Parietal Operculum Cortex +87 Left Planum Polare +88 Right Planum Polare +89 Left Heschl's Gyrus (includes H1 and H2) +90 Right Heschl's Gyrus (includes H1 and H2) +91 Left Planum Temporale +92 Right Planum Temporale +93 Left Supracalcarine Cortex +94 Right Supracalcarine Cortex +95 Left Occipital Pole +96 Right Occipital Pole diff --git a/tfmanager/migrate/config/tables/tpl-MNI152NLin2009cAsym_atlas-HOCPA_dseg.tsv b/tfmanager/migrate/config/tables/tpl-MNI152NLin2009cAsym_atlas-HOCPA_dseg.tsv new file mode 100644 index 0000000..fa5845e --- /dev/null +++ b/tfmanager/migrate/config/tables/tpl-MNI152NLin2009cAsym_atlas-HOCPA_dseg.tsv @@ -0,0 +1,49 @@ +index name +1 Frontal Pole +2 Insular Cortex +3 Superior Frontal Gyrus +4 Middle Frontal Gyrus +5 Inferior Frontal Gyrus, pars triangularis +6 Inferior Frontal Gyrus, pars opercularis +7 Precentral Gyrus +8 Temporal Pole +9 Superior Temporal Gyrus, anterior division +10 Superior Temporal Gyrus, posterior division +11 Middle Temporal Gyrus, anterior division +12 Middle Temporal Gyrus, posterior division +13 Middle Temporal Gyrus, temporooccipital part +14 Inferior Temporal Gyrus, anterior division +15 Inferior Temporal Gyrus, posterior division +16 Inferior Temporal Gyrus, temporooccipital part +17 Postcentral Gyrus +18 Superior Parietal Lobule +19 Supramarginal Gyrus, anterior division +20 Supramarginal Gyrus, posterior division +21 Angular Gyrus +22 Lateral Occipital Cortex, superior division +23 Lateral Occipital Cortex, inferior division +24 Intracalcarine Cortex +25 Frontal Medial Cortex +26 Juxtapositional Lobule Cortex (formerly Supplementary Motor Cortex) +27 Subcallosal Cortex +28 Paracingulate Gyrus +29 Cingulate Gyrus, anterior division +30 Cingulate Gyrus, posterior division +31 Precuneous Cortex +32 Cuneal Cortex +33 Frontal Orbital Cortex +34 Parahippocampal Gyrus, anterior division +35 Parahippocampal Gyrus, posterior division +36 Lingual Gyrus +37 Temporal Fusiform Cortex, anterior division +38 Temporal Fusiform Cortex, posterior division +39 Temporal Occipital Fusiform Cortex +40 Occipital Fusiform Gyrus +41 Frontal Operculum Cortex +42 Central Opercular Cortex +43 Parietal Operculum Cortex +44 Planum Polare +45 Heschl's Gyrus (includes H1 and H2) +46 Planum Temporale +47 Supracalcarine Cortex +48 Occipital Pole diff --git a/tfmanager/migrate/config/tables/tpl-MNI152NLin2009cAsym_atlas-HOSPA_dseg.tsv b/tfmanager/migrate/config/tables/tpl-MNI152NLin2009cAsym_atlas-HOSPA_dseg.tsv new file mode 100644 index 0000000..4471e5f --- /dev/null +++ b/tfmanager/migrate/config/tables/tpl-MNI152NLin2009cAsym_atlas-HOSPA_dseg.tsv @@ -0,0 +1,22 @@ +index name +1 Left Cerebral White Matter +2 Left Cerebral Cortex +3 Left Lateral Ventricle +4 Left Thalamus +5 Left Caudate +6 Left Putamen +7 Left Pallidum +8 Brain-Stem +9 Left Hippocampus +10 Left Amygdala +11 Left Accumbens +12 Right Cerebral White Matter +13 Right Cerebral Cortex +14 Right Lateral Ventricle +15 Right Thalamus +16 Right Caudate +17 Right Putamen +18 Right Pallidum +19 Right Hippocampus +20 Right Amygdala +21 Right Accumbens diff --git a/tfmanager/migrate/config/tables/tpl-MNI152NLin2009cAsym_atlas-MIAL67ThalamicNuclei_probseg.tsv b/tfmanager/migrate/config/tables/tpl-MNI152NLin2009cAsym_atlas-MIAL67ThalamicNuclei_probseg.tsv new file mode 100644 index 0000000..8dc0294 --- /dev/null +++ b/tfmanager/migrate/config/tables/tpl-MNI152NLin2009cAsym_atlas-MIAL67ThalamicNuclei_probseg.tsv @@ -0,0 +1,15 @@ +index name color +1 thal-lh-pulvinar #ff0000 +2 thal-lh-ventral-anterior #00ff00 +3 thal-lh-mediodorsal #ffff00 +4 thal-lh-lateral-posterior-ventral-posterior-group #ff7b00 +5 thal-lh-pulvinar-medial-centrolateral-group #00ffff +6 thal-lh-ventrolateral #ff00ff +7 thal-lh-ventral-posterior-ventrolateral-group #0000ff +8 thal-rh-pulvinar #ff0000 +9 thal-rh-ventral-anterior #00ff00 +10 thal-rh-mediodorsal #ffff00 +11 thal-rh-lateral-posterior-ventral-posterior-group #ff7b00 +12 thal-rh-pulvinar-medial-centrolateral-group #00ffff +13 thal-rh-ventrolateral #ff00ff +14 thal-rh-ventral-posterior-ventrolateral-group #0000ff diff --git a/tfmanager/migrate/config/tables/tpl-MNI152NLin2009cAsym_seg-aseg_dseg.tsv b/tfmanager/migrate/config/tables/tpl-MNI152NLin2009cAsym_seg-aseg_dseg.tsv new file mode 100644 index 0000000..70d68f6 --- /dev/null +++ b/tfmanager/migrate/config/tables/tpl-MNI152NLin2009cAsym_seg-aseg_dseg.tsv @@ -0,0 +1,45 @@ +index name color +0 Unknown #000000 +2 Left-Cerebral-White-Matter #f5f5f5 +3 Left-Cerebral-Cortex #cd3e4e +4 Left-Lateral-Ventricle #781286 +5 Left-Inf-Lat-Vent #c43afa +7 Left-Cerebellum-White-Matter #dcf8a4 +8 Left-Cerebellum-Cortex #e69422 +10 Left-Thalamus #00760e +11 Left-Caudate #7abadc +12 Left-Putamen #ec0db0 +13 Left-Pallidum #0c30ff +14 3rd-Ventricle #ccb68e +15 4th-Ventricle #2acca4 +16 Brain-Stem #779fb0 +17 Left-Hippocampus #dcd814 +18 Left-Amygdala #67ffff +24 CSF #3c3c3c +26 Left-Accumbens-area #ffa500 +28 Left-VentralDC #a52a2a +30 Left-vessel #a020f0 +31 Left-choroid-plexus #00c8c8 +41 Right-Cerebral-White-Matter #f5f5f5 +42 Right-Cerebral-Cortex #cd3e4e +43 Right-Lateral-Ventricle #781286 +44 Right-Inf-Lat-Vent #c43afa +46 Right-Cerebellum-White-Matter #dcf8a4 +47 Right-Cerebellum-Cortex #e69422 +49 Right-Thalamus #00760e +50 Right-Caudate #7abadc +51 Right-Putamen #ec0db0 +52 Right-Pallidum #0d30ff +53 Right-Hippocampus #dcd814 +54 Right-Amygdala #67ffff +58 Right-Accumbens-area #ffa500 +60 Right-VentralDC #a52a2a +62 Right-vessel #a020f0 +63 Right-choroid-plexus #00c8dd +77 WM-hypointensities #c846ff +85 Optic-Chiasm #eaa91e +251 CC_Posterior #000040 +252 CC_Mid_Posterior #000070 +253 CC_Central #0000a0 +254 CC_Mid_Anterior #0000d0 +255 CC_Anterior #0000ff diff --git a/tfmanager/migrate/config/tables/tpl-MNI152NLin2009cAsym_seg-aseg_probseg.tsv b/tfmanager/migrate/config/tables/tpl-MNI152NLin2009cAsym_seg-aseg_probseg.tsv new file mode 100644 index 0000000..23113ce --- /dev/null +++ b/tfmanager/migrate/config/tables/tpl-MNI152NLin2009cAsym_seg-aseg_probseg.tsv @@ -0,0 +1,45 @@ +index name color freesurfer_label +1 Unknown #000000 0 +2 Left-Cerebral-White-Matter #f5f5f5 2 +3 Left-Cerebral-Cortex #cd3e4e 3 +4 Left-Lateral-Ventricle #781286 4 +5 Left-Inf-Lat-Vent #c43afa 5 +6 Left-Cerebellum-White-Matter #dcf8a4 7 +7 Left-Cerebellum-Cortex #e69422 8 +8 Left-Thalamus #00760e 10 +9 Left-Caudate #7abadc 11 +10 Left-Putamen #ec0db0 12 +11 Left-Pallidum #0c30ff 13 +12 3rd-Ventricle #ccb68e 14 +13 4th-Ventricle #2acca4 15 +14 Brain-Stem #779fb0 16 +15 Left-Hippocampus #dcd814 17 +16 Left-Amygdala #67ffff 18 +17 CSF #3c3c3c 24 +18 Left-Accumbens-area #ffa500 26 +19 Left-VentralDC #a52a2a 28 +20 Left-vessel #a020f0 30 +21 Left-choroid-plexus #00c8c8 31 +22 Right-Cerebral-White-Matter #f5f5f5 41 +23 Right-Cerebral-Cortex #cd3e4e 42 +24 Right-Lateral-Ventricle #781286 43 +25 Right-Inf-Lat-Vent #c43afa 44 +26 Right-Cerebellum-White-Matter #dcf8a4 46 +27 Right-Cerebellum-Cortex #e69422 47 +28 Right-Thalamus #00760e 49 +29 Right-Caudate #7abadc 50 +30 Right-Putamen #ec0db0 51 +31 Right-Pallidum #0d30ff 52 +32 Right-Hippocampus #dcd814 53 +33 Right-Amygdala #67ffff 54 +34 Right-Accumbens-area #ffa500 58 +35 Right-VentralDC #a52a2a 60 +36 Right-vessel #a020f0 62 +37 Right-choroid-plexus #00c8dd 63 +38 WM-hypointensities #c846ff 77 +39 Optic-Chiasm #eaa91e 85 +40 CC_Posterior #000040 251 +41 CC_Mid_Posterior #000070 252 +42 CC_Central #0000a0 253 +43 CC_Mid_Anterior #0000d0 254 +44 CC_Anterior #0000ff 255 diff --git a/tfmanager/migrate/config/tables/tpl-MNI152NLin6Asym_atlas-HCP_dseg.tsv b/tfmanager/migrate/config/tables/tpl-MNI152NLin6Asym_atlas-HCP_dseg.tsv new file mode 100644 index 0000000..4accb34 --- /dev/null +++ b/tfmanager/migrate/config/tables/tpl-MNI152NLin6Asym_atlas-HCP_dseg.tsv @@ -0,0 +1,20 @@ +index name color +8 CEREBELLUM_LEFT #e69422 +10 THALAMUS_LEFT #00760e +11 CAUDATE_LEFT #7abadc +12 PUTAMEN_LEFT #ec0db0 +13 PALLIDUM_LEFT #0c30ff +16 BRAIN_STEM #779fb0 +17 HIPPOCAMPUS_LEFT #dcd814 +18 AMYGDALA_LEFT #67ffff +26 ACCUMBENS_LEFT #ffa500 +28 DIENCEPHALON_VENTRAL_LEFT #a52a2a +47 CEREBELLUM_RIGHT #e69422 +49 THALAMUS_RIGHT #00760e +50 CAUDATE_RIGHT #7abadc +51 PUTAMEN_RIGHT #ec0db0 +52 PALLIDUM_RIGHT #0d30ff +53 HIPPOCAMPUS_RIGHT #dcd814 +54 AMYGDALA_RIGHT #67ffff +58 ACCUMBENS_RIGHT #ffa500 +60 DIENCEPHALON_VENTRAL_RIGHT #a52a2a diff --git a/tfmanager/migrate/config/tables/tpl-MNI152NLin6Asym_atlas-HOCPAL_dseg.tsv b/tfmanager/migrate/config/tables/tpl-MNI152NLin6Asym_atlas-HOCPAL_dseg.tsv new file mode 100644 index 0000000..2f09f4f --- /dev/null +++ b/tfmanager/migrate/config/tables/tpl-MNI152NLin6Asym_atlas-HOCPAL_dseg.tsv @@ -0,0 +1,97 @@ +index name xyz +1 Left Frontal Pole 63, 86, 49 +2 Right Frontal Pole 21, 86, 33 +3 Left Insular Cortex 64, 69, 32 +4 Right Insular Cortex 26, 70, 32 +5 Left Superior Frontal Gyrus 47, 75, 66 +6 Right Superior Frontal Gyrus 43, 80, 61 +7 Left Middle Frontal Gyrus 65, 78, 55 +8 Right Middle Frontal Gyrus 26, 77, 59 +9 Left Inferior Frontal Gyrus, pars triangularis 72, 77, 41 +10 Right Inferior Frontal Gyrus, pars triangularis 17, 77, 38 +11 Left Inferior Frontal Gyrus, pars opercularis 73, 70, 42 +12 Right Inferior Frontal Gyrus, pars opercularis 16, 71, 43 +13 Left Precentral Gyrus 73, 62, 56 +14 Right Precentral Gyrus 14, 65, 50 +15 Left Temporal Pole 57, 67, 19 +16 Right Temporal Pole 33, 68, 19 +17 Left Superior Temporal Gyrus, anterior division 74, 63, 32 +18 Right Superior Temporal Gyrus, anterior division 15, 64, 32 +19 Left Superior Temporal Gyrus, posterior division 78, 51, 37 +20 Right Superior Temporal Gyrus, posterior division 11, 52, 38 +21 Left Middle Temporal Gyrus, anterior division 75, 62, 24 +22 Right Middle Temporal Gyrus, anterior division 15, 63, 22 +23 Left Middle Temporal Gyrus, posterior division 78, 46, 31 +24 Right Middle Temporal Gyrus, posterior division 11, 54, 29 +25 Left Middle Temporal Gyrus, temporooccipital part 77, 37, 35 +26 Right Middle Temporal Gyrus, temporooccipital part 12, 40, 36 +27 Left Inferior Temporal Gyrus, anterior division 69, 61, 15 +28 Right Inferior Temporal Gyrus, anterior division 21, 63, 15 +29 Left Inferior Temporal Gyrus, posterior division 70, 45, 23 +30 Right Inferior Temporal Gyrus, posterior division 17, 54, 20 +31 Left Inferior Temporal Gyrus, temporooccipital part 73, 37, 25 +32 Right Inferior Temporal Gyrus, temporooccipital part 16, 37, 26 +33 Left Postcentral Gyrus 77, 57, 50 +34 Right Postcentral Gyrus 12, 58, 46 +35 Left Superior Parietal Lobule 62, 39, 69 +36 Right Superior Parietal Lobule 28, 40, 69 +37 Left Supramarginal Gyrus, anterior division 75, 46, 57 +38 Right Supramarginal Gyrus, anterior division 13, 50, 56 +39 Left Supramarginal Gyrus, posterior division 74, 39, 56 +40 Right Supramarginal Gyrus, posterior division 13, 43, 50 +41 Left Angular Gyrus 74, 35, 47 +42 Right Angular Gyrus 15, 37, 46 +43 Left Lateral Occipital Cortex, superior division 67, 24, 52 +44 Right Lateral Occipital Cortex, superior division 19, 30, 51 +45 Left Lateral Occipital Cortex, inferior division 71, 26, 36 +46 Right Lateral Occipital Cortex, inferior division 18, 29, 36 +47 Left Intracalcarine Cortex 49, 25, 42 +48 Right Intracalcarine Cortex 39, 27, 41 +49 Left Frontal Medial Cortex 46, 85, 26 +50 Right Frontal Medial Cortex 44, 84, 27 +51 Left Juxtapositional Lobule Cortex (formerly Supplementary Motor Cortex) 46, 60, 64 +52 Right Juxtapositional Lobule Cortex (formerly Supplementary Motor Cortex) 43, 63, 65 +53 Left Subcallosal Cortex 47, 75, 31 +54 Right Subcallosal Cortex 44, 74, 31 +55 Left Paracingulate Gyrus 47, 81, 52 +56 Right Paracingulate Gyrus 43, 84, 49 +57 Left Cingulate Gyrus, anterior division 46, 81, 41 +58 Right Cingulate Gyrus, anterior division 43, 81, 42 +59 Left Cingulate Gyrus, posterior division 46, 45, 52 +60 Right Cingulate Gyrus, posterior division 43, 46, 54 +61 Left Precuneous Cortex 46, 33, 58 +62 Right Precuneous Cortex 43, 36, 60 +63 Left Cuneal Cortex 46, 21, 52 +64 Right Cuneal Cortex 43, 22, 49 +65 Left Frontal Orbital Cortex 53, 69, 26 +66 Right Frontal Orbital Cortex 34, 76, 26 +67 Left Parahippocampal Gyrus, anterior division 54, 61, 21 +68 Right Parahippocampal Gyrus, anterior division 35, 62, 20 +69 Left Parahippocampal Gyrus, posterior division 55, 49, 25 +70 Right Parahippocampal Gyrus, posterior division 35, 47, 28 +71 Left Lingual Gyrus 53, 39, 32 +72 Right Lingual Gyrus 36, 41, 31 +73 Left Temporal Fusiform Cortex, anterior division 60, 62, 14 +74 Right Temporal Fusiform Cortex, anterior division 30, 62, 14 +75 Left Temporal Fusiform Cortex, posterior division 61, 46, 24 +76 Right Temporal Fusiform Cortex, posterior division 27, 49, 23 +77 Left Temporal Occipital Fusiform Cortex 61, 37, 27 +78 Right Temporal Occipital Fusiform Cortex 27, 39, 26 +79 Left Occipital Fusiform Gyrus 58, 27, 29 +80 Right Occipital Fusiform Gyrus 31, 27, 29 +81 Left Frontal Operculum Cortex 63, 72, 40 +82 Right Frontal Operculum Cortex 25, 73, 38 +83 Left Central Opercular Cortex 66, 58, 43 +84 Right Central Opercular Cortex 22, 57, 43 +85 Left Parietal Operculum Cortex 67, 47, 45 +86 Right Parietal Operculum Cortex 23, 50, 46 +87 Left Planum Polare 67, 61, 29 +88 Right Planum Polare 23, 63, 28 +89 Left Heschl's Gyrus (includes H1 and H2) 66, 51, 42 +90 Right Heschl's Gyrus (includes H1 and H2) 24, 53, 41 +91 Left Planum Temporale 66, 46, 41 +92 Right Planum Temporale 22, 48, 43 +93 Left Supracalcarine Cortex 45, 22, 41 +94 Right Supracalcarine Cortex 43, 24, 44 +95 Left Occipital Pole 50, 13, 33 +96 Right Occipital Pole 37, 12, 38 diff --git a/tfmanager/migrate/config/tables/tpl-MNI152NLin6Asym_atlas-HOCPAL_probseg.tsv b/tfmanager/migrate/config/tables/tpl-MNI152NLin6Asym_atlas-HOCPAL_probseg.tsv new file mode 100644 index 0000000..2f09f4f --- /dev/null +++ b/tfmanager/migrate/config/tables/tpl-MNI152NLin6Asym_atlas-HOCPAL_probseg.tsv @@ -0,0 +1,97 @@ +index name xyz +1 Left Frontal Pole 63, 86, 49 +2 Right Frontal Pole 21, 86, 33 +3 Left Insular Cortex 64, 69, 32 +4 Right Insular Cortex 26, 70, 32 +5 Left Superior Frontal Gyrus 47, 75, 66 +6 Right Superior Frontal Gyrus 43, 80, 61 +7 Left Middle Frontal Gyrus 65, 78, 55 +8 Right Middle Frontal Gyrus 26, 77, 59 +9 Left Inferior Frontal Gyrus, pars triangularis 72, 77, 41 +10 Right Inferior Frontal Gyrus, pars triangularis 17, 77, 38 +11 Left Inferior Frontal Gyrus, pars opercularis 73, 70, 42 +12 Right Inferior Frontal Gyrus, pars opercularis 16, 71, 43 +13 Left Precentral Gyrus 73, 62, 56 +14 Right Precentral Gyrus 14, 65, 50 +15 Left Temporal Pole 57, 67, 19 +16 Right Temporal Pole 33, 68, 19 +17 Left Superior Temporal Gyrus, anterior division 74, 63, 32 +18 Right Superior Temporal Gyrus, anterior division 15, 64, 32 +19 Left Superior Temporal Gyrus, posterior division 78, 51, 37 +20 Right Superior Temporal Gyrus, posterior division 11, 52, 38 +21 Left Middle Temporal Gyrus, anterior division 75, 62, 24 +22 Right Middle Temporal Gyrus, anterior division 15, 63, 22 +23 Left Middle Temporal Gyrus, posterior division 78, 46, 31 +24 Right Middle Temporal Gyrus, posterior division 11, 54, 29 +25 Left Middle Temporal Gyrus, temporooccipital part 77, 37, 35 +26 Right Middle Temporal Gyrus, temporooccipital part 12, 40, 36 +27 Left Inferior Temporal Gyrus, anterior division 69, 61, 15 +28 Right Inferior Temporal Gyrus, anterior division 21, 63, 15 +29 Left Inferior Temporal Gyrus, posterior division 70, 45, 23 +30 Right Inferior Temporal Gyrus, posterior division 17, 54, 20 +31 Left Inferior Temporal Gyrus, temporooccipital part 73, 37, 25 +32 Right Inferior Temporal Gyrus, temporooccipital part 16, 37, 26 +33 Left Postcentral Gyrus 77, 57, 50 +34 Right Postcentral Gyrus 12, 58, 46 +35 Left Superior Parietal Lobule 62, 39, 69 +36 Right Superior Parietal Lobule 28, 40, 69 +37 Left Supramarginal Gyrus, anterior division 75, 46, 57 +38 Right Supramarginal Gyrus, anterior division 13, 50, 56 +39 Left Supramarginal Gyrus, posterior division 74, 39, 56 +40 Right Supramarginal Gyrus, posterior division 13, 43, 50 +41 Left Angular Gyrus 74, 35, 47 +42 Right Angular Gyrus 15, 37, 46 +43 Left Lateral Occipital Cortex, superior division 67, 24, 52 +44 Right Lateral Occipital Cortex, superior division 19, 30, 51 +45 Left Lateral Occipital Cortex, inferior division 71, 26, 36 +46 Right Lateral Occipital Cortex, inferior division 18, 29, 36 +47 Left Intracalcarine Cortex 49, 25, 42 +48 Right Intracalcarine Cortex 39, 27, 41 +49 Left Frontal Medial Cortex 46, 85, 26 +50 Right Frontal Medial Cortex 44, 84, 27 +51 Left Juxtapositional Lobule Cortex (formerly Supplementary Motor Cortex) 46, 60, 64 +52 Right Juxtapositional Lobule Cortex (formerly Supplementary Motor Cortex) 43, 63, 65 +53 Left Subcallosal Cortex 47, 75, 31 +54 Right Subcallosal Cortex 44, 74, 31 +55 Left Paracingulate Gyrus 47, 81, 52 +56 Right Paracingulate Gyrus 43, 84, 49 +57 Left Cingulate Gyrus, anterior division 46, 81, 41 +58 Right Cingulate Gyrus, anterior division 43, 81, 42 +59 Left Cingulate Gyrus, posterior division 46, 45, 52 +60 Right Cingulate Gyrus, posterior division 43, 46, 54 +61 Left Precuneous Cortex 46, 33, 58 +62 Right Precuneous Cortex 43, 36, 60 +63 Left Cuneal Cortex 46, 21, 52 +64 Right Cuneal Cortex 43, 22, 49 +65 Left Frontal Orbital Cortex 53, 69, 26 +66 Right Frontal Orbital Cortex 34, 76, 26 +67 Left Parahippocampal Gyrus, anterior division 54, 61, 21 +68 Right Parahippocampal Gyrus, anterior division 35, 62, 20 +69 Left Parahippocampal Gyrus, posterior division 55, 49, 25 +70 Right Parahippocampal Gyrus, posterior division 35, 47, 28 +71 Left Lingual Gyrus 53, 39, 32 +72 Right Lingual Gyrus 36, 41, 31 +73 Left Temporal Fusiform Cortex, anterior division 60, 62, 14 +74 Right Temporal Fusiform Cortex, anterior division 30, 62, 14 +75 Left Temporal Fusiform Cortex, posterior division 61, 46, 24 +76 Right Temporal Fusiform Cortex, posterior division 27, 49, 23 +77 Left Temporal Occipital Fusiform Cortex 61, 37, 27 +78 Right Temporal Occipital Fusiform Cortex 27, 39, 26 +79 Left Occipital Fusiform Gyrus 58, 27, 29 +80 Right Occipital Fusiform Gyrus 31, 27, 29 +81 Left Frontal Operculum Cortex 63, 72, 40 +82 Right Frontal Operculum Cortex 25, 73, 38 +83 Left Central Opercular Cortex 66, 58, 43 +84 Right Central Opercular Cortex 22, 57, 43 +85 Left Parietal Operculum Cortex 67, 47, 45 +86 Right Parietal Operculum Cortex 23, 50, 46 +87 Left Planum Polare 67, 61, 29 +88 Right Planum Polare 23, 63, 28 +89 Left Heschl's Gyrus (includes H1 and H2) 66, 51, 42 +90 Right Heschl's Gyrus (includes H1 and H2) 24, 53, 41 +91 Left Planum Temporale 66, 46, 41 +92 Right Planum Temporale 22, 48, 43 +93 Left Supracalcarine Cortex 45, 22, 41 +94 Right Supracalcarine Cortex 43, 24, 44 +95 Left Occipital Pole 50, 13, 33 +96 Right Occipital Pole 37, 12, 38 diff --git a/tfmanager/migrate/config/tables/tpl-MNI152NLin6Asym_atlas-HOCPA_dseg.tsv b/tfmanager/migrate/config/tables/tpl-MNI152NLin6Asym_atlas-HOCPA_dseg.tsv new file mode 100644 index 0000000..c2f35f2 --- /dev/null +++ b/tfmanager/migrate/config/tables/tpl-MNI152NLin6Asym_atlas-HOCPA_dseg.tsv @@ -0,0 +1,49 @@ +index name xyz +1 Frontal Pole 48, 94, 35 +2 Insular Cortex 25, 70, 32 +3 Superior Frontal Gyrus 33, 73, 63 +4 Middle Frontal Gyrus 25, 72, 55 +5 Inferior Frontal Gyrus, pars triangularis 20, 77, 40 +6 Inferior Frontal Gyrus, pars opercularis 20, 71, 47 +7 Precentral Gyrus 44, 51, 68 +8 Temporal Pole 61, 69, 17 +9 Superior Temporal Gyrus, anterior division 73, 59, 32 +10 Superior Temporal Gyrus, posterior division 75, 52, 35 +11 Middle Temporal Gyrus, anterior division 74, 59, 26 +12 Middle Temporal Gyrus, posterior division 14, 51, 30 +13 Middle Temporal Gyrus, temporooccipital part 72, 35, 38 +14 Inferior Temporal Gyrus, anterior division 22, 61, 16 +15 Inferior Temporal Gyrus, posterior division 70, 42, 26 +16 Inferior Temporal Gyrus, temporooccipital part 70, 35, 29 +17 Postcentral Gyrus 52, 42, 69 +18 Superior Parietal Lobule 28, 39, 63 +19 Supramarginal Gyrus, anterior division 73, 48, 53 +20 Supramarginal Gyrus, posterior division 72, 39, 51 +21 Angular Gyrus 21, 37, 55 +22 Lateral Occipital Cortex, superior division 60, 28, 57 +23 Lateral Occipital Cortex, inferior division 68, 28, 38 +24 Intracalcarine Cortex 47, 23, 40 +25 Frontal Medial Cortex 45, 84, 27 +26 Juxtapositional Lobule Cortex (formerly Supplementary Motor Cortex) 45, 63, 63 +27 Subcallosal Cortex 46, 74, 27 +28 Paracingulate Gyrus 45, 80, 52 +29 Cingulate Gyrus, anterior division 45, 61, 57 +30 Cingulate Gyrus, posterior division 44, 42, 54 +31 Precuneous Cortex 45, 31, 55 +32 Cuneal Cortex 45, 23, 49 +33 Frontal Orbital Cortex 25, 77, 29 +34 Parahippocampal Gyrus, anterior division 57, 62, 18 +35 Parahippocampal Gyrus, posterior division 58, 45, 28 +36 Lingual Gyrus 41, 22, 33 +37 Temporal Fusiform Cortex, anterior division 62, 61, 15 +38 Temporal Fusiform Cortex, posterior division 64, 47, 24 +39 Temporal Occipital Fusiform Cortex 62, 37, 29 +40 Occipital Fusiform Gyrus 33, 23, 30 +41 Frontal Operculum Cortex 66, 74, 37 +42 Central Opercular Cortex 19, 61, 40 +43 Parietal Operculum Cortex 17, 50, 47 +44 Planum Polare 20, 60, 36 +45 Heschl's Gyrus (includes H1 and H2) 67, 52, 39 +46 Planum Temporale 74, 53, 40 +47 Supracalcarine Cortex 44, 21, 42 +48 Occipital Pole 37, 15, 34 diff --git a/tfmanager/migrate/config/tables/tpl-MNI152NLin6Asym_atlas-HOCPA_probseg.tsv b/tfmanager/migrate/config/tables/tpl-MNI152NLin6Asym_atlas-HOCPA_probseg.tsv new file mode 100644 index 0000000..c2f35f2 --- /dev/null +++ b/tfmanager/migrate/config/tables/tpl-MNI152NLin6Asym_atlas-HOCPA_probseg.tsv @@ -0,0 +1,49 @@ +index name xyz +1 Frontal Pole 48, 94, 35 +2 Insular Cortex 25, 70, 32 +3 Superior Frontal Gyrus 33, 73, 63 +4 Middle Frontal Gyrus 25, 72, 55 +5 Inferior Frontal Gyrus, pars triangularis 20, 77, 40 +6 Inferior Frontal Gyrus, pars opercularis 20, 71, 47 +7 Precentral Gyrus 44, 51, 68 +8 Temporal Pole 61, 69, 17 +9 Superior Temporal Gyrus, anterior division 73, 59, 32 +10 Superior Temporal Gyrus, posterior division 75, 52, 35 +11 Middle Temporal Gyrus, anterior division 74, 59, 26 +12 Middle Temporal Gyrus, posterior division 14, 51, 30 +13 Middle Temporal Gyrus, temporooccipital part 72, 35, 38 +14 Inferior Temporal Gyrus, anterior division 22, 61, 16 +15 Inferior Temporal Gyrus, posterior division 70, 42, 26 +16 Inferior Temporal Gyrus, temporooccipital part 70, 35, 29 +17 Postcentral Gyrus 52, 42, 69 +18 Superior Parietal Lobule 28, 39, 63 +19 Supramarginal Gyrus, anterior division 73, 48, 53 +20 Supramarginal Gyrus, posterior division 72, 39, 51 +21 Angular Gyrus 21, 37, 55 +22 Lateral Occipital Cortex, superior division 60, 28, 57 +23 Lateral Occipital Cortex, inferior division 68, 28, 38 +24 Intracalcarine Cortex 47, 23, 40 +25 Frontal Medial Cortex 45, 84, 27 +26 Juxtapositional Lobule Cortex (formerly Supplementary Motor Cortex) 45, 63, 63 +27 Subcallosal Cortex 46, 74, 27 +28 Paracingulate Gyrus 45, 80, 52 +29 Cingulate Gyrus, anterior division 45, 61, 57 +30 Cingulate Gyrus, posterior division 44, 42, 54 +31 Precuneous Cortex 45, 31, 55 +32 Cuneal Cortex 45, 23, 49 +33 Frontal Orbital Cortex 25, 77, 29 +34 Parahippocampal Gyrus, anterior division 57, 62, 18 +35 Parahippocampal Gyrus, posterior division 58, 45, 28 +36 Lingual Gyrus 41, 22, 33 +37 Temporal Fusiform Cortex, anterior division 62, 61, 15 +38 Temporal Fusiform Cortex, posterior division 64, 47, 24 +39 Temporal Occipital Fusiform Cortex 62, 37, 29 +40 Occipital Fusiform Gyrus 33, 23, 30 +41 Frontal Operculum Cortex 66, 74, 37 +42 Central Opercular Cortex 19, 61, 40 +43 Parietal Operculum Cortex 17, 50, 47 +44 Planum Polare 20, 60, 36 +45 Heschl's Gyrus (includes H1 and H2) 67, 52, 39 +46 Planum Temporale 74, 53, 40 +47 Supracalcarine Cortex 44, 21, 42 +48 Occipital Pole 37, 15, 34 diff --git a/tfmanager/migrate/config/tables/tpl-MNI152NLin6Asym_atlas-HOSPA_dseg.tsv b/tfmanager/migrate/config/tables/tpl-MNI152NLin6Asym_atlas-HOSPA_dseg.tsv new file mode 100644 index 0000000..005fa1f --- /dev/null +++ b/tfmanager/migrate/config/tables/tpl-MNI152NLin6Asym_atlas-HOSPA_dseg.tsv @@ -0,0 +1,22 @@ +index name xyz +1 Left Cerebral White Matter 58, 37, 50 +2 Left Cerebral Cortex 70, 63, 35 +3 Left Lateral Ventricle 57, 40, 41 +4 Left Thalamus 51, 51, 39 +5 Left Caudate 51, 71, 38 +6 Left Putamen 56, 67, 34 +7 Left Pallidum 54, 62, 35 +8 Brain-Stem 44, 49, 18 +9 Left Hippocampus 59, 54, 27 +10 Left Amygdala 57, 61, 27 +11 Left Accumbens 50, 70, 33 +12 Right Cerebral White Matter 29, 38, 51 +13 Right Cerebral Cortex 25, 42, 61 +14 Right Lateral Ventricle 35, 45, 44 +15 Right Thalamus 38, 51, 39 +16 Right Caudate 39, 72, 37 +17 Right Putamen 34, 68, 34 +18 Right Pallidum 35, 61, 35 +19 Right Hippocampus 31, 57, 25 +20 Right Amygdala 32, 63, 25 +21 Right Accumbens 40, 69, 32 diff --git a/tfmanager/migrate/config/tables/tpl-MNI152NLin6Asym_atlas-HOSPA_probseg.tsv b/tfmanager/migrate/config/tables/tpl-MNI152NLin6Asym_atlas-HOSPA_probseg.tsv new file mode 100644 index 0000000..005fa1f --- /dev/null +++ b/tfmanager/migrate/config/tables/tpl-MNI152NLin6Asym_atlas-HOSPA_probseg.tsv @@ -0,0 +1,22 @@ +index name xyz +1 Left Cerebral White Matter 58, 37, 50 +2 Left Cerebral Cortex 70, 63, 35 +3 Left Lateral Ventricle 57, 40, 41 +4 Left Thalamus 51, 51, 39 +5 Left Caudate 51, 71, 38 +6 Left Putamen 56, 67, 34 +7 Left Pallidum 54, 62, 35 +8 Brain-Stem 44, 49, 18 +9 Left Hippocampus 59, 54, 27 +10 Left Amygdala 57, 61, 27 +11 Left Accumbens 50, 70, 33 +12 Right Cerebral White Matter 29, 38, 51 +13 Right Cerebral Cortex 25, 42, 61 +14 Right Lateral Ventricle 35, 45, 44 +15 Right Thalamus 38, 51, 39 +16 Right Caudate 39, 72, 37 +17 Right Putamen 34, 68, 34 +18 Right Pallidum 35, 61, 35 +19 Right Hippocampus 31, 57, 25 +20 Right Amygdala 32, 63, 25 +21 Right Accumbens 40, 69, 32 diff --git a/tfmanager/migrate/config/tables/tpl-MouseIn_atlas-CCFv3_dseg.tsv b/tfmanager/migrate/config/tables/tpl-MouseIn_atlas-CCFv3_dseg.tsv new file mode 100644 index 0000000..22a4f57 --- /dev/null +++ b/tfmanager/migrate/config/tables/tpl-MouseIn_atlas-CCFv3_dseg.tsv @@ -0,0 +1,72 @@ +index name +1 amygdala +2 arbor vitae +3 auditory cortex +4 bed nuclei +5 cerebellar cortex +6 cerebellar nuclei +7 cerebellar white matter +8 cerebral aqueduct +9 choroid plexus +10 cingulate cortex +11 claustrum +12 corpus callosum +13 cortical subplate +14 diagonal band +15 dorsal peduncular area +16 entorhinal cortex +17 fiber tracts +18 fimbria fornix +19 flocculus +20 fourth ventricle +21 frontal cortex +22 gustatory and visceral cortex +23 habenula +24 hippocampus +25 hypothalamus +26 inferior colliculus +27 infralimbic cortex +28 insular cortex +29 internal capsule +30 lateral geniculate +31 lateral ventricle +32 medial geniculate +33 medulla +34 midbrain +35 midbrain white matter +36 motor cortex +37 nodulus +38 nucleus accumbens +39 nucleus of posterior commussure +40 olfactory cortex +41 olfactory tracts +42 optic tract +43 orbital cortex +44 pallidum +45 parietal cortex +46 pedunculopontine nucleus +47 periaqueductal gray +48 perirhinal cortex +49 piriform cortex +50 pons +51 postrhinal cortex +52 prelimbic cortex +53 pretectal +54 raphe +55 red nucleus +56 reticular nucleus +57 retrosplenial cortex +58 secondary sensory cortex +59 sensory cortex +60 septum +61 stria terminalis tracts +62 striatum +63 subiculum +64 substantia nigra +65 superior colliculus +66 taenia tecta +67 thalamus +68 third ventricle +69 visual cortex +70 white matter +71 zona incerta diff --git a/tfmanager/migrate/config/tables/tpl-NMT31Sym_desc-tissues_dseg.tsv b/tfmanager/migrate/config/tables/tpl-NMT31Sym_desc-tissues_dseg.tsv new file mode 100644 index 0000000..c38e3a9 --- /dev/null +++ b/tfmanager/migrate/config/tables/tpl-NMT31Sym_desc-tissues_dseg.tsv @@ -0,0 +1,7 @@ +index name abbreviation mapping +0 Background BG 0 +1 Cerebrospinal Fluid CSF 3 +2 Cortical Gray Matter CGM 8 +3 Subcortical Gray Matter SGM 9 +4 White Matter WM 2 +5 Large Blood Vasculature BV n/a diff --git a/tfmanager/migrate/config/tables/tpl-RESILIENT_desc-tissues_dseg.tsv b/tfmanager/migrate/config/tables/tpl-RESILIENT_desc-tissues_dseg.tsv new file mode 100644 index 0000000..71861fe --- /dev/null +++ b/tfmanager/migrate/config/tables/tpl-RESILIENT_desc-tissues_dseg.tsv @@ -0,0 +1,5 @@ +index name abbreviation mapping +0 Background BG 0 +1 Gray Matter GM 1 +2 White Matter WM 2 +3 Cerebrospinal Fluid CSF 3 diff --git a/tfmanager/migrate/config/tables/tpl-SUIT_atlas-Diedrichsen2009_probseg.tsv b/tfmanager/migrate/config/tables/tpl-SUIT_atlas-Diedrichsen2009_probseg.tsv new file mode 100644 index 0000000..2dc2ba1 --- /dev/null +++ b/tfmanager/migrate/config/tables/tpl-SUIT_atlas-Diedrichsen2009_probseg.tsv @@ -0,0 +1,35 @@ +index name color +1 Left_I_IV #ccff00 +2 Right_I_IV #b8e600 +3 Left_V #00e65c +4 Right_V #00ff66 +5 Left_VI #0066ff +6 Vermis_VI #0052cc +7 Right_VI #0066ff +8 Left_CrusI #cc00ff +9 Vermis_CrusI #a200cc +10 Right_CrusI #cc00ff +11 Left_CrusII #ff0000 +12 Vermis_CrusII #cc0000 +13 Right_CrusII #ff0000 +14 Left_VIIb #ff9900 +15 Vermis_VIIb #cc7900 +16 Right_VIIb #ff9900 +17 Left_VIIIa #33ff00 +18 Vermis_VIIIa #29cc00 +19 Right_VIIIa #33ff00 +20 Left_VIIIb #00ffff +21 Vermis_VIIIb #00cccc +22 Right_VIIIb #00ffff +23 Left_IX #3300ff +24 Vermis_IX #2900cc +25 Right_IX #3300ff +26 Left_X #ff0099 +27 Vermis_X #cc0079 +28 Right_X #ff0099 +29 Left_Dentate #4c4c4c +30 Right_Dentate #4c4c4c +31 Left_Interposed #7f7f7f +32 Right_Interposed #7f7f7f +33 Left_Fastigial #b2b2b2 +34 Right_Fastigial #b2b2b2 diff --git a/tfmanager/migrate/config/tables/tpl-UNCInfant_atlas-AAL_dseg.tsv b/tfmanager/migrate/config/tables/tpl-UNCInfant_atlas-AAL_dseg.tsv new file mode 100644 index 0000000..f284429 --- /dev/null +++ b/tfmanager/migrate/config/tables/tpl-UNCInfant_atlas-AAL_dseg.tsv @@ -0,0 +1,91 @@ +index name abbreviation +1 Precentral gyrus left PreCG-L +2 Precentral gyrus right PreCG-R +3 Superior frontal gyrus (dorsal) left SFGdor-L +4 Superior frontal gyrus (dorsal) right SFGdor-R +5 Orbitofrontal cortex (superior) left ORBsup-L +6 Orbitofrontal cortex (superior) right ORBsup-R +7 Middle frontal gyrus left MFG-L +8 Middle frontal gyrus right MFG-R +9 Orbitofrontal cortex (middle) left ORBmid-L +10 Orbitofrontal cortex (middle) right ORBmid-R +11 Inferior frontal gyrus (opercular) left IFGoperc-L +12 Inferior frontal gyrus (opercular) right IFGoperc-R +13 Inferior frontal gyrus (triangular) left IFGtriang-L +14 Inferior frontal gyrus (triangular) right IFGtriang-R +15 Orbitofrontal cortex (inferior) left ORBinf-L +16 Orbitofrontal cortex (inferior) right ORBinf-R +17 Rolandic operculum left ROL-L +18 Rolandic operculum right ROL-R +19 Supplementary motor area left SMA-L +20 Supplementary motor area right SMA-R +21 Olfactory left OLF-L +22 Olfactory right OLF-R +23 Superior frontal gyrus (medial) left SFGmed-L +24 Superior frontal gyrus (medial) right SFGmed-R +25 Orbitofrontal cortex (medial) left ORBmed-L +26 Orbitofrontal cortex (medial) right ORBmed-R +27 Rectus gyrus left REC-L +28 Rectus gyrus right REC-R +29 Insula left INS-L +30 Insula right INS-R +31 Anterior cingulate gyrus left ACG-L +32 Anterior cingulate gyrus right ACG-R +33 Middle cingulate gyrus left MCG-L +34 Middle cingulate gyrus right MCG-R +35 Posterior cingulate gyrus left PCG-L +36 Posterior cingulate gyrus right PCG-R +37 Hippocampus left HIP-L +38 Hippocampus right HIP-R +39 ParaHippocampal gyrus left PHG-L +40 ParaHippocampal gyrus right PHG-R +41 Amygdala left AMYG-L +42 Amygdala right AMYG-R +43 Calcarine cortex left CAL-L +44 Calcarine cortex right CAL-R +45 Cuneus left CUN-L +46 Cuneus right CUN-R +47 Lingual gyrus left LING-L +48 Lingual gyrus right LING-R +49 Superior occipital gyrus left SOG-L +50 Superior occipital gyrus right SOG-R +51 Middle occipital gyrus left MOG-L +52 Middle occipital gyrus right MOG-R +53 Inferior occipital gyrus left IOG-L +54 Inferior occipital gyrus right IOG-R +55 Fusiform gyrus left FFG-L +56 Fusiform gyrus right FFG-R +57 Postcentral gyrus left PoCG-L +58 Postcentral gyrus right PoCG-R +59 Superior parietal gyrus left SPG-L +60 Superior parietal gyrus right SPG-R +61 Inferior parietal lobule left IPL-L +62 Inferior parietal lobule right IPL-R +63 Supramarginal gyrus left SMG-L +64 Supramarginal gyrus right SMG-R +65 Angular gyrus left ANG-L +66 Angular gyrus right ANG-R +67 Precuneus left PCUN-L +68 Precuneus right PCUN-R +69 Paracentral lobule left PCL-L +70 Paracentral lobule right PCL-R +71 Caudate left CAU-L +72 Caudate right CAU-R +73 Putamen left PUT-L +74 Putamen right PUT-R +75 Pallidum left PAL-L +76 Pallidum right PAL-R +77 Thalamus left THA-L +78 Thalamus right THA-R +79 Heschl gyrus left HES-L +80 Heschl gyrus right HES-R +81 Superior temporal gyrus left STG-L +82 Superior temporal gyrus right STG-R +83 Temporal pole (superior) left TPOsup-L +84 Temporal pole (superior) right TPOsup-R +85 Middle temporal gyrus left MTG-L +86 Middle temporal gyrus right MTG-R +87 Temporal pole (middle) left TPOmid-L +88 Temporal pole (middle) right TPOmid-R +89 Inferior temporal gyrus left ITG-L +90 Inferior temporal gyrus right ITG-R diff --git a/tfmanager/migrate/config/tables/tpl-UNCInfant_desc-cerebrum_dseg.tsv b/tfmanager/migrate/config/tables/tpl-UNCInfant_desc-cerebrum_dseg.tsv new file mode 100644 index 0000000..cf12161 --- /dev/null +++ b/tfmanager/migrate/config/tables/tpl-UNCInfant_desc-cerebrum_dseg.tsv @@ -0,0 +1,5 @@ +index name abbreviation mapping +0 Background BG 0 +10 Cerebrospinal Fluid CSF 3 +150 Gray Matter GM 1 +250 White Matter WM 2 diff --git a/tfmanager/migrate/config/tables/tpl-WHS_atlas-Osen2019_desc-cerebrum_dseg.tsv b/tfmanager/migrate/config/tables/tpl-WHS_atlas-Osen2019_desc-cerebrum_dseg.tsv new file mode 100644 index 0000000..0de0285 --- /dev/null +++ b/tfmanager/migrate/config/tables/tpl-WHS_atlas-Osen2019_desc-cerebrum_dseg.tsv @@ -0,0 +1,4 @@ +index name abbreviation mapping +0 Background BG 0 +1 Gray Matter GM 1 +2 White Matter and Ventricular System n/a n/a diff --git a/tfmanager/migrate/config/tables/tpl-WHS_atlas-Osen2019_dseg.tsv b/tfmanager/migrate/config/tables/tpl-WHS_atlas-Osen2019_dseg.tsv new file mode 100644 index 0000000..e1dc715 --- /dev/null +++ b/tfmanager/migrate/config/tables/tpl-WHS_atlas-Osen2019_dseg.tsv @@ -0,0 +1,120 @@ +index name color +1 descending corticofugal pathways #ff3427 +2 substantia nigra #ffba00 +3 subthalamic nucleus #0000ff +4 molecular layer of the cerebellum #ffff00 +5 granule cell level of the cerebellum #00ffff +6 alveus of the hippocampus #ff00ff +7 inferior cerebellar peduncle #34ff0d +10 cingulate cortex, area 2 #1d68eb +30 striatum #814fff +31 globus pallidus #ff91ba +32 entopeduncular nucleus #1ae7ff +33 ventricular system #022cff +34 medial lemniscus #d4ff00 +35 facial nerve #ff19f0 +36 anterior commissure, anterior part #7cfc00 +37 anterior commissure, posterior part #ffba00 +38 ventral hippocampal commissure #ae00e8 +39 thalamus #006400 +40 septal region #ff0800 +41 optic nerve #30da00 +42 optic tract and optic chiasm #267eff +43 pineal gland #daaa3e +44 inner ear #00a515 +45 spinal cord #86ff5a +46 commissure of the superior colliculus #21e6ff +47 brainstem #9953ff +48 hypothalamic region #e278a1 +50 superficial gray layer of the superior colliculus #5600dd +51 periaqueductal gray #07ff59 +52 fornix #15c0ff +53 mammillothalamic tract #eeba00 +54 commissural stria terminalis #adff2f +55 deeper layers of the superior colliculus #e1970f +56 periventricular gray #eb57ff +57 genu of the facial nerve #faf4f7 +58 pontine nuclei #00d70b +59 fimbria of the hippocampus #00ff1d +60 fasciculus retroflexus #f44345 +61 stria medullaris of the thalamus #00ff00 +62 stria terminalis #ee7533 +63 posterior commissure #ff00da +64 glomerular layer of the accessory olfactory bulb #0f6de6 +65 glomerular layer of the olfactory bulb #ffe300 +66 olfactory bulb #ff8700 +67 corpus callosum and associated subcortical white matter #ff6e00 +68 brachium of the superior colliculus #bc20ad +69 inferior colliculus, commissure #ff2a27 +70 central canal #27f4fd +71 interpeduncular nucleus #3fc0ff +72 ascending fibers of the facial nerve #b31c35 +73 anterior commissure #ff4fce +74 inferior olive #00f60e +75 spinal trigeminal nucleus #5bf1ff +76 spinal trigeminal tract #fa8072 +77 frontal association cortex #ced307 +78 middle cerebellar peduncle #86cc4c +79 transverse fibers of the pons #80aaff +80 habenular commissure #45ebca +81 nucleus of the stria medullaris #de07ed +82 basal forebrain region #e1f00d +83 supraoptic decussation #faaa40 +84 medial lemniscus decussation #4196ff +85 pyramidal decussation #7209d4 +92 neocortex #03c12d +93 bed nucleus of the stria terminalis #0008b6 +94 pretectal region #ff571e +95 cornu ammonis 3 #a5836b +96 dentate gyrus #5b2d0a +97 cornu ammonis 2 #ffff00 +98 cornu ammonis 1 #d9680d +99 fasciola cinereum #ff0000 +100 subiculum #ffc000 +108 postrhinal cortex #287082 +109 presubiculum #507baf +110 parasubiculum #173660 +112 perirhinal area 35 #cd33ff +113 perirhinal area 36 #7030a0 +114 entorhinal cortex #7abb33 +115 lateral entorhinal cortex #5a6f2f +119 vestibular apparatus #009037 +120 cochlea #00ff1d +121 cochlear nerve #fd9400 +122 vestibular nerve #fd3200 +123 ventral cochlear nucleus, granule cell layer #000cff +125 4th ventricle #341d90 +126 dorsal cochlear nucleus, molecular layer #5c9cd3 +127 dorsal cochlear nucleus, fusiform and granule layer #00509c +128 dorsal cochlear nucleus, deep core #c5eeff +129 acoustic striae #ffd900 +130 trapezoid body #d5ff00 +131 nucleus of the trapezoid body #00ff51 +132 superior paraolivary nucleus #00eeff +133 medial superior olive #dbef3d +134 lateral superior olive #234cbe +135 superior periolivary region #019915 +136 ventral periolivary nuclei #00aeff +137 lateral lemniscus, ventral nucleus #ff0073 +138 lateral lemniscus, intermediate nucleus #ab105b +139 lateral lemniscus, dorsal nucleus #6c125b +140 lateral lemniscus, commissure #ff1d00 +141 lateral lemniscus #ffa600 +142 inferior colliculus, dorsal cortex #ceff8e +143 inferior colliculus, central nucleus #00eeff +145 inferior colliculus, external cortex #3088cb +146 inferior colliculus, brachium #b03a48 +147 medial geniculate body, medial division #0af4d9 +148 medial geniculate body, dorsal division #efa300 +149 medial geniculate body, ventral division #833a1f +150 medial geniculate body, marginal zone #ff2ff2 +151 primary auditory cortex #ffd700 +152 secondary auditory cortex, dorsal area #f0ffff +153 secondary auditory cortex, ventral area #d8bfd8 +157 auditory radiation #f49cff +158 ventral cochlear nucleus, anterior part #2298ff +159 ventral cochlear nucleus, posterior part #00e6cf +160 ventral cochlear nucleus, cap area #00ff6a +162 spiral ganglion #b9ffe9 +163 nucleus sagulum #63cd00 +164 reticular thalamic nucleus, auditory segment #6e00ff diff --git a/tfmanager/migrate/config/tables/tpl-WHS_desc-tissues_dseg.tsv b/tfmanager/migrate/config/tables/tpl-WHS_desc-tissues_dseg.tsv new file mode 100644 index 0000000..71861fe --- /dev/null +++ b/tfmanager/migrate/config/tables/tpl-WHS_desc-tissues_dseg.tsv @@ -0,0 +1,5 @@ +index name abbreviation mapping +0 Background BG 0 +1 Gray Matter GM 1 +2 White Matter WM 2 +3 Cerebrospinal Fluid CSF 3 diff --git a/tfmanager/migrate/lookups.py b/tfmanager/migrate/lookups.py index ba1aaa5..ea300c4 100644 --- a/tfmanager/migrate/lookups.py +++ b/tfmanager/migrate/lookups.py @@ -256,14 +256,16 @@ def plan_tables( findings: list[Finding] = [] layouts = config.layouts_for(template) used: dict[str, int] = defaultdict(int) - converted: set[str] = set() + sources = config.sources_for(template) + replaced = {s.path for s in sources if s.replace} # T02 rewrites them: not converted + converted: set[str] = {s.path for s in sources} ctx = Context(tree=MappingTree(template, dict(files)), mode='strict') for path in sorted(files, key=str.encode): f = parse(path) data = files[path] if not (f.is_bids and f.suffix in SEGMENTATIONS and f.extension == '.tsv'): continue - if data is None: + if data is None or path in replaced: continue lines = _lines(data) header = tuple(c.strip() for c in lines[0].split('\t')) if lines else () @@ -370,6 +372,8 @@ def _sources(template: str, files: dict, write: Write, config: Config) -> list[F """T02: lookup tables written from their upstream source.""" findings = [] for source in config.sources_for(template): + if files.get(source.path) == source.data: + continue # written already (planning a migrated template) there = source.path in files if there != source.replace: what = 'already has' if there else 'has no' diff --git a/tfmanager/tests/data/renames-2.0.0.tsv b/tfmanager/tests/data/renames-2.0.0.tsv index 30b5571..698e03e 100644 --- a/tfmanager/tests/data/renames-2.0.0.tsv +++ b/tfmanager/tests/data/renames-2.0.0.tsv @@ -1308,7 +1308,7 @@ tpl-WHS/tpl-WHS_res-1_atlas-v3_desc-origBrain_mask.nii.gz tpl-WHS/tpl-WHS_atlas- tpl-WHS/tpl-WHS_res-1_atlas-v3_dseg.nii.gz tpl-WHS/tpl-WHS_atlas-Osen2019_res-1_dseg.nii.gz R01 R99 tpl-WHS/tpl-WHS_res-2_atlas-v3_desc-brain_mask.nii.gz tpl-WHS/tpl-WHS_atlas-Osen2019_res-2_desc-brain_mask.nii.gz R01 R99 tpl-WHS/tpl-WHS_res-2_atlas-v3_desc-origBrain_mask.nii.gz tpl-WHS/tpl-WHS_atlas-Osen2019_res-2_desc-origBrain_mask.nii.gz R01 R99 -tpl-WHS/tpl-WHS_res-2_atlas-v3_dseg.nii.gz tpl-WHS/tpl-WHS_atlas-Osen2019_res-2_dseg.nii.gz R01 R99 +tpl-WHS/tpl-WHS_res-2_atlas-v3_dseg.nii.gz tpl-WHS/tpl-WHS_res-2_desc-tissues_dseg.nii.gz tissues-WHS tpl-WHS/tpl-WHS_res-2_desc-brain_probseg.nii.gz tpl-WHS/tpl-WHS_res-2_label-brain_probseg.nii.gz R21 tpl-dhcpAsym/cohort-36/tpl-dhcpAsym_cohort-36_hemi-L_den-32k_label.gii tpl-dhcpAsym/cohort-36/tpl-dhcpAsym_cohort-36_hemi-L_den-32k_dseg.label.gii dhcpAsym-parcellation tpl-dhcpAsym/cohort-36/tpl-dhcpAsym_cohort-36_hemi-L_den-32k_myelinmap.func.gii tpl-dhcpAsym/cohort-36/tpl-dhcpAsym_cohort-36_hemi-L_den-32k_myelinmap.shape.gii R18 diff --git a/tfmanager/tests/test_migrate_content.py b/tfmanager/tests/test_migrate_content.py index 41528de..69b5e5b 100644 --- a/tfmanager/tests/test_migrate_content.py +++ b/tfmanager/tests/test_migrate_content.py @@ -339,18 +339,16 @@ def test_golden_res(archive): def test_archive(archive): - """What the transforms write; the errors that remain (PR 5b2, 5c, WP5). - - MNI152NLin6Asym is blocked by its HOCPAL table (labels without rows), rebuilt in PR 5b2. - """ + """What the transforms write; the errors that remain (PR 5c, WP5).""" snapshots, plans = archive - assert [name for name, p in plans.items() if p.blocked] == ['tpl-MNI152NLin6Asym'] + assert [name for name, p in plans.items() if p.blocked] == [] assert {name for name, p in plans.items() if p.content.flip} == set() done = Counter( c for p in plans.values() for codes in p.content.transforms.values() for c in codes ) assert done == { - 'T01': 140, + 'T01': 137, + 'T02': 31, 'T03': 4, 'T05': 7, 'T06': 28, @@ -362,12 +360,12 @@ def test_archive(archive): ) # fmt: off assert errors == { - 'TF301': 9, 'TF310': 50, 'TF314': 30, 'TF340': 24, 'TF401': 42, 'TF407': 12, + 'TF301': 9, 'TF310': 50, 'TF314': 30, 'TF340': 24, 'TF502': 41, 'TF504': 6, 'TF505': 24, 'TF601': 11, 'TF608': 11, } findings = Counter(f.code for p in plans.values() for f in p.findings) assert findings == { - 'M201': 24, 'M202': 54, 'M205': 30, 'M206': 6, 'M207': 6, 'M208': 6, 'M210': 2, + 'M201': 24, 'M205': 30, 'M207': 6, 'M208': 6, 'M210': 2, } # fmt: on frozen = sorted(f'{n}/{o}' for n, p in plans.items() for o, v in p.rows.items() if v == NA) diff --git a/tfmanager/tests/test_migrate_names.py b/tfmanager/tests/test_migrate_names.py index 12c4684..7870479 100644 --- a/tfmanager/tests/test_migrate_names.py +++ b/tfmanager/tests/test_migrate_names.py @@ -506,14 +506,14 @@ def test_archive_rules(archive): fired = Counter(r for p in plans.values() for rules in p.rules.values() for r in rules) # fmt: off assert fired == { - 'R01': 11, 'R02': 1, 'R03': 96, 'R04': 25, 'R05': 36, 'R06': 36, 'R07': 15, + 'R01': 10, 'R02': 1, 'R03': 96, 'R04': 25, 'R05': 36, 'R06': 36, 'R07': 15, 'R08': 3, 'R09': 6, 'R10': 2, 'R11': 1, 'R12': 161, 'R13': 831, 'R14': 1, 'R15': 2, 'R16': 243, 'R17': 12, 'R18': 18, 'R19': 30, 'R20': 8, 'R21': 2, 'R22': 1, - 'R99': 1270, 'empty-HOSPA-probseg': 1, + 'R99': 1269, 'empty-HOSPA-probseg': 1, 'res_assign': 2, 'NMT31Sym-stacks': 6, 'dhcpAsym-cortex': 18, 'dhcpAsym-parcellation': 18, 'drop-desc-DC': 1, 'drop-desc-avgseg': 3, 'drop-desc-fMRIPrep': 1, 'drop-desc-reg': 2, 'tissues-Fischer344': 1, - 'tissues-NKI': 2, 'tissues-NMT31Sym': 2, 'tissues-RESILIENT': 4, + 'tissues-NKI': 2, 'tissues-NMT31Sym': 2, 'tissues-RESILIENT': 4, 'tissues-WHS': 1, 'tissues4-OASIS30ANTs': 2, 'tissues6-OASIS30ANTs': 2, } # fmt: on diff --git a/tfmanager/tests/test_migrate_tables.py b/tfmanager/tests/test_migrate_tables.py index 9b23663..1339f7a 100644 --- a/tfmanager/tests/test_migrate_tables.py +++ b/tfmanager/tests/test_migrate_tables.py @@ -1,6 +1,7 @@ """Lookup and participants tables of the migration (T01 to T03) and their check (M206-M210).""" import json +import shutil from dataclasses import replace import pytest @@ -315,6 +316,30 @@ def config(**changes): assert codes(p) == [] p = plan(snap, config(replace=True), values={'tpl-Test_atlas-A_res-1_dseg.nii.gz': {0, 1}}) assert codes(p)[0] == ('M108', 'tables.sources/A-source') + # A table the source replaces is not converted: no layout needed for its header + values = {'tpl-Test_atlas-A_res-1_dseg.nii.gz': {0, 1}} + old = template({**dict.fromkeys(values), 'tpl-Test_atlas-A_dseg.tsv': 'Label\tIndex\nB\t0\n'}) + p = plan(old, config(replace=True), values=values) + assert p.content.files['tpl-Test_atlas-A_dseg.tsv'] == good.encode() + assert p.content.transforms['tpl-Test_atlas-A_dseg.tsv'] == ('T02',) + assert codes(p) == [] + p = plan(old, config(), values=values) + assert ('M209', 'tpl-Test_atlas-A_dseg.tsv') in codes(p) + # Planning the result again writes nothing, whatever replace says + side = plan(snap, config(), values=values).content.files['tpl-Test_atlas-A_dseg.json'] + done = template( + { + **dict.fromkeys(values), + 'tpl-Test_atlas-A_dseg.tsv': good, + 'tpl-Test_atlas-A_dseg.json': side.decode(), + } + ) + for replaces in (False, True): + p = plan(done, config(replace=replaces), values=values) + assert not {'tpl-Test_atlas-A_dseg.tsv', 'tpl-Test_atlas-A_dseg.json'} & set( + p.content.transforms + ) + assert codes(p) == [] for change, message in [ ({'file': 'b.tsv'}, 'no file tables/b.tsv'), ({'file': 'x/../a.tsv'}, 'leaves tables/'), @@ -510,6 +535,7 @@ def test_annexed_tables_untouched(): ) def test_config_participants(tmp_path, change, message): head = (CONFIG_DIR / '2.0.0.yaml').read_text().split('\nparticipants:')[0] + shutil.copytree(CONFIG_DIR / 'tables', tmp_path / 'tables') # of tables.sources path = tmp_path / 'c.yaml' path.write_text(head + '\nparticipants:\n - ' + json.dumps(PARTICIPANTS) + '\n') assert load_config(path).participants[0].id == 'P' @@ -520,3 +546,11 @@ def test_config_participants(tmp_path, change, message): path.write_text(head + '\nparticipants: ' + json.dumps(twice) + '\n') with pytest.raises(ConfigError, match='listed twice'): load_config(path) + + +def test_bundled_sources(): + """Each file of tables/ is the table of one source, and each source has its own file.""" + sources = load_config().sources + files = sorted(p.name for p in (CONFIG_DIR / 'tables').iterdir()) + assert files == sorted(s.file for s in sources) + assert all(s.file == s.path for s in sources)