From d5164e92c3fcbe22ad87c39a67cfc6de55104153 Mon Sep 17 00:00:00 2001 From: cmadjar Date: Mon, 7 Jan 2019 11:07:46 -0500 Subject: [PATCH] [Configuration] Adding configuration fields needed for imaging defacing tool (#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 --- SQL/0000-00-03-ConfigTables.sql | 8 ++- ...0_add_modality_to_deface_configuration.sql | 54 +++++++++++++++++++ 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 SQL/New_patches/2018-11-30_add_modality_to_deface_configuration.sql diff --git a/SQL/0000-00-03-ConfigTables.sql b/SQL/0000-00-03-ConfigTables.sql index 9063a2d807b..f41c6625bcd 100644 --- a/SQL/0000-00-03-ConfigTables.sql +++ b/SQL/0000-00-03-ConfigTables.sql @@ -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 -- @@ -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"; diff --git a/SQL/New_patches/2018-11-30_add_modality_to_deface_configuration.sql b/SQL/New_patches/2018-11-30_add_modality_to_deface_configuration.sql new file mode 100644 index 00000000000..0179481576b --- /dev/null +++ b/SQL/New_patches/2018-11-30_add_modality_to_deface_configuration.sql @@ -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";