Skip to content

Commit

Permalink
[Configuration] Adding configuration fields needed for imaging defaci…
Browse files Browse the repository at this point in the history
…ng tool (aces#4232)

This adds to the imaging_pipeline section of the Config module 2 fields needed for the imaging defacing tool:

- reference_scan_type_for_defacing: the reference image that will be used for registration (typically the t1w modality)
- modalities_to_deface: multi-line options to list all 3D modalities that need to be defaced (for example t1w, flair, pd, t2w...)

This goes with the LORIS-MRI PR: aces/Loris-MRI#366
  • Loading branch information
cmadjar authored and Krishna Chatpar committed Apr 15, 2019
1 parent 4e36c19 commit 1fa2222
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 1 deletion.
8 changes: 7 additions & 1 deletion SQL/0000-00-03-ConfigTables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType,
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'MriConfigFile', 'Name of the MRI config file (stored in dicom-archive/.loris_mri/)', 1, 0, 'text', ID, 'Name of the MRI config file', 19 FROM ConfigSettings WHERE Name="imaging_pipeline";
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'EnvironmentFile', 'Name of the environment file that need to be sourced for the imaging pipeline', 1, 0, 'text', ID, 'Name of the environment file', 20 FROM ConfigSettings WHERE Name="imaging_pipeline";
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'compute_snr_modalities', 'Modalities for which the SNR should be computed when running the insertion MRI scripts', 1, 1, 'scan_type', ID, 'Modalities on which SNR should be calculated', 21 FROM ConfigSettings WHERE Name="imaging_pipeline";

INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'reference_scan_type_for_defacing', 'Scan type to use as a reference for registration when defacing anatomical images (typically a T1W image)', 1, 0, 'scan_type', ID, 'Scan type to use as a reference for defacing (typically a T1W image)', 22 FROM ConfigSettings WHERE Name="imaging_pipeline";
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT 'modalities_to_deface', 'Modalities for which defacing should be run and defaced image inserted in the database', 1, 1, 'scan_type', ID, 'Modalities on which to run the defacing pipeline', 23 FROM ConfigSettings WHERE Name="imaging_pipeline";
--
-- Filling Config table with default values
--
Expand Down Expand Up @@ -255,3 +256,8 @@ INSERT INTO Config (ConfigID, Value) SELECT ID, 'flair' FROM ConfigSettings WHER
INSERT INTO Config (ConfigID, Value) SELECT ID, 't1' FROM ConfigSettings WHERE Name="compute_snr_modalities";
INSERT INTO Config (ConfigID, Value) SELECT ID, 't2' FROM ConfigSettings WHERE Name="compute_snr_modalities";
INSERT INTO Config (ConfigID, Value) SELECT ID, 'pd' FROM ConfigSettings WHERE Name="compute_snr_modalities";
INSERT INTO Config (ConfigID, Value) SELECT ID, 't1' FROM ConfigSettings WHERE Name="reference_scan_type_for_defacing";
INSERT INTO Config (ConfigID, Value) SELECT ID, 'flair' FROM ConfigSettings WHERE Name="modalities_to_deface";
INSERT INTO Config (ConfigID, Value) SELECT ID, 't1' FROM ConfigSettings WHERE Name="modalities_to_deface";
INSERT INTO Config (ConfigID, Value) SELECT ID, 't2' FROM ConfigSettings WHERE Name="modalities_to_deface";
INSERT INTO Config (ConfigID, Value) SELECT ID, 'pd' FROM ConfigSettings WHERE Name="modalities_to_deface";
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
INSERT INTO ConfigSettings
(
Name,
Description,
Visible,
AllowMultiple,
DataType,
Parent,
Label,
OrderNumber
)
SELECT
'reference_scan_type_for_defacing',
'Scan type to use as a reference for registration when defacing anatomical images (typically a T1W image)',
1,
0,
'scan_type',
ID,
'Scan type to use as a reference for defacing (typically a T1W image)',
22
FROM
ConfigSettings
WHERE
Name="imaging_pipeline";
INSERT INTO ConfigSettings
(
Name,
Description,
Visible,
AllowMultiple,
DataType,
Parent,
Label,
OrderNumber
)
SELECT
'modalities_to_deface',
'Modalities for which defacing should be run and defaced image inserted in the database',
1,
1,
'scan_type',
ID,
'Modalities on which to run the defacing pipeline',
23
FROM
ConfigSettings
WHERE
Name="imaging_pipeline";

INSERT INTO Config (ConfigID, Value) SELECT ID, 't1' FROM ConfigSettings WHERE Name="reference_scan_type_for_defacing";
INSERT INTO Config (ConfigID, Value) SELECT ID, 'flair' FROM ConfigSettings WHERE Name="modalities_to_deface";
INSERT INTO Config (ConfigID, Value) SELECT ID, 't1' FROM ConfigSettings WHERE Name="modalities_to_deface";
INSERT INTO Config (ConfigID, Value) SELECT ID, 't2' FROM ConfigSettings WHERE Name="modalities_to_deface";
INSERT INTO Config (ConfigID, Value) SELECT ID, 'pd' FROM ConfigSettings WHERE Name="modalities_to_deface";

0 comments on commit 1fa2222

Please sign in to comment.